namespace MoneyMap.Models.Api; /// /// Complete financial audit response for AI analysis. /// public class FinancialAuditResponse { public DateTime GeneratedAt { get; set; } public DateTime PeriodStart { get; set; } public DateTime PeriodEnd { get; set; } public AuditSummary Summary { get; set; } = new(); public List Budgets { get; set; } = new(); public List SpendingByCategory { get; set; } = new(); public List TopMerchants { get; set; } = new(); public List MonthlyTrends { get; set; } = new(); public List Accounts { get; set; } = new(); public List Flags { get; set; } = new(); public List? Transactions { get; set; } } /// /// High-level financial statistics for the audit period. /// public class AuditSummary { public int TotalTransactions { get; set; } public decimal TotalIncome { get; set; } public decimal TotalExpenses { get; set; } public decimal NetCashFlow { get; set; } public decimal AverageDailySpend { get; set; } public int DaysInPeriod { get; set; } public int UncategorizedTransactions { get; set; } public decimal UncategorizedAmount { get; set; } } /// /// Budget status with period information. /// public class BudgetStatusDto { public int BudgetId { get; set; } public string Category { get; set; } = ""; public string Period { get; set; } = ""; public decimal Limit { get; set; } public decimal Spent { get; set; } public decimal Remaining { get; set; } public decimal PercentUsed { get; set; } public bool IsOverBudget { get; set; } public string PeriodRange { get; set; } = ""; } /// /// Spending breakdown by category with optional budget correlation. /// public class CategorySpendingDto { public string Category { get; set; } = ""; public decimal TotalSpent { get; set; } public int TransactionCount { get; set; } public decimal PercentOfTotal { get; set; } public decimal AverageTransaction { get; set; } public decimal? BudgetLimit { get; set; } public decimal? BudgetRemaining { get; set; } public bool? IsOverBudget { get; set; } } /// /// Spending patterns by merchant. /// public class MerchantSpendingDto { public string MerchantName { get; set; } = ""; public string? Category { get; set; } public decimal TotalSpent { get; set; } public int TransactionCount { get; set; } public decimal AverageTransaction { get; set; } public DateTime FirstTransaction { get; set; } public DateTime LastTransaction { get; set; } } /// /// Monthly income/expense/net trends. /// public class MonthlyTrendDto { public string Month { get; set; } = ""; public int Year { get; set; } public decimal Income { get; set; } public decimal Expenses { get; set; } public decimal NetCashFlow { get; set; } public int TransactionCount { get; set; } public Dictionary TopCategories { get; set; } = new(); } /// /// Per-account transaction summary. /// public class AccountSummaryDto { public int AccountId { get; set; } public string AccountName { get; set; } = ""; public string Institution { get; set; } = ""; public string AccountType { get; set; } = ""; public int TransactionCount { get; set; } public decimal TotalDebits { get; set; } public decimal TotalCredits { get; set; } public decimal NetFlow { get; set; } } /// /// AI-friendly flag highlighting potential issues or observations. /// public class AuditFlagDto { public string Type { get; set; } = ""; public string Severity { get; set; } = ""; public string Message { get; set; } = ""; public object? Details { get; set; } } /// /// Simplified transaction for export. /// public class TransactionDto { public long Id { get; set; } public DateTime Date { get; set; } public string Name { get; set; } = ""; public string? Memo { get; set; } public decimal Amount { get; set; } public string? Category { get; set; } public string? MerchantName { get; set; } public string AccountName { get; set; } = ""; public string? CardLabel { get; set; } public bool IsTransfer { get; set; } }