fix(wallet-service): 统一系统账户 seed migration

- 将 S0000000005 和 S0000000006 添加到初始 seed migration
- 简化 S0000000006 migration 格式与其他账户保持一致
- 新环境初始化时所有系统账户一次性创建

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2026-01-06 09:12:17 -08:00
parent b9911ab460
commit 283553a474
2 changed files with 23 additions and 29 deletions

View File

@ -39,3 +39,19 @@ INSERT INTO "wallet_accounts" (
) VALUES (
'S0000000004', -4, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;
-- S0000000005: 分享权益池 (Share Right Pool)
-- Receives: 无推荐人用户的分享权益 500 USDT per tree
INSERT INTO "wallet_accounts" (
"account_sequence", "user_id", "status", "created_at", "updated_at"
) VALUES (
'S0000000005', -5, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;
-- S0000000006: 手续费归集账户 (Fee Collection Account)
-- Receives: 所有提现(区块链提现、法币提现)产生的手续费
INSERT INTO "wallet_accounts" (
"account_sequence", "user_id", "status", "created_at", "updated_at"
) VALUES (
'S0000000006', -6, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;

View File

@ -1,33 +1,11 @@
-- 手续费归集账户 (Fee Collection Account)
-- S0000000006: 手续费归集账户 (user_id = -6)
-- 用于归集所有提现(区块链提现、法币提现)产生的手续费
-- Add fee collection account for withdrawal fees
-- All withdrawal fees (blockchain and fiat) are collected into this dedicated account
-- This enables transparent tracking and reporting of fee income
-- S0000000006: 手续费归集账户 (Fee Collection Account)
-- Receives: 所有提现(区块链提现、法币提现)产生的手续费
INSERT INTO "wallet_accounts" (
"account_sequence", "user_id", "status",
"usdt_available", "usdt_frozen",
"dst_available", "dst_frozen",
"bnb_available", "bnb_frozen",
"og_available", "og_frozen",
"rwad_available", "rwad_frozen",
"hashpower",
"pending_usdt", "pending_hashpower", "pending_expire_at",
"settleable_usdt", "settleable_hashpower",
"settled_total_usdt", "settled_total_hashpower",
"expired_total_usdt", "expired_total_hashpower",
"has_planted", "version",
"created_at", "updated_at"
"account_sequence", "user_id", "status", "created_at", "updated_at"
) VALUES (
'S0000000006', -6, 'ACTIVE',
0, 0,
0, 0,
0, 0,
0, 0,
0, 0,
0,
0, 0, NULL,
0, 0,
0, 0,
0, 0,
false, 0,
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
'S0000000006', -6, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;