//----------------------------------------------------------------------- // FILENAME: TrainingEntity.cs // PROJECT: Entities // SOLUTION: HeartTrack // DATE CREATED: 22/02/2024 // AUTHOR: Antoine PEREDERII //----------------------------------------------------------------------- using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Entities { /// /// Represents a training entity in the database. /// [Table("Training")] public class TrainingEntity { /// /// Gets or sets the unique identifier of the training. /// [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int IdTraining { get; set; } /// /// Gets or sets the date of the training. /// [Required(ErrorMessage = "Training Date is required")] [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)] public DateOnly Date { get; set; } /// /// Gets or sets the description of the training. /// [MaxLength(300)] public string? Description { get; set; } /// /// Gets or sets the latitude of the training location. /// public float Latitude { get; set; } /// /// Gets or sets the longitude of the training location. /// public float Longitude { get; set; } /// /// Gets or sets the feedback for the training. /// [MaxLength(300)] public string? FeedBack { get; set; } } }