using System.ComponentModel.DataAnnotations; namespace DramaLing.Api.Models.Entities; public class User { public Guid Id { get; set; } [Required] [MaxLength(50)] public string Username { get; set; } = string.Empty; [Required] [EmailAddress] [MaxLength(255)] public string Email { get; set; } = string.Empty; [Required] [MaxLength(255)] public string PasswordHash { get; set; } = string.Empty; [MaxLength(100)] public string? DisplayName { get; set; } public string? AvatarUrl { get; set; } [MaxLength(20)] public string SubscriptionType { get; set; } = "free"; public Dictionary Preferences { get; set; } = new(); public DateTime CreatedAt { get; set; } = DateTime.UtcNow; public DateTime UpdatedAt { get; set; } = DateTime.UtcNow; // Navigation Properties public virtual ICollection CardSets { get; set; } = new List(); public virtual ICollection Flashcards { get; set; } = new List(); public virtual UserSettings? Settings { get; set; } public virtual ICollection StudySessions { get; set; } = new List(); public virtual ICollection ErrorReports { get; set; } = new List(); public virtual ICollection DailyStats { get; set; } = new List(); }