-- Seed system accounts for reward distribution
-- These accounts receive fixed allocations from each planting order
-- Note: Province/City area accounts (9+provinceCode, 8+cityCode) are dynamically created
--       when users select their planting location
--
-- System account user_id convention:
--   - Fixed system accounts: -1 to -100 (negative to avoid conflict with real users)
--   - Province area accounts: 9 + provinceCode (e.g., 9440000 for Guangdong)
--   - City area accounts: 8 + cityCode (e.g., 8440100 for Guangzhou)

-- S0000000001: 总部社区 (Headquarters Community)
-- Receives: 基础费 9 USDT, 无推荐人的分享权益 500 USDT, 无授权的团队权益等
INSERT INTO "wallet_accounts" (
    "account_sequence", "user_id", "status", "created_at", "updated_at"
) VALUES (
    'S0000000001', -1, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;

-- S0000000002: 成本费账户 (Cost Fee Account)
-- Receives: 成本费 400 USDT per tree
INSERT INTO "wallet_accounts" (
    "account_sequence", "user_id", "status", "created_at", "updated_at"
) VALUES (
    'S0000000002', -2, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;

-- S0000000003: 运营费账户 (Operation Fee Account)
-- Receives: 运营费 300 USDT per tree
INSERT INTO "wallet_accounts" (
    "account_sequence", "user_id", "status", "created_at", "updated_at"
) VALUES (
    'S0000000003', -3, 'ACTIVE', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP
) ON CONFLICT ("account_sequence") DO NOTHING;

-- S0000000004: RWAD底池账户 (RWAD Pool Injection Account)
-- Receives: 底池注入 800 USDT per tree
INSERT INTO "wallet_accounts" (
    "account_sequence", "user_id", "status", "created_at", "updated_at"
) 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;
