- 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]>
26 lines
965 B
Go
26 lines
965 B
Go
package model
|
|
|
|
type Account struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
InitialBalance float64 `json:"initial_balance"`
|
|
Balance float64 `json:"balance"`
|
|
YieldType string `json:"yield_type"` // "none" | "cdi" | "variable"
|
|
LastYieldDate *string `json:"last_yield_date,omitempty"`
|
|
ClosingDay *int `json:"closing_day,omitempty"`
|
|
DueDay *int `json:"due_day,omitempty"`
|
|
CurrentBill *CreditBill `json:"current_bill,omitempty"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|
|
|
|
type AccountInput struct {
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
InitialBalance float64 `json:"initial_balance"`
|
|
YieldType string `json:"yield_type"` // "none" | "cdi" | "variable"
|
|
ClosingDay *int `json:"closing_day,omitempty"`
|
|
DueDay *int `json:"due_day,omitempty"`
|
|
}
|