namespace MilitaryTrainingManagement.Models.Entities;

/// <summary>
/// 用户账户实体
/// </summary>
public class UserAccount
{
    public int Id { get; set; }
    public string Username { get; set; } = string.Empty;
    public string PasswordHash { get; set; } = string.Empty;
    public string? PlainPassword { get; set; } // 明文密码，仅供管理员查看
    public string DisplayName { get; set; } = string.Empty;
    public int OrganizationalUnitId { get; set; }
    public OrganizationalUnit OrganizationalUnit { get; set; } = null!;
    public bool IsActive { get; set; } = true;
    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
    public DateTime? LastLoginAt { get; set; }
}
