优化打手提现审核流程
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- 打手提现账户:每位打手仅允许首次登记,后续变更由客服处理。
|
||||
CREATE TABLE IF NOT EXISTS worker_withdrawal_accounts (
|
||||
worker_id BIGINT PRIMARY KEY REFERENCES worker_users(id) ON DELETE CASCADE,
|
||||
account_channel TEXT NOT NULL CHECK (account_channel IN ('alipay', 'wechat')),
|
||||
account_name TEXT NOT NULL,
|
||||
account_no TEXT NOT NULL,
|
||||
created_at TIMESTAMPTZ NOT NULL
|
||||
);
|
||||
|
||||
COMMENT ON TABLE worker_withdrawal_accounts IS '打手不可自行修改的提现账户';
|
||||
COMMENT ON COLUMN worker_withdrawal_accounts.account_channel IS '提现渠道:alipay / wechat';
|
||||
@@ -0,0 +1,8 @@
|
||||
-- 提现账户改为每个渠道各登记一次,保留既有账户数据。
|
||||
ALTER TABLE worker_withdrawal_accounts
|
||||
DROP CONSTRAINT IF EXISTS worker_withdrawal_accounts_pkey;
|
||||
|
||||
ALTER TABLE worker_withdrawal_accounts
|
||||
ADD PRIMARY KEY (worker_id, account_channel);
|
||||
|
||||
COMMENT ON TABLE worker_withdrawal_accounts IS '打手每个渠道仅可自行登记一次的提现账户';
|
||||
@@ -0,0 +1,5 @@
|
||||
-- 微信提现不使用账号,改为保存不可修改的收款二维码。
|
||||
ALTER TABLE worker_withdrawal_accounts
|
||||
ADD COLUMN IF NOT EXISTS wechat_qr_code_json JSONB NOT NULL DEFAULT '{}'::jsonb;
|
||||
|
||||
COMMENT ON COLUMN worker_withdrawal_accounts.wechat_qr_code_json IS '微信收款二维码文件信息';
|
||||
Reference in New Issue
Block a user