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:
@@ -56,6 +56,14 @@ func main() {
|
||||
importSvc := service.NewImportService(transactionRepo)
|
||||
importHandler := handler.NewImportHandler(importSvc)
|
||||
|
||||
manualTxRepo := repository.NewManualTransactionRepository(pool)
|
||||
txSvc := service.NewTransactionService(manualTxRepo)
|
||||
txHandler := handler.NewTransactionHandler(txSvc)
|
||||
|
||||
recurringRepo := repository.NewRecurringRepository(pool)
|
||||
recurringSvc := service.NewRecurringService(recurringRepo, manualTxRepo)
|
||||
recurringHandler := handler.NewRecurringHandler(recurringSvc)
|
||||
|
||||
r.Get("/health", handler.Health)
|
||||
|
||||
r.Route("/api", func(r chi.Router) {
|
||||
@@ -66,6 +74,19 @@ func main() {
|
||||
|
||||
r.Post("/imports/preview", importHandler.Preview)
|
||||
r.Post("/imports/confirm", importHandler.Confirm)
|
||||
|
||||
r.Get("/transactions", txHandler.List)
|
||||
r.Post("/transactions", txHandler.Create)
|
||||
r.Put("/transactions/{id}", txHandler.Update)
|
||||
r.Delete("/transactions/{id}", txHandler.Delete)
|
||||
|
||||
r.Get("/recurring", recurringHandler.List)
|
||||
r.Post("/recurring", recurringHandler.Create)
|
||||
r.Put("/recurring/{id}", recurringHandler.Update)
|
||||
r.Delete("/recurring/{id}", recurringHandler.Delete)
|
||||
r.Get("/recurring/status", recurringHandler.MonthlyStatus)
|
||||
r.Post("/recurring/{id}/ignore", recurringHandler.Ignore)
|
||||
r.Delete("/recurring/{id}/ignore", recurringHandler.Unignore)
|
||||
})
|
||||
|
||||
// Serve Vue SPA — non-API routes fall through to index.html
|
||||
|
||||
Reference in New Issue
Block a user