refactor(prisma): improve wallet management schema
Summary
Refactor the Prisma schema for Phase 3 Wallet Management with production-ready PostgreSQL and Prisma practices.
Changes
- Replaced monetary
Floatfields withDecimal(18,2). - Added wallet currency, appearance, description, default, and archive fields.
- Added hierarchical categories using a Prisma self-relation.
- Added receipt URL and location fields to transactions.
- Removed the redundant budget name field.
- Added indexes for wallet, category, transaction, budget, and authentication queries.
- Changed unsafe cascade deletes to restricted deletes for financial records.
- Prevented role deletion from cascading to users.
- Preserved the existing authentication behavior.
- Kept
TransactionTypeas an enum while retaining flexible string values for currency and social providers.