feat(#19): registro manual de transações e recorrências fixas
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]>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
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"`
|
||||
}
|
||||
Reference in New Issue
Block a user