using Microsoft.AspNetCore.Identity;

namespace ROLAC.API.Entities;

public class AppUser : IdentityUser
{
    /// <summary>Links this login account to a church member record. Null for admin-only accounts.</summary>
    public int? MemberId { get; set; }

    /// <summary>UI language preference: 'en' or 'zh-TW'.</summary>
    public string LanguagePreference { get; set; } = "en";

    /// <summary>False = account suspended (returns 403 even with correct password).</summary>
    public bool IsActive { get; set; } = true;

    public DateTime? LastLoginAt { get; set; }

    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    public ICollection<RefreshToken> RefreshTokens { get; set; } = new List<RefreshToken>();
}
