using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace WatchLog.Data { public class GlobalEntity { [Key] public int Id { get; set; } [Required] [MaxLength(200)] public required string Title { get; set; } [MaxLength(500)] public string? PicturePath { get; set; } [Required] public required DateTime CreationTime { get; set; } public DateTime? LastChange { get; set; } // --- Foreign Keys --- [Required] public int TypeId { get; set; } [Required] public int CreatorId { get; set; } // --- Navigation Properties --- [ForeignKey(nameof(TypeId))] public virtual Type Type { get; set; } = null!; [ForeignKey(nameof(CreatorId))] public virtual User User { get; set; } = null!; public virtual ICollection LinkTableGlobalGenres { get; set; } = new List(); public virtual ICollection PrivateEntities { get; set; } = new List(); public virtual ICollection SharedListEntities { get; set; } = new List(); } }