ALTER TABLE member_user
    ADD COLUMN `alipay_account` VARCHAR(255) default null COMMENT '支付宝账号',
		ADD COLUMN `alipay_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci default null COMMENT '支付宝名称',
		ADD COLUMN `bank_name` VARCHAR(255) default null COMMENT '开户行名称',
		ADD COLUMN `account_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci default null COMMENT '开户名',
		ADD COLUMN `bank_account` VARCHAR(255) default null COMMENT '银行账号';


CREATE TABLE `distri_application_for_withdrawal` (
                                                     `id` bigint NOT NULL AUTO_INCREMENT COMMENT '申请id',
                                                     `user_id` bigint NOT NULL COMMENT '用户ID',
                                                     `withdrawal_type` tinyint NOT NULL COMMENT '提现渠道类型',
                                                     `amount` bigint NOT NULL COMMENT '提现金额,单位:元',
                                                     `withdrawal_account` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '提现账号',
                                                     `status` tinyint DEFAULT '0' COMMENT '提现状态,成功是1， 失败是2， 提现中为0',
                                                     `application_for_withdrawal_channel_id` bigint NOT NULL COMMENT '提现渠道记录id',
                                                     `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '创建者',
                                                     `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                     `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '更新者',
                                                     `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                     `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
                                                     PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='提现申请记录表';

CREATE TABLE `distri_application_for_withdrawal_channel` (
                                                             `id` bigint NOT NULL AUTO_INCREMENT COMMENT '提现渠道id',
                                                             `withdrawal_type` tinyint NOT NULL COMMENT '提现渠道类型',
                                                             `withdrawal_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '提现渠道名称',
                                                             `amount` bigint NOT NULL DEFAULT '0' COMMENT '提现金额,单位:元',
                                                             `count` int NOT NULL DEFAULT '0' COMMENT '提现笔数',
                                                             `status` tinyint DEFAULT '0' COMMENT '提现状态, 0:未完成 , 1:已完成 , 2:部分完成 , 3:全部失败',
                                                             `pt_daily_withdrawal_id` bigint NOT NULL COMMENT '提现渠道记录id',
                                                             `excel_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '导出状态,已导出是1，未导出为0',
                                                             `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '创建者',
                                                             `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                                             `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '更新者',
                                                             `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                                             `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
                                                             PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='提现渠道记录表';

CREATE TABLE `distri_pt_daily_withdrawal` (
                                              `id` bigint NOT NULL AUTO_INCREMENT COMMENT '记录id',
                                              `amount` bigint NOT NULL DEFAULT '0' COMMENT '提现金额,单位:元',
                                              `count` int NOT NULL DEFAULT '0' COMMENT '提现笔数',
                                              `status` tinyint DEFAULT '0' COMMENT '提现状态, 0:未完成 , 1:已完成 , 2:部分完成 , 3:全部失败',
                                              `start_time` datetime NOT NULL COMMENT '提现开始时间',
                                              `end_time` datetime NOT NULL COMMENT '提现截止时间',
                                              `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '创建者',
                                              `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
                                              `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '更新者',
                                              `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
                                              `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
                                              PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='平台每日提现记录表';

ALTER TABLE sale_shop
    ADD COLUMN `account_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT null COMMENT '账户名称',
		ADD COLUMN `account_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT null COMMENT '账户号码',
		ADD COLUMN `bank_name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT null COMMENT '开户银行';

ALTER TABLE trade_pt_settlement
    ADD COLUMN `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '结算单状态 0:未完成 , 1:已完成 , 2:部分完成 , 3:全部失败';

AlTER TABLE trade_shop_settlement
    ADD COLUMN `account_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '账户名称',
		ADD COLUMN `account_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '账户号码';

ALTER TABLE trade_pt_settlement
    ADD COLUMN   `export_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '导出状态,已导出是1，未导出为0';
