feat(#35): rendimento CDI automático em contas de investimento

- Migration 010: colunas yield_type e last_yield_date em accounts + source='yield' nas transações
- CDIYieldService: busca taxas BCB (serie 12) e cria transação source=yield com rendimento acumulado
- Weekends/feriados sem taxa usam última taxa disponível (AC4)
- GET /api/accounts dispara cálculo CDI on-demand antes de retornar saldos
- AccountsView: seletor yield_type (none/cdi/variable) + badge CDI/VAR na listagem
- Transações source=yield aparecem no histórico com descrição 'Rendimento CDI — {período}'

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-27 15:06:05 -03:00
co-authored by Claude Sonnet 4.6
parent 79f4a62a1b
commit ee6cd9f37e
9 changed files with 249 additions and 27 deletions
+2 -1
View File
@@ -70,7 +70,8 @@ func main() {
recurringHandler := handler.NewRecurringHandler(recurringSvc)
accountRepo := repository.NewAccountRepository(pool)
accountSvc := service.NewAccountService(accountRepo)
cdiSvc := service.NewCDIYieldService(accountRepo, manualTxRepo)
accountSvc := service.NewAccountService(accountRepo, cdiSvc)
accountHandler := handler.NewAccountHandler(accountSvc)
dashboardRepo := repository.NewDashboardRepository(pool)