using Baya.Application.Models.Common;
using Baya.Application.Models.Payouts;
using Mediator;

namespace Baya.Application.Features.Payouts.Commands.ExecutePayoutBatch;

/// <summary>Submits a draft (or partially-failed) batch to the bank rail: transitions it to <c>processing</c>,
/// sends one instruction per unpaid payout (PAYA/SATNA by the config threshold), posts the balanced payout ledger
/// group out of <c>nurse_payable</c>, nets recovered clawbacks, and settles the batch <c>completed</c> or
/// <c>partially_failed</c>. Idempotent — a retried call never re-sends an already-paid transfer or re-posts the
/// ledger.</summary>
public record ExecutePayoutBatchCommand(long BatchId) : IRequest<OperationResult<ExecutePayoutBatchResult>>;
