feat(saving-goals): add saving goals and contribution management
Summary
Add Saving Goals Management, allowing users to create financial goals, track saving progress, and manage contribution history.
Key Changes
- Add CRUD, archive, and restore APIs for saving goals.
- Add list, create, update, and delete APIs for contributions.
- Calculate saved amount, remaining amount, progress percentage, remaining days, and overdue status.
- Automatically synchronize
ACTIVE,PAUSED, andCOMPLETEDstatuses. - Protect all resources with authentication and user ownership checks.
- Use Serializable transactions when updating contributions and goal progress.
- Lock goal currency after the first contribution to preserve reporting consistency.
- Add Prisma models, constraints, indexes, and database migration.
- Update Swagger documentation for all Saving Goals endpoints.
- Update project memory with the new module decisions.
Notes
- Contributions are tracked independently and do not modify wallet balances.
- The database migration is included but was not applied automatically.