53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using Microsoft.AspNetCore.Identity;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace NexusReader.Domain.Entities;
|
|
|
|
/// <summary>
|
|
/// Extended Identity user for the Nexus AI E-Reader SaaS platform.
|
|
/// </summary>
|
|
public class NexusUser : IdentityUser
|
|
{
|
|
/// <summary>
|
|
/// Total number of AI tokens allowed for the current billing period.
|
|
/// </summary>
|
|
public int AITokenLimit { get; set; }
|
|
|
|
/// <summary>
|
|
/// Number of AI tokens consumed in the current billing period.
|
|
/// </summary>
|
|
public int AITokensUsed { get; set; }
|
|
|
|
/// <summary>
|
|
/// Unique identifier for the tenant (SaaS multi-tenancy support).
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(128)]
|
|
public string TenantId { get; set; } = "global";
|
|
|
|
/// <summary>
|
|
/// Current subscription plan (e.g., "Free", "Pro", "Enterprise").
|
|
/// </summary>
|
|
public string CurrentPlan { get; set; } = "Free";
|
|
|
|
/// <summary>
|
|
/// Collection of e-books owned by the user.
|
|
/// </summary>
|
|
public ICollection<Ebook> Ebooks { get; set; } = new List<Ebook>();
|
|
|
|
/// <summary>
|
|
/// Collection of quiz results completed by the user.
|
|
/// </summary>
|
|
public ICollection<QuizResult> QuizResults { get; set; } = new List<QuizResult>();
|
|
|
|
/// <summary>
|
|
/// ID of the last page read by the user.
|
|
/// </summary>
|
|
public string? LastReadPageId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Timestamp of the last reading progress update.
|
|
/// </summary>
|
|
public DateTime? LastReadAt { get; set; }
|
|
}
|