Adiciona CRUD manual de transações (income/expense) com filtro mensal, CRUD de recorrências fixas com verificação mensal de cobertura (±10% por categoria), endpoint de ignore/unignore e telas Vue para Transações e Configurações. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
30 lines
939 B
Go
30 lines
939 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type RecurringExpense struct {
|
|
ID int `json:"id"`
|
|
Name string `json:"name"`
|
|
ExpectedAmount float64 `json:"expected_amount"`
|
|
DayOfMonth int `json:"day_of_month"`
|
|
CategoryID *int `json:"category_id"`
|
|
Active bool `json:"active"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type RecurringInput struct {
|
|
Name string `json:"name"`
|
|
ExpectedAmount float64 `json:"expected_amount"`
|
|
DayOfMonth int `json:"day_of_month"`
|
|
CategoryID *int `json:"category_id"`
|
|
}
|
|
|
|
// RecurringStatus reports whether a recurring expense is covered for a month.
|
|
type RecurringStatus struct {
|
|
RecurringExpense
|
|
Covered bool `json:"covered"` // has a matching transaction
|
|
Ignored bool `json:"ignored"` // user explicitly ignored this month
|
|
Reason string `json:"reason,omitempty"`
|
|
}
|