using Distribution.Models; namespace Distribution.Features.PaymentReport; public record PaymentReportFilter(DateTime From, DateTime To, Guid? RegionId); public record PaymentSummary( decimal Invoiced, decimal Collected, decimal CreditExtended, decimal Outstanding, decimal Overdue, decimal? CollectionRatePct, int PaymentCount); public record MethodBreakdown(string Method, int Count, decimal Amount, decimal SharePct); public record PaymentTrendPoint(string Period, decimal Cash, decimal Cheque, decimal Credit); public record AgingBucket(string Bucket, int Invoices, decimal Balance); public record StoreOutstanding(Guid StoreId, string StoreName, int Invoices, decimal Balance, decimal Overdue); public record AccountCollection(Guid? AccountId, string AccountName, int Count, decimal Amount); public record ChequePipeline(string Status, int Count, decimal Amount); public record PaymentAnalyticsResponse( DateTime From, DateTime To, PaymentSummary Summary, List ByMethod, List Trend, List Aging, List TopOutstanding, List ByAccount, List Cheques); // Repository row shapes public record PaymentRow(PaymentMethod Method, decimal Amount, DateTime CollectedAt, Guid? AccountId, string? AccountName, string? ChequeStatus); public record InvoiceBalanceRow(Guid StoreId, string StoreName, DateTime FinalizedAt, decimal Total, decimal Paid);