namespace ERPCore.Services.Interfaces;

/// <summary>
/// Issues gap-controlled, per-year document numbers (FR-X-03). Call inside the
/// document's UoW transaction so the reserved number rolls back with the document
/// on failure.
/// </summary>
public interface INumberSequenceService
{
    /// <summary>
    /// Reserve and return the next number for <paramref name="docType"/> in the
    /// current year, formatted e.g. <c>PO-2026-00042</c>.
    /// </summary>
    Task<string> NextAsync(string docType, CancellationToken ct = default);
}
