using Microsoft.AspNetCore.Identity; using System.ComponentModel.DataAnnotations; namespace NexusReader.Domain.Entities; /// /// Extended Identity user for the Nexus AI E-Reader SaaS platform. /// public class NexusUser : IdentityUser { /// /// Total number of AI tokens allowed for the current billing period. /// public int AITokenLimit { get; set; } /// /// Number of AI tokens consumed in the current billing period. /// public int AITokensUsed { get; set; } /// /// Unique identifier for the tenant (SaaS multi-tenancy support). /// [Required] [MaxLength(128)] public string TenantId { get; set; } = "global"; /// /// Current subscription plan (e.g., "Free", "Pro", "Enterprise"). /// public string CurrentPlan { get; set; } = "Free"; /// /// 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. /// public string? LastReadPageId { get; set; } /// /// Timestamp of the last reading progress update. /// public DateTime? LastReadAt { get; set; } }