using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Diary.Component.Entries.Repository { [Table("Entries", Schema = "Diary")] public class Entry { [Key] public int EnrtyID { get; set; } [Required] [Column(TypeName = "date")] public DateTime Date { get; set; } [Required] public DateTime ValidFrom { get; set; } = DateTime.Now; public DateTime? ValidTo { get; set; } public string Note { get; set; } } }