using System.ComponentModel.DataAnnotations;

namespace ASTRAIN.Shared.Models;

/// <summary>
/// Join entity linking a routine to an exercise with an explicit order.
/// </summary>
public class RoutineExercise
{
    /// <summary>
    /// Gets or sets the database identifier.
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// Gets or sets the routine identifier.
    /// </summary>
    [Required]
    public int RoutineId { get; set; }

    /// <summary>
    /// Gets or sets the routine.
    /// </summary>
    public Routine? Routine { get; set; }

    /// <summary>
    /// Gets or sets the exercise identifier.
    /// </summary>
    [Required]
    public int ExerciseId { get; set; }

    /// <summary>
    /// Gets or sets the exercise.
    /// </summary>
    public Exercise? Exercise { get; set; }

    /// <summary>
    /// Gets or sets the display order within the routine.
    /// </summary>
    public int Order { get; set; }
}
