feat(#36): receitas recorrentes com confirmação de salário até dia 5
- Migration 009: coluna `type` em recurring_expenses + tabela recurring_late - API Go: tipo income/expense em CRUD; endpoints POST /confirm e /late - Dashboard: campo pending_income_recurrings na resposta - Frontend: RecurringView com seções RECEITAS e DESPESAS separadas - HomeView: widget de confirmação (dia 1-5) e badge SALÁRIO PENDENTE (pós dia 5) - Testes unitários: 4 novos casos (income covered, late, confirm, reject expense) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
-- Add type to recurring_expenses (income | expense, default expense — retrocompatível)
|
||||
ALTER TABLE recurring_expenses
|
||||
ADD COLUMN IF NOT EXISTS type VARCHAR(10) NOT NULL DEFAULT 'expense'
|
||||
CHECK (type IN ('income', 'expense'));
|
||||
|
||||
-- Track income recurrings marked as "late" for a given month
|
||||
CREATE TABLE IF NOT EXISTS recurring_late (
|
||||
id SERIAL PRIMARY KEY,
|
||||
recurring_id INTEGER NOT NULL REFERENCES recurring_expenses(id) ON DELETE CASCADE,
|
||||
month VARCHAR(7) NOT NULL,
|
||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
|
||||
UNIQUE(recurring_id, month)
|
||||
);
|
||||
Reference in New Issue
Block a user