rwadurian/backend/services/wallet-service/prisma/migrations
hailin 288d894746 feat(withdrawal): implement fiat withdrawal with bank/alipay/wechat
Add complete fiat withdrawal feature that allows users to withdraw
green credits (绿积分) to their bank card, Alipay, or WeChat account
with 1:1 CNY conversion. Key changes:

Backend (wallet-service):
- Update Prisma schema with fiat withdrawal fields (paymentMethod,
  bankName, bankCardNo, cardHolderName, alipay*, wechat*, review fields)
- Rewrite withdrawal status enum for fiat flow: PENDING → FROZEN →
  REVIEWING → APPROVED → PAYING → COMPLETED (or REJECTED/FAILED)
- Add PaymentMethod enum: BANK_CARD, ALIPAY, WECHAT
- Update WithdrawalOrderAggregate with new fiat withdrawal methods
- Add review/payment workflow methods in WalletApplicationService
- Add internal API endpoints for admin withdrawal management
- Remove blockchain withdrawal event handler (no longer needed)

Frontend (admin-web):
- Add withdrawal review management page at /withdrawals
- Add tabs for reviewing/approved/paying order states
- Add withdrawal service and React Query hooks
- Add types for withdrawal orders and payment methods
- Add sidebar menu item for withdrawal review

Frontend (mobile-app):
- Add withdrawFiat() method to WalletService
- Add PaymentMethod enum with BANK_CARD/ALIPAY/WECHAT
- Create new WithdrawFiatPage for fiat withdrawal input
- Create WithdrawFiatConfirmPage with SMS + password verification
- Add routes for /withdraw/fiat and /withdraw/fiat/confirm
- Keep existing withdraw/usdt (划转) pages unchanged

Note: The existing withdraw_usdt_page.dart is for point-to-point
transfer (划转), which is a different feature from fiat withdrawal.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 05:28:05 -08:00
..
20241204000000_init fix(wallet-service): 修复 account_sequence 类型从 BIGINT 改为 VARCHAR(20) 2025-12-12 18:46:37 -08:00
20241210000001_add_processed_events feat(sync): implement Outbox Pattern for reward-service to wallet-service sync 2025-12-10 23:26:49 -08:00
20241213000000_seed_system_accounts fix: 统一推荐码生成逻辑 - 由 identity-service 单点生成 2025-12-13 01:14:56 -08:00
20241214000000_add_pending_rewards feat: 省市团队账户及待领取奖励逐笔追踪 2025-12-13 03:32:47 -08:00
20241214100000_add_share_right_pool_account feat(wallet-service): 新增分享权益池账户S0000000005 2025-12-13 18:53:21 -08:00
20241216000000_add_version_column fix(db): 添加缺失的数据库迁移文件 2025-12-15 21:53:31 -08:00
20241222000000_add_withdrawal_fee_config feat: 多项业务功能增强 2025-12-22 19:00:02 -08:00
20241223000000_add_has_planted feat: 已认种用户分享权益直接进入可结算状态 2025-12-22 21:10:49 -08:00
20241223100000_add_internal_transfer_fields feat: 实现ID-to-ID内部转账功能 2025-12-22 22:22:47 -08:00
20260103000000_add_fiat_withdrawal feat(withdrawal): implement fiat withdrawal with bank/alipay/wechat 2026-01-03 05:28:05 -08:00