//----------------------------------------------------------------------- // FILENAME: HeartRateEntity.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 heart rate entity in the database. /// [Table("HeartRate")] public class HeartRateEntity { /// /// Gets or sets the unique identifier of the heart rate entry. /// [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int IdHeartRate { get; set; } /// /// Gets or sets the altitude. /// public double Altitude { get; set; } /// /// Gets or sets the time of the heart rate measurement. /// [Required(ErrorMessage = "HeartRate Time is required")] [DisplayFormat(DataFormatString = "{0:HH:mm;ss}", ApplyFormatInEditMode = true)] public TimeOnly Time { get; set; } /// /// Gets or sets the temperature. /// public float Temperature { get; set; } /// /// Gets or sets the heart rate in beats per minute (bpm). /// public int Bpm { get; set; } /// /// Gets or sets the longitude. /// public float Longitude { get; set; } /// /// Gets or sets the latitude. /// public float Latitude { get; set; } public int ActivityId { get; set; } public ActivityEntity Activity { get; set; } = null!; } }