feat: show report on payment method
All checks were successful
Deploy / build-and-deploy (push) Successful in 2m37s

This commit is contained in:
juancwu 2026-03-17 17:04:21 +00:00
commit 047e392ac3
4 changed files with 70 additions and 0 deletions

View file

@ -16,8 +16,16 @@ type MonthlySpending struct {
Total decimal.Decimal `db:"total"`
}
type PaymentMethodExpenseSummary struct {
PaymentMethodID string `db:"payment_method_id"`
PaymentMethodName string `db:"payment_method_name"`
PaymentMethodType string `db:"payment_method_type"`
TotalAmount decimal.Decimal `db:"total_amount"`
}
type SpendingReport struct {
ByTag []*TagExpenseSummary
ByPaymentMethod []*PaymentMethodExpenseSummary
DailySpending []*DailySpending
MonthlySpending []*MonthlySpending
TopExpenses []*ExpenseWithTagsAndMethod