namespace ERPCore.Dtos.Dashboard;

/// <summary>
/// Aggregate counts for the dashboard overview — mirrors the widget set in
/// docs/dashboard-implementation.pdf: reorder alerts, on-hand summary, stock valuation,
/// pending-approval POs, pending GRNs, open requisitions, open counts awaiting posting,
/// and open RFQs. Recent movements isn't here — it's just GET /stock/ledger with a small
/// pageSize, no aggregation needed. A single computed-on-read object, not a stored
/// entity — same as reorder alerts (docs/11 §5.7).
/// </summary>
public sealed record DashboardStatsDto(
    int LowStockAlerts,
    decimal OnHandTotal,
    int OnHandWarehouses,
    decimal StockValuationTotal,
    IReadOnlyList<WarehouseValuationDto> StockValuationByWarehouse,
    int PendingApprovalPurchaseOrders,
    int PendingGrns,
    int OpenRequisitions,
    int PendingCounts,
    int OpenRfqs);

/// <summary>One bar in the Stock Valuation chart — total FIFO layer value for a warehouse.</summary>
public sealed record WarehouseValuationDto(int WarehouseId, decimal Total);
