/// <summary>
/// Aggregate work queue health metrics for the supervisor dashboard.
/// Returned by GET /api/v1/work-queue/overview.
/// </summary>
public record WorkQueueOverviewResponse
{
    /// <summary>
    /// Count of batches per status. Key is the DB status string
    /// (e.g. "UPLOADED", "IN_ENTRY", "PENDING_VERIFICATION").
    /// All 8 statuses are always present, even if count is 0.
    /// </summary>
    public required Dictionary<string, int> StatusCounts { get; init; }

    /// <summary>
    /// Average time in minutes that batches currently in PendingVerification
    /// have been waiting. Zero if no batches are pending.
    /// </summary>
    public required double AverageTimeInQueueMinutes { get; init; }

    /// <summary>
    /// Rejection rate as a decimal (0.0 to 1.0). Calculated as
    /// rejections / (rejections + verifications) over the last 24 hours.
    /// </summary>
    public required double RejectRate { get; init; }

    /// <summary>
    /// Age in minutes of the oldest batch in PendingVerification status.
    /// Zero if no batches are pending.
    /// </summary>
    public required double OldestPendingVerificationMinutes { get; init; }
}
