|
|
|
@ -234,3 +234,57 @@ add column `remark` varchar(255) NOT NULL DEFAULT '' after return_url;
|
|
|
|
|
alter table orders
|
|
|
|
|
add column `channel_id` varchar(32) NOT NULL DEFAULT '' after market_info,
|
|
|
|
|
add column `channel_app_id` varchar(32) NOT NULL DEFAULT '' after market_info;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `withdraws` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
|
`app_id` varchar(16) NOT NULL COMMENT '应用ID',
|
|
|
|
|
`member_id` varchar(32) NOT NULL,
|
|
|
|
|
`user_id` varchar(32) NOT NULL,
|
|
|
|
|
`withdraw_no` varchar(32) NOT NULL,
|
|
|
|
|
`out_withdraw_no` varchar(32) NOT NULL,
|
|
|
|
|
`amount` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`agreement_no` varchar(32) NOT NULL DEFAULT '',
|
|
|
|
|
`fee` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`fee_acc` tinyint(1) NOT NULL DEFAULT 0,
|
|
|
|
|
`withdraw_url` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`applied_at` datetime DEFAULT NULL,
|
|
|
|
|
`notify_url` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`status` varchar(16) NOT NULL DEFAULT '',
|
|
|
|
|
`error_code` varchar(64) NOT NULL DEFAULT '',
|
|
|
|
|
`error_message` varchar(120) NOT NULL DEFAULT '',
|
|
|
|
|
`finished_at` datetime DEFAULT NULL,
|
|
|
|
|
`third_withdraw_no` varchar(32) NOT NULL DEFAULT '',
|
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `withdraw_applies` (
|
|
|
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
|
|
|
|
`app_id` varchar(16) NOT NULL COMMENT '应用ID',
|
|
|
|
|
`member_id` varchar(32) NOT NULL,
|
|
|
|
|
`user_id` varchar(32) NOT NULL,
|
|
|
|
|
`apply_no` varchar(32) NOT NULL,
|
|
|
|
|
`batch_num` varchar(32) NOT NULL,
|
|
|
|
|
`out_apply_no` varchar(32) NOT NULL,
|
|
|
|
|
`amount` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`fee` int(11) NOT NULL DEFAULT 0,
|
|
|
|
|
`account_name` varchar(32) NOT NULL DEFAULT '',
|
|
|
|
|
`summary` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`applied_at` datetime DEFAULT NULL,
|
|
|
|
|
`notify_url` varchar(255) NOT NULL DEFAULT '',
|
|
|
|
|
`status` varchar(16) NOT NULL DEFAULT '',
|
|
|
|
|
`error_code` varchar(64) NOT NULL DEFAULT '',
|
|
|
|
|
`error_message` varchar(120) NOT NULL DEFAULT '',
|
|
|
|
|
`third_apply_no` varchar(32) NOT NULL DEFAULT '',
|
|
|
|
|
`third_batch_num` varchar(32) NOT NULL DEFAULT '',
|
|
|
|
|
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
KEY `idx_appid` (`app_id`) USING BTREE,
|
|
|
|
|
KEY `idx_memberid` (`member_id`) USING BTREE,
|
|
|
|
|
KEY `idx_createdat` (`created_at`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC;
|