Files
carvalho-finances/apps/api/internal/model/dashboard.go
T
Mlcavalho1andClaude Sonnet 4.6 e3b3433703 feat(#37): módulo de cartão de crédito com faturas mensais
- Migration 011: closing_day/due_day em accounts + tabela credit_bills
- CreditBillService: cria/atualiza fatura corrente on-demand no GET /accounts
- Widget FATURA ATUAL no dashboard com total e botão PAGAR
- AccountsView: campos closing_day/due_day para contas credit + painel fatura
- Dashboard: current_bills lista faturas não pagas de todos os cartões

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
2026-05-27 15:12:53 -03:00

39 lines
1.4 KiB
Go

package model
type CategoryTotal struct {
CategoryID *int `json:"category_id"`
CategoryName string `json:"category_name"`
Color string `json:"color"`
Total float64 `json:"total"`
}
type MonthEvolution struct {
Month string `json:"month"`
Income float64 `json:"income"`
Expenses float64 `json:"expenses"`
Saved float64 `json:"saved"`
}
type RecentTransaction struct {
ID int `json:"id"`
Date string `json:"date"`
Description string `json:"description"`
CategoryName string `json:"category_name"`
Amount float64 `json:"amount"`
Type string `json:"type"`
}
type DashboardData struct {
Month string `json:"month"`
TotalIncome float64 `json:"total_income"`
TotalExpenses float64 `json:"total_expenses"`
SavingsPct float64 `json:"savings_pct"`
TotalPatrimony float64 `json:"total_patrimony"`
ByCategory []CategoryTotal `json:"by_category"`
MonthlyEvolution []MonthEvolution `json:"monthly_evolution"`
RecentTransactions []RecentTransaction `json:"recent_transactions"`
PendingRecurring int `json:"pending_recurring"`
PendingIncomeRecurrings []PendingIncome `json:"pending_income_recurrings"`
CurrentBills []CreditBill `json:"current_bills"`
}