using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace WatchLog.Data { public class Label { [Key] public int Id { get; set; } [Required] [MaxLength(50)] public required string Name { get; set; } [Required] public required DateTime CreationTime { get; set; } public DateTime? LastChange { get; set; } // --- Foreign Key --- [Required] public string? CreatorId { get; set; } // --- Navigation Properties --- [ForeignKey(nameof(CreatorId))] public virtual ApplicationUser User { get; set; } = null!; public virtual ICollection LinkTablePrivateLabels { get; set; } = new List(); } }