using NexusReader.Application.Constants; namespace NexusReader.Application.DTOs.User; public record UserProfileDto { public string Email { get; init; } = string.Empty; public int AITokensUsed { get; init; } public Guid TenantId { get; init; } /// /// Relational data for the current subscription plan. /// public SubscriptionPlanDto Plan { get; init; } = new(); public int AverageQuizScore { get; init; } /// /// Summary of the last read book. /// public LastReadBookDto? LastReadBook { get; init; } public string[] Roles { get; init; } = Array.Empty(); // Helper properties for UI compatibility public string CurrentPlan => Plan?.Name ?? PlanConstants.DefaultPlanName; public int AITokenLimit => Plan?.AITokenLimit ?? PlanConstants.DefaultTokenLimit; public string LastReadBookTitle => LastReadBook?.Title ?? PlanConstants.DefaultActivityLabel; } public record LastReadBookDto { public Guid Id { get; init; } public string Title { get; init; } = string.Empty; public AuthorDto Author { get; init; } = new(); public string? CoverUrl { get; init; } public double Progress { get; init; } public string? LastChapter { get; init; } public int LastChapterIndex { get; init; } public string? Description { get; init; } }