namespace Baya.Domain.Entities.Refunds;

/// <summary>
/// The closed <c>refunds.status</c> code set — a <b>forward-only</b> lifecycle. A card refund is effectively
/// immediate (<see cref="Approved"/> → <see cref="Succeeded"/>); a BNPL revert sits in <see cref="Processing"/>
/// until the async 7–10-business-day customer cash-back is reconciled. Persisted as these stable snake_case
/// codes; the allowed edges live in <see cref="RefundTransitions"/>.
/// </summary>
public static class RefundStatus
{
    /// <summary>Recorded but not yet approved. Reserved — admin refunds are created already approved today.</summary>
    public const string Requested = "requested";

    /// <summary>Admin-approved; the channel execution + ledger posting run under the same lock.</summary>
    public const string Approved = "approved";

    /// <summary>Channel accepted but the customer cash-back is not yet confirmed (the BNPL/manual wait state).</summary>
    public const string Processing = "processing";

    /// <summary>The customer refund is confirmed (card immediately; BNPL on reconciliation). Terminal.</summary>
    public const string Succeeded = "succeeded";

    /// <summary>The channel refused the reversal. Terminal — a fresh attempt is a new refund row.</summary>
    public const string Failed = "failed";

    /// <summary>The refund was declined by the admin before any money moved. Terminal.</summary>
    public const string Rejected = "rejected";
}
