using Microsoft.AspNetCore.Identity; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using NexusReader.Domain.Enums; namespace NexusReader.Domain.Entities; public class NexusUser : IdentityUser { /// /// User's display name or full name. /// [MaxLength(100)] public string? DisplayName { get; set; } /// /// Total AI tokens available for the user (depends on subscription). /// public int AITokenLimit { get; set; } /// /// AI tokens consumed by the user in the current billing period. /// public int AITokensUsed { get; set; } /// /// Date when the user last performed an AI-related action. /// public DateTime? LastAiActionDate { get; set; } /// /// Multi-tenant identifier. /// [Required] [MaxLength(128)] public string TenantId { get; set; } = "global"; /// /// Foreign key for the current subscription plan. /// [Required] public int SubscriptionPlanId { get; set; } /// /// Navigation property for the current subscription plan. /// public SubscriptionPlan? SubscriptionPlan { get; set; } /// /// Collection of e-books owned by the user. /// public ICollection Ebooks { get; set; } = new List(); /// /// Collection of quiz results completed by the user. /// public ICollection QuizResults { get; set; } = new List(); /// /// ID of the last page read by the user. /// [MaxLength(255)] public string? LastReadPageId { get; set; } /// /// Last read timestamp. /// public DateTime? LastReadAt { get; set; } /// /// User's visual theme preference. /// public ThemeMode ThemePreference { get; set; } = ThemeMode.System; }