//-----------------------------------------------------------------------
// FILENAME: StatisticEntity.cs
// PROJECT: Entities
// SOLUTION: HeartTrack
// DATE CREATED: 22/02/2024
// AUTHOR: HeartTeam
//-----------------------------------------------------------------------
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Entities
{
///
/// Represents a statistic entity in the database.
///
[Table("Statistic")]
public class StatisticEntity
{
///
/// Gets or sets the unique identifier of the statistic.
///
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdStatistic { get; set; }
///
/// Gets or sets the weight recorded in the statistic.
///
public float Weight { get; set; }
///
/// Gets or sets the average heart rate recorded in the statistic.
///
public double AverageHeartRate { get; set; }
///
/// Gets or sets the maximum heart rate recorded in the statistic.
///
public double MaximumHeartRate { get; set; }
///
/// Gets or sets the average calories burned recorded in the statistic.
///
public double AverageCaloriesBurned { get; set; }
///
/// Gets or sets the date of the statistic.
///
[Required(ErrorMessage = "Statistic Date is required")]
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
public DateOnly Date { get; set; }
public int AthleteId { get; set; }
public AthleteEntity Athlete { get; set; } = null!;
}
}