//-----------------------------------------------------------------------
// FILENAME: NotificationEntity.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 notification entity in the database.
///
[Table("Notification")]
public class NotificationEntity
{
///
/// Gets or sets the unique identifier of the notification.
///
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdNotif { get; set; }
///
/// Gets or sets the message of the notification.
///
[MaxLength(100)]
[Required(ErrorMessage = "Message is required")]
public string Message { get; set; } = null!;
///
/// Gets or sets the date of the notification.
///
[Required(ErrorMessage = "Notification Date is required")]
[DisplayFormat(DataFormatString = "{0:HH.mm.ss - HH.mm.ss}", ApplyFormatInEditMode = true)]
public DateTime Date { get; set; }
///
/// Gets or sets the status of the notification.
///
public bool Statut { get; set; }
///
/// Gets or sets the urgency of the notification.
///
[MaxLength(100)]
public string Urgence { get; set; } = null!;
public int SenderId { get; set; }
public AthleteEntity Sender { get; set; } = null!;
public ICollection Receivers { get; set; } = new List();
}
}