namespace Baya.Domain.Entities.Payouts;

/// <summary>
/// The closed <c>nurse_payouts.status</c> code set — a <b>forward-only</b> lifecycle that (with the
/// <c>nurse_payout_booking_links.booking_id</c> UNIQUE and the batch lock) makes a retried execute never
/// double-send an irreversible transfer. A payout is materialized <see cref="Pending"/>, moves to
/// <see cref="Submitted"/> when the bank accepts the instruction, and to <see cref="Paid"/> once the transfer
/// track id is confirmed; a rail rejection lands it in <see cref="Failed"/>, from which a retry re-submits.
/// Persisted as these stable snake_case codes; the allowed edges live in <see cref="PayoutStatusTransitions"/>.
/// </summary>
public static class PayoutStatus
{
    /// <summary>Materialized into the draft batch but not yet submitted to the rail.</summary>
    public const string Pending = "pending";

    /// <summary>The bank accepted the transfer instruction (a PAYA/SATNA track id was issued).</summary>
    public const string Submitted = "submitted";

    /// <summary>The transfer is confirmed paid — an irreversible IBAN movement. Terminal on success.</summary>
    public const string Paid = "paid";

    /// <summary>The rail rejected the transfer; a retry re-submits the same instruction.</summary>
    public const string Failed = "failed";
}
