namespace Baya.Domain.Entities.Payments;

/// <summary>
/// The closed set of double-entry <c>ledger_entries.account_type</c> codes — the accounts every money event
/// posts against. This phase only posts the first three (the card-capture group), but <b>all</b> are defined
/// now because b11 (refunds/clawbacks) and b12 (BNPL) post against the rest. Balances are <b>derived by
/// filtering</b> on these, never stored in a drifting column.
/// </summary>
public static class LedgerAccountType
{
    /// <summary>Funds held in escrow state (legally at the PSP/bank, never platform cash). Debited on capture.</summary>
    public const string EscrowHeld = "escrow_held";

    /// <summary>Balinyaar's own commission revenue. Credited on capture.</summary>
    public const string PlatformRevenue = "platform_revenue";

    /// <summary>Amount owed to a nurse (carries <c>nurse_id</c>). Credited on capture; b13 pays it down.</summary>
    public const string NursePayable = "nurse_payable";

    /// <summary>Amount owed back to a customer for a refund. Posted by b11.</summary>
    public const string RefundPayable = "refund_payable";

    /// <summary>The BNPL provider's commission expense. Posted by b12's settle group.</summary>
    public const string BnplFeeExpense = "bnpl_fee_expense";

    /// <summary>The PSP/gateway fee expense on a capture (true margin). Reserved.</summary>
    public const string PspFeeExpense = "psp_fee_expense";

    /// <summary>A receivable from a nurse already paid when a booking is later refunded (carries <c>nurse_id</c>).
    /// Posted by b11.</summary>
    public const string NurseClawbackReceivable = "nurse_clawback_receivable";

    /// <summary>Written-off uncollectable amount. Reserved.</summary>
    public const string BadDebt = "bad_debt";
}
