#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.Common; using Lumina.Application.Common.DataAccess.Entities.MediaLibrary.Management; using System; using System.Collections.Generic; using System.Diagnostics; #endregion namespace Lumina.Application.Common.DataAccess.Entities.UsersManagement; /// /// Repository entity for a user. /// [DebuggerDisplay("Username: {Username}")] public class UserEntity : IStorageEntity { /// /// Gets the Id of the user. /// public Guid Id { get; init; } /// /// Gets or sets the username of the user. /// public required string Username { get; set; } /// /// Gets or sets the hashed password of the user. /// public required string Password { get; set; } /// /// Gets or sets the temporary hashed password used in password recovery. /// public string? TempPassword { get; set; } /// /// Gets or sets the optional Time-based One-Time Password (TOTP) secret for two-factor authentication. /// public string? TotpSecret { get; set; } /// /// Gets or sets the optional token used for account verification or password reset. /// public string? VerificationToken { get; set; } /// /// Gets or sets the optional date and time when the verification token was created. /// public DateTime? VerificationTokenCreated { get; set; } /// /// Gets or sets the date and time when the temporary password used in password recovery was created. /// public DateTime? TempPasswordCreated { get; set; } /// /// Gets the collection of libraries owned by this user. /// public required ICollection Libraries { get; init; } = []; /// /// Gets the time and date when the entity was added. /// public required DateTime Created { get; set; } /// /// Gets the optional time and date when the entity was updated. /// public DateTime? Updated { get; set; } }