#nullable enable
using Baya.Application.Models.Common;
using Mediator;

namespace Baya.Application.Features.Invoices.Commands.ReconcileMoadianInvoices;

/// <summary>
/// Walks every invoice still <c>pending</c>/<c>submitted</c> with سامانه مودیان toward its registered 22-digit
/// reference (refinement-phase-8, 6.5). Run by the Moadian reconciliation <c>IRecurringJob</c> (and available as an
/// admin override); idempotent — a (re)submission of an already-registered invoice is a no-op, and the real
/// <c>IMoadianClient</c> dedups on the invoice number so re-submitting a still-<c>submitted</c> one doubles as the
/// status poll.
/// </summary>
public sealed record ReconcileMoadianInvoicesCommand : IRequest<OperationResult<ReconcileMoadianResult>>;

/// <param name="Scanned">How many unregistered invoices were examined this run.</param>
/// <param name="Registered">How many reached <c>registered</c> this run.</param>
public sealed record ReconcileMoadianResult(int Scanned, int Registered);
