You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
1.8 KiB
63 lines
1.8 KiB
//-----------------------------------------------------------------------
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
/// Represents a heart rate entity in the database.
|
|
/// </summary>
|
|
[Table("HeartRate")]
|
|
public class HeartRateEntity
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the unique identifier of the heart rate entry.
|
|
/// </summary>
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int IdHeartRate { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the altitude.
|
|
/// </summary>
|
|
public double Altitude { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the time of the heart rate measurement.
|
|
/// </summary>
|
|
[Required(ErrorMessage = "HeartRate Time is required")]
|
|
[DisplayFormat(DataFormatString = "{0:HH:mm;ss}", ApplyFormatInEditMode = true)]
|
|
public TimeOnly Time { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the temperature.
|
|
/// </summary>
|
|
public float Temperature { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the heart rate in beats per minute (bpm).
|
|
/// </summary>
|
|
public int Bpm { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the longitude.
|
|
/// </summary>
|
|
public float Longitude { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the latitude.
|
|
/// </summary>
|
|
public float Latitude { get; set; }
|
|
|
|
public int ActivityId { get; set; }
|
|
|
|
public ActivityEntity Activity { get; set; } = null!;
|
|
}
|
|
} |