Files
carvalho-finances/apps/api/internal/model/recurring.go
T
Mlcavalho1andClaude Sonnet 4.6 12e8500827 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]>
2026-05-26 20:26:48 -03:00

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"`
}