namespace Baya.Domain.Entities.Payments;

/// <summary>
/// The closed <c>payment_transactions.status</c> code set. Exactly one <see cref="Succeeded"/> row may exist
/// per booking — enforced structurally by the filtered <c>UNIQUE(booking_id) WHERE status='succeeded'</c>,
/// the authoritative anti-double-capture backstop. Persisted as these stable snake_case codes.
/// </summary>
public static class PaymentTransactionStatus
{
    /// <summary>An IPG session was started; awaiting the PSP callback.</summary>
    public const string Pending = "pending";

    /// <summary>Capture confirmed (server-side re-verified) — triggers the ledger posting + booking confirm.</summary>
    public const string Succeeded = "succeeded";

    /// <summary>The attempt failed at the gateway; a fresh attempt is a new row.</summary>
    public const string Failed = "failed";
}
