# 10:47 2021/8/17
ALTER TABLE `categories`
    CHANGE COLUMN `template` `template` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '产品模板' COLLATE 'utf8_general_ci' AFTER `sort`;

# 12:47 2021/8/17
ALTER TABLE `users`
    CHANGE COLUMN `mobile` `mobile` VARCHAR(15) NOT NULL DEFAULT '' COMMENT '手机号' COLLATE 'utf8mb4_unicode_ci' AFTER `id`;

# 18:09 2021/8/17
ALTER TABLE `agents`
	ADD COLUMN `type` TINYINT NOT NULL DEFAULT '0' COMMENT '1、计调版旅行社；2、供应商旅行社；3、组团版旅行社' AFTER `remember_token`;

# 23:25 2021/08/17
ALTER TABLE `agent_products`
    ADD COLUMN `guide_id` INT NOT NULL DEFAULT 0 COMMENT '绑定地接（组团版旅行社才能绑定）' AFTER `category_id`;

ALTER TABLE `agents`
    CHANGE COLUMN `type` `type` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '1、计调版旅行社；2、供应商旅行社；3、组团版旅行社' AFTER `status`;

ALTER TABLE `agent_products`
    ADD COLUMN `verifier` INT NOT NULL DEFAULT '0' COMMENT '核销人员的user_id' AFTER `status`,
    CHANGE COLUMN `product_id` `product_id` INT(11) NOT NULL COMMENT '供应商产品ID，组合产品时为第一个ID' AFTER `agent_id`,
    ADD COLUMN `product_ids` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '供应商产品ID，主要用于组合产品，可能会有多个ID' COLLATE 'utf8_general_ci' AFTER `product_id`;

ALTER TABLE `orders`
    CHANGE COLUMN `product_id` `product_id` INT(11) NOT NULL COMMENT '供应商产品ID，组合产品时为第一个ID' AFTER `agent_product_id`,
    ADD COLUMN `product_ids` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '供应商产品ID，主要用于组合产品，可能会有多个ID' COLLATE 'utf8_general_ci' AFTER `product_id`;

# 9:37 2021/8/18
ALTER TABLE `orders`
    CHANGE COLUMN `paid_at` `paid_at` TIMESTAMP NULL DEFAULT NULL COMMENT '付款时间' AFTER `paid_money`,
    CHANGE COLUMN `status` `status` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '订单状态，-1:已取消；0:待付款；1:已付订金/定金/首付款；2:已付全款；3:已付尾款；4:线下未支付；5:线下已支付；6:退款中；7:已退款；16:已完成；' AFTER `picture`,
    CHANGE COLUMN `pay_type` `pay_type` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '支付方式，0:在线支付，1:线下支付，2:订金支付，3:定金支付，4:首款支付；5:追加/尾款支付；【注：订单生成后不应该再修改此项的值】' AFTER `status`;

# 11:27 2021/8/18
ALTER TABLE `agents`
	ADD COLUMN `rate` FLOAT(10,2) NOT NULL DEFAULT 0 COMMENT '平台分成比率' AFTER `contact_phone`;

ALTER TABLE `suppliers`
	ADD COLUMN `rate` FLOAT(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台分成比率' AFTER `contact_phone`;

ALTER TABLE `guides`
	ADD COLUMN `rate` FLOAT(10,2) NOT NULL DEFAULT '0.00' COMMENT '平台分成比率' AFTER `status`;

# 17:54 2021/8/18
ALTER TABLE `agent_products`
	DROP INDEX `agent_id_product_id`,
	ADD INDEX `agent_id_product_id` (`agent_id`, `product_id`);

# 18:03 2021/8/19
ALTER TABLE `advertisings`
    CHANGE COLUMN `agent_id` `agent_id` INT(10) NOT NULL COMMENT '发布者ID' AFTER `id`,
    ADD INDEX `agent_id` (`agent_id`);

# 0:01 ‎2021/‎08/‎20
ALTER TABLE `orders`
	ADD COLUMN `guide_id` INT NOT NULL DEFAULT '0' COMMENT '地接ID' AFTER `refund_info`,
	ADD INDEX `guide_id` (`guide_id`);

# 14:27 2021/8/20
ALTER TABLE `orders`
	CHANGE COLUMN `status` `status` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '订单状态，-1:已取消；0:待付款；1:已付订金/定金/首付款；2:已付全款；3:已付尾款；4:线下未支付；5:线下已支付；6:退款中；7:已退款；8:拒绝退款；16:已完成；' AFTER `picture`,
	CHANGE COLUMN `refund_info` `refund_info` TEXT NULL DEFAULT NULL COMMENT '退款信息["desc":"退款说明","refund_no":"退款号，用于微信申请退款","pictures":"退款图片凭据","old_status":"申请退款前的订单状态"]' COLLATE 'utf8_general_ci' AFTER `paid_at`;

ALTER TABLE `user_money_logs`
    ADD INDEX `agent_id` (`agent_id`);

CREATE TABLE `agent_product_items` (
    `id` INT(10) NOT NULL AUTO_INCREMENT,
    `agent_product_id` INT(10) NOT NULL,
    `agent_id` INT(10) NOT NULL,
    `supplier_id` INT(10) NOT NULL,
    `product_id` INT(10) NOT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `agent_product_id` (`agent_product_id`) USING BTREE,
    INDEX `agent_id` (`agent_id`) USING BTREE,
    INDEX `supplier_id` (`supplier_id`) USING BTREE,
    INDEX `product_id` (`product_id`) USING BTREE
)
COMMENT='代理商产品-组合产品明细'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

ALTER TABLE `agent_products`
    ADD COLUMN `stock` INT(10) NOT NULL DEFAULT '0' COMMENT '库存' AFTER `sale`;

# 10:42 ‎2021/‎08/‎21
ALTER TABLE `orders`
    CHANGE COLUMN `order_no` `order_no` CHAR(22) NOT NULL COMMENT '订单号' COLLATE 'utf8_general_ci' AFTER `agent_id`;

ALTER TABLE `orders`
    ADD COLUMN verify_code CHAR(13) NOT NULL DEFAULT '' COMMENT '核销码' AFTER `guide_id`;

# 10:35 ‎2021/‎08/‎22
ALTER TABLE `slides`
	CHANGE COLUMN `url` `picture` VARCHAR(255) NOT NULL COMMENT '轮播图地址' COLLATE 'utf8_general_ci' AFTER `title`,
	ADD COLUMN `type` TINYINT NOT NULL DEFAULT '0' COMMENT '链接类型，0:链接到内部页面；1:链接到webview url' AFTER `sort`,
	ADD COLUMN `url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '链接地址' AFTER `type`;

# 23:43 ‎2021/‎08/‎22
CREATE TABLE `waterfall_ads` (
	`id` INT(10) NOT NULL AUTO_INCREMENT,
	`agent_id` INT(10) NOT NULL COMMENT '代理商ID',
	`title` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '广告名称' COLLATE 'utf8_general_ci',
	`picture` VARCHAR(255) NOT NULL COMMENT '广告图片' COLLATE 'utf8_general_ci',
	`type` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '链接类型，0:链接到内部页面；1:链接到外部url',
	`url` VARCHAR(50) NOT NULL COMMENT '链接' COLLATE 'utf8_general_ci',
	`status` TINYINT(3) NOT NULL DEFAULT '1' COMMENT '0:未启用，1:启用',
	`sort` SMALLINT(5) NOT NULL DEFAULT '255' COMMENT '排序，越小越靠前',
	`created_at` TIMESTAMP NULL DEFAULT NULL,
	`updated_at` TIMESTAMP NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `agent_id` (`agent_id`) USING BTREE
)
COMMENT='瀑布流内嵌广告'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

# 12:39 2021/8/24
ALTER TABLE `notices`
	ADD COLUMN `sort` SMALLINT NOT NULL DEFAULT '255' COMMENT '排序，越小越靠前' AFTER `content`;

ALTER TABLE `users`
    CHANGE COLUMN `verifier` `is_verify` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '是否是核销人员，1:是；0:否' AFTER `status`;

# 15:51 2021/8/24
ALTER TABLE `articles`
	ADD COLUMN `type` TINYINT NOT NULL DEFAULT 0 COMMENT '0:普通列表显示；1:大图显示；' AFTER `content`,
	ADD COLUMN `sort` SMALLINT NOT NULL DEFAULT 255 COMMENT '排序，越小越靠前' AFTER `type`;

# 18:16 2021/8/24
ALTER TABLE `slides`
	COMMENT='广告图、轮播图等';
RENAME TABLE `slides` TO `advertisings`;

# 23:05 ‎2021/‎08/‎24
ALTER TABLE `advertisings`
	CHANGE COLUMN `agent_id` `agent_id` INT(11) NOT NULL COMMENT '发布者ID' AFTER `id`,
	ADD COLUMN `display` TINYINT NOT NULL DEFAULT 0 COMMENT '显示位置，0:轮播图；1:首页横屏广告；2:瀑布流内嵌广告；' AFTER `url`;

# 23:56 ‎2021/‎08/‎24
ALTER TABLE `agent_products`
	ADD INDEX `sale` (`sale`),
	ADD INDEX `category_id` (`category_id`);

# 0:24 ‎2021/‎08/‎25
ALTER TABLE `specials`
	DROP COLUMN `picture_ad`;

# 14:15 2021/8/25
ALTER TABLE `messages`
	DROP COLUMN `is_read`;

CREATE TABLE `message_reads` (
	`id` INT(10) NOT NULL COMMENT '消息ID，message_id',
	`user_id` INT(10) NOT NULL COMMENT '用户ID，user_id',
	PRIMARY KEY (`id`, `user_id`) USING BTREE
)
COMMENT='消息已读状态记录，如果含有记录，说明已读，否则未读'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;

# 14:34 2021/8/25
ALTER TABLE `agent_products`
	ADD COLUMN `is_rec` TINYINT NOT NULL DEFAULT 0 COMMENT '是否推荐，推荐后在我的下文显示，0:未推荐；1:推荐；' AFTER `verifier`;

# 16:35 2021/8/25
ALTER TABLE `agent_products`
    ADD COLUMN `type` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '0:单品销售；1:组合销售；' AFTER `is_rec`,
	ADD COLUMN `title` VARCHAR(255) NOT NULL COMMENT '标题' COLLATE 'utf8_general_ci' AFTER `type`,
	ADD COLUMN `pictures` TEXT NOT NULL COMMENT '产品图片，可能有多张，JSON格式' COLLATE 'utf8_general_ci' AFTER `title`,
	ADD COLUMN `know` TEXT NULL DEFAULT NULL COMMENT '旅客须知' COLLATE 'utf8_general_ci' AFTER `pictures`,
	ADD COLUMN `content` MEDIUMTEXT NULL DEFAULT NULL COMMENT '产品详情' COLLATE 'utf8_general_ci' AFTER `know`;

# 11:07 2021/8/26
DROP TABLE `waterfall_ads`;

# 19:25 2021/8/26
CREATE TABLE `pay_debugs` (
	`id` INT(10) NOT NULL AUTO_INCREMENT,
	`agent_id` INT(10) NOT NULL DEFAULT '0' COMMENT '代理商ID',
	`type` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '1:支付；2:退款；',
	`content` TEXT NULL DEFAULT NULL COMMENT '回调内容' COLLATE 'utf8_general_ci',
	`created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `agent_id` (`agent_id`) USING BTREE
)
COMMENT='微信支付回调记录'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

CREATE TABLE `agent_settings` (
	`id` INT(10) NOT NULL AUTO_INCREMENT,
	`agent_id` INT(10) NOT NULL COMMENT '代理商ID',
	`setting` JSON NOT NULL COMMENT '设置值，JSON格式',
	PRIMARY KEY (`id`) USING BTREE,
	UNIQUE INDEX `agent_id` (`agent_id`) USING BTREE
)
COMMENT='代理商设置配置'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

# 15:19 2021/8/27
ALTER TABLE `messages`
    ADD COLUMN `author` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '作者' COLLATE 'utf8_general_ci' AFTER `content`;
ALTER TABLE `notices`
	ADD COLUMN `author` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '作者' COLLATE 'utf8_general_ci' AFTER `sort`;
ALTER TABLE `articles`
	ADD COLUMN `agent_product_ids` TEXT NULL DEFAULT NULL COMMENT '绑定产品' AFTER `sort`;

# 9:28 2021/8/30
ALTER TABLE `agent_products`
	ADD COLUMN `deposit` DECIMAL(20,2) NOT NULL DEFAULT 0 COMMENT '订金' AFTER `content`,
	ADD COLUMN `deposit_timeout` INT NOT NULL DEFAULT 0 COMMENT '订金支付超时时间，单位：分钟' AFTER `deposit`,
	ADD COLUMN `earnest` DECIMAL(20,2) NOT NULL DEFAULT '0' COMMENT '定金' AFTER `deposit_timeout`,
	ADD COLUMN `earnest_timeout` INT NOT NULL DEFAULT 0 COMMENT '定金支付超时时间，单位：分钟' AFTER `earnest`;

# 10:58 2021/8/30
ALTER TABLE `orders`
	ADD COLUMN `timeout` TIMESTAMP NULL DEFAULT NULL COMMENT '订单超时时间，超过这个时间，订单将变为“已取消”' AFTER `verify_code`;

#################################################################
# 23:53 ‎2021/‎08/‎31
CREATE TABLE `order_product_items` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`order_id` INT(11) NOT NULL COMMENT '订单ID',
	`agent_id` INT(11) NOT NULL COMMENT '代理商ID',
	`agent_product_id` INT(11) NOT NULL COMMENT '代理商产品ID',
	`supplier_id` INT(11) NOT NULL COMMENT '供应商ID',
	`product_id` INT(11) NOT NULL COMMENT '供应商产品ID',
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `order_id_supplier_id` (`order_id`, `supplier_id`) USING BTREE
)
COMMENT='订单对应产品表'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

# 15:44 2021/9/2
ALTER TABLE `order_product_items`
	ADD COLUMN `num` INT(10) NOT NULL COMMENT '购买数量' AFTER `product_id`,
	ADD COLUMN `price` DECIMAL(20,2) NOT NULL COMMENT '销售价格' AFTER `num`;

# 16:42 2021/9/2
ALTER TABLE `agent_products`
	CHANGE COLUMN `type` `type` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '0:单品销售；1:组合销售；2:组团旅行社的云产品；' AFTER `is_rec`,
	ADD COLUMN `is_cloud` TINYINT NOT NULL DEFAULT 0 COMMENT '是否是（组团旅行社特有）云产品，。0:否；1:是；' AFTER `earnest_timeout`,
	ADD COLUMN `agent_cloud_pid` INT(10) NOT NULL DEFAULT '0' COMMENT '组团版旅行社的云产品ID' AFTER `is_cloud`,
    ADD INDEX `agent_cloud_pid` (`agent_cloud_pid`);
UPDATE `agent_products` ap SET `is_cloud`=1 WHERE EXISTS(SELECT 1 FROM `agents` WHERE `id`=ap.`agent_id` AND `type`=3);

# 18:15 2021/9/3
ALTER TABLE `orders`
	ADD COLUMN `agent_cloud_pid` INT NOT NULL DEFAULT 0 COMMENT '组团云产品ID' AFTER `verify_code`,
	ADD COLUMN `agent_cloud_price` DECIMAL(20,2) NOT NULL DEFAULT '0' COMMENT '组团云产品销售价格' AFTER `agent_cloud_pid`,
	ADD INDEX `agent_cloud_pid` (`agent_cloud_pid`);

# 9:26 2021/9/6
ALTER TABLE `user_money_logs`
	ADD COLUMN `out_trade_no` CHAR(24) NOT NULL DEFAULT '' COMMENT '发起支付时传给微信的订单号（格式：order_no-status）' AFTER `transaction_id`;

# 11:40 2021/9/6
ALTER TABLE `products`
	CHANGE COLUMN `status` `status` TINYINT(3) NOT NULL DEFAULT '1' COMMENT '-2:下架，-1:审核拒绝，0:未审核，1:上架' AFTER `sale`;
ALTER TABLE `agent_products`
	CHANGE COLUMN `status` `status` TINYINT(3) NOT NULL DEFAULT '1' COMMENT '-2:下架，-1:审核拒绝，0:未审核，1:上架' AFTER `guide_id`;

# 10:40 2021/9/7
ALTER TABLE `products`
	ADD COLUMN `type` TINYINT NOT NULL DEFAULT 0 COMMENT '0:旅游线路、1:洒店、2:景区、3:餐厅、4:车队、5:单项' AFTER `category_id`,
	ADD COLUMN `extends` JSON NULL DEFAULT NULL COMMENT '扩展字段，根据type不同，字段名不同' AFTER `verify_mobile`;

ALTER TABLE `suppliers`
	ADD COLUMN `public_type` VARCHAR(255) NOT NULL DEFAULT '[]' COMMENT '允许发布产品的模板' AFTER `rate`;

# 9:39 2021/9/8
ALTER TABLE `suppliers`
	CHANGE COLUMN `public_type` `publish_type` VARCHAR(255) NOT NULL DEFAULT '[]' COMMENT '允许发布产品的模板' COLLATE 'utf8_general_ci' AFTER `rate`;

# 15:19 2021/9/9
ALTER TABLE `orders`
	ADD COLUMN `pay_user_id` INT NOT NULL DEFAULT 0 COMMENT '支付用户的user_id（跳转到外部小程序支付时用到）' AFTER `agent_cloud_price`;



# 18:47 2021/9/11
ALTER TABLE `agents`
	CHANGE COLUMN `appid` `appid` VARCHAR(30) NULL COMMENT '微信AppID' COLLATE 'utf8_general_ci' AFTER `remember_token`,
	CHANGE COLUMN `appsecret` `appsecret` CHAR(32) NULL COMMENT '微信AppSecret' COLLATE 'utf8_general_ci' AFTER `appid`,
	CHANGE COLUMN `mchid` `mchid` VARCHAR(32) NULL COMMENT '微信支付mch_id' COLLATE 'utf8_general_ci' AFTER `appsecret`,
	CHANGE COLUMN `mchkey` `mchkey` CHAR(32) NULL COMMENT '微信支付key' COLLATE 'utf8_general_ci' AFTER `mchid`;

CREATE TABLE `mini_program_drafts` (
	`draft_id` INT(10) NOT NULL COMMENT '腾讯开放平台的草稿ID',
	`user_version` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '版本号' COLLATE 'utf8_general_ci',
	`user_desc` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '描述' COLLATE 'utf8_general_ci',
	`source_miniprogram_appid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '模板小程序APPID' COLLATE 'utf8_general_ci',
	`source_miniprogram` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '来源小程序' COLLATE 'utf8_general_ci',
	`developer` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '开发者' COLLATE 'utf8_general_ci',
	`create_time` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '草稿创建时间',
	`is_create_template` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '是否已创建模板，0:否，1:是',
	PRIMARY KEY (`draft_id`) USING BTREE
)
COMMENT='第三方平台草稿列表'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

CREATE TABLE `mini_program_events` (
	`id` BIGINT(19) NOT NULL AUTO_INCREMENT,
	`type` TINYINT(3) NOT NULL DEFAULT '0' COMMENT '0:授权事件接收；1:消息与事件接收',
	`response` TEXT NULL DEFAULT NULL COMMENT '所有请求信息' COLLATE 'utf8mb4_bin',
	`event` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
	`appid` VARCHAR(50) NULL DEFAULT NULL COMMENT 'msg_event时才会记录' COLLATE 'utf8mb4_bin',
	`created_at` TIMESTAMP NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE
)
COMMENT='第三方平台事件接收记录'
COLLATE='utf8mb4_bin'
ENGINE=InnoDB;

CREATE TABLE `mini_program_templates` (
	`template_id` INT(10) NOT NULL,
	`user_version` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '版本号' COLLATE 'utf8_general_ci',
	`user_desc` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '描述' COLLATE 'utf8_general_ci',
	`source_miniprogram_appid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '来源小程序' COLLATE 'utf8_general_ci',
	`source_miniprogram` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '模板小程序APPID' COLLATE 'utf8_general_ci',
	`developer` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '上传者微信昵称' COLLATE 'utf8_general_ci',
	`template_type` INT(10) NOT NULL DEFAULT '0' COMMENT '模板ID',
	`create_time` INT(10) UNSIGNED NOT NULL DEFAULT '0',
	PRIMARY KEY (`template_id`) USING BTREE
)
COMMENT='第三方平台模板列表'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

CREATE TABLE `mini_program_upload_logs` (
	`id` INT(10) NOT NULL AUTO_INCREMENT,
	`agent_id` INT(10) NOT NULL COMMENT '代理商ID',
	`appid` VARCHAR(50) NOT NULL COMMENT '代理商APPID' COLLATE 'utf8_general_ci',
	`user_version` VARCHAR(20) NOT NULL COMMENT '版本号' COLLATE 'utf8_general_ci',
	`template_id` INT(10) NOT NULL COMMENT '小程序template_id',
	`qrcode` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '小程序上传后获取到的二维码' COLLATE 'utf8_general_ci',
	`audit_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0' COMMENT '审核ID',
	`is_success` TINYINT(3) NOT NULL DEFAULT '-1' COMMENT '0:审核成功； 1:审核被拒绝； 2:审核中； 3:已撤回； 4:审核延后',
	`created_at` TIMESTAMP NULL DEFAULT NULL,
	`updated_at` TIMESTAMP NULL DEFAULT NULL,
	PRIMARY KEY (`id`) USING BTREE,
	INDEX `agent_id` (`agent_id`) USING BTREE
)
COMMENT='注册小程序日志'
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

# 9:29 2021/9/13
ALTER TABLE `agents`
	ADD COLUMN `credit_codes` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '统一社会信用代码' AFTER `company_name`,
	ADD COLUMN `legal_persona_name` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '法人姓名' AFTER `contact_phone`,
	ADD COLUMN `legal_persona_wechat` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '法人微信号' AFTER `legal_persona_name`;

# 17:02 2021/9/13
ALTER TABLE `user_money_logs`
	CHANGE COLUMN `money` `money` DECIMAL(20,2) NOT NULL COMMENT '变动金额，正数=平台收入，负数=平台支出' AFTER `agent_id`;
