namespace SOR.Database.Entities.Identity;
using Microsoft.AspNetCore.Identity;
///
/// Extends ASP.NET Core Identity's IdentityUser with SOR-specific profile fields.
///
/// Identity manages: email, password hash, lockout, two-factor, external logins.
/// We add: display name (in-game handle), avatar CDN URL, audit timestamps.
///
/// Ban handling uses Identity's built-in LockoutEnd + LockoutEnabled — no
/// separate ban table needed for basic bans. A separate audit log of ban
/// actions can be added later.
///
public sealed class Account : IdentityUser
{
/// Publicly visible in-game display name (not the login email).
public string? DisplayName { get; set; }
/// CDN URL to the player's avatar image.
public string? AvatarCdnUrl { get; set; }
/// UTC time the account was first created.
public DateTimeOffset CreatedAt { get; set; }
/// UTC time of the most recent successful login.
public DateTimeOffset? LastLoginAt { get; set; }
///
/// Set when the player completes the starter deck selection during onboarding.
/// Null means they have not yet chosen their starter deck.
///
public DateTimeOffset? StarterDeckSelectedAt { get; set; }
///
/// In-game earned currency balance (Origin Points / Gold).
/// Earned through gameplay; can also be purchased from the bazaar store.
/// Spent on booster packs, prebuilt decks, cosmetics, and P2P listings.
///
public int OriginPoints { get; set; }
///
/// ELO-style rank score used for matchmaking.
/// Starts at 1000. Adjusted after each ranked game using K=32 factor.
///
public int RankScore { get; set; } = 1000;
///
/// When true, this account is excluded from the public leaderboard.
/// Use for bots, dev accounts, and internal test accounts.
///
public bool IsHiddenFromLeaderboard { get; set; }
// ── AI account fields ─────────────────────────────────────────────────────
///
/// True for AI-controlled virtual accounts (seeded by SOR.Ai at startup).
/// AI accounts are excluded from ranked matchmaking, leaderboards, and ELO updates.
/// They join custom lobbies as AI seats and submit game actions in-process.
///
public bool IsAi { get; set; }
/// AI difficulty tier (1–10). Null for human accounts.
public int? AiDifficulty { get; set; }
///
/// AI strategy archetype: "Aggressive" | "Control" | "Balanced" | "Ramp" | "Swarm".
/// Null for human accounts.
///
public string? AiStrategy { get; set; }
}