
namespace Database\Migrations;

use Doctrine\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema as Schema;

class Version10000000000001 extends AbstractMigration
{
    /**
     * @param Schema $schema
     */
    public function up(Schema $schema): void
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('CREATE TABLE category_rel_distributor (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增ID\', category_id BIGINT NOT NULL COMMENT \'销售分类ID\', distributor_id BIGINT NOT NULL COMMENT \'店铺ID\', company_id BIGINT NOT NULL COMMENT \'公司ID\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), INDEX ix_category_id (category_id), INDEX ix_distributor_id (distributor_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'销售分类与店铺关联表\' ');
        $this->addSql('CREATE TABLE category_rel_main (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增ID\', category_id BIGINT NOT NULL COMMENT \'销售分类ID\', management_category_id BIGINT NOT NULL COMMENT \'管理分类ID\', company_id BIGINT NOT NULL COMMENT \'公司ID\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), INDEX ix_category_id (category_id), INDEX ix_management_category_id (management_category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'销售分类与管理分类关联表\' ');
        $this->addSql('CREATE TABLE chuanglansms_api_logs (id INT AUTO_INCREMENT NOT NULL COMMENT \'主键ID\', company_id INT DEFAULT 0 NOT NULL COMMENT \'公司id\', api_name VARCHAR(255) NOT NULL COMMENT \'接口名\', data_id VARCHAR(255) DEFAULT \'0\' NOT NULL COMMENT \'数据ID，订单id 等\', param_json LONGTEXT NOT NULL COMMENT \'请求内容\', return_json LONGTEXT DEFAULT NULL COMMENT \'请求返回内容\', api_status INT NOT NULL COMMENT \'接口状态；0 发起请求、1 请求成功、2 请求失败\', api_start_time INT NOT NULL COMMENT \'请求发起时间\', api_end_time INT NOT NULL COMMENT \'请求结束时间\', INDEX idx_company_id (company_id), INDEX idx_api_name (api_name), INDEX idx_data_id (data_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'接口日志表\' ');
        $this->addSql('CREATE TABLE chuanglansms_record (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', mobile VARCHAR(255) NOT NULL COMMENT \'手机号\', scene_id INT NOT NULL COMMENT \'场景ID\', task_id INT NOT NULL COMMENT \'任务ID\', template_id VARCHAR(255) NOT NULL COMMENT \'模板id\', sms_content VARCHAR(255) DEFAULT NULL COMMENT \'短信内容\', template_type VARCHAR(255) NOT NULL COMMENT \'短信类型:153：验证码;49：短信通知;52：推广短信;\', status VARCHAR(255) NOT NULL COMMENT \'发送状态:1-发送中;2-发送失败;3-发送成功\', biz_id VARCHAR(255) NOT NULL COMMENT \'发送回执ID\', callback_json LONGTEXT DEFAULT NULL COMMENT \'回调请求内容\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'短信发送记录\' ');
        $this->addSql('CREATE TABLE chuanglansms_scene (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', scene_name VARCHAR(255) NOT NULL COMMENT \'场景名称\', scene_title VARCHAR(255) DEFAULT NULL COMMENT \'场景title\', template_type VARCHAR(255) NOT NULL COMMENT \'短信类型: 153：验证码;49：短信通知;52：推广短信;\', status VARCHAR(255) NOT NULL COMMENT \'状态\', default_template VARCHAR(255) DEFAULT NULL COMMENT \'默认模板\', variables LONGTEXT DEFAULT NULL COMMENT \'模板变量\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'场景表\' ');
        $this->addSql('CREATE TABLE chuanglansms_scene_item (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', scene_id INT NOT NULL COMMENT \'场景ID\', sign_id INT NOT NULL COMMENT \'签名ID\', sign_name VARCHAR(255) NOT NULL COMMENT \'签名名称\', template_id INT NOT NULL COMMENT \'模板ID\', template_content LONGTEXT NOT NULL COMMENT \'模板内容\', status INT NOT NULL COMMENT \'0-未启用;1-已启用\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'场景实例表\' ');
        $this->addSql('CREATE TABLE chuanglansms_sign (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', sign_name VARCHAR(20) NOT NULL COMMENT \'签名名称\', sign_type VARCHAR(255) NOT NULL COMMENT \'短信签名类型: 153：验证码;49：短信通知;52：推广短信;\', sign_source VARCHAR(2) NOT NULL COMMENT \'签名来源\', remark VARCHAR(255) NOT NULL COMMENT \'签名申请说明\', sign_file LONGTEXT DEFAULT NULL COMMENT \'资质证明\', delegate_file LONGTEXT DEFAULT NULL COMMENT \'委托授权书\', status VARCHAR(2) NOT NULL COMMENT \'审核状态:0-审核中;1-审核通过;2-审核失败\', reason VARCHAR(255) DEFAULT NULL COMMENT \'审核备注\', is_online INT DEFAULT 0 NOT NULL COMMENT \'是否上线 默认为0, 备注：1 已上线 0 未上线\', sign_id INT NOT NULL COMMENT \'创蓝签名id \', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), INDEX idx_sign_id (sign_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'短信签名表\' ');
        $this->addSql('CREATE TABLE chuanglansms_task (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', task_name VARCHAR(255) NOT NULL COMMENT \'任务名称\', sign_id INT NOT NULL COMMENT \'签名ID\', template_id INT NOT NULL COMMENT \'模板id\', template_name VARCHAR(255) NOT NULL COMMENT \'模板名称\', user_id LONGTEXT NOT NULL COMMENT \'会员id\', status VARCHAR(255) NOT NULL COMMENT \'发送状态:1-等待中;2-发送成功;3-发送失败;4-已撤销\', send_at INT NOT NULL COMMENT \'发送时间\', total_num INT NOT NULL COMMENT \'号码数量\', failed_num INT NOT NULL COMMENT \'失败号码数量\', is_send INT NOT NULL COMMENT \'是否已发送\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'短信群发任务\' ');
        $this->addSql('CREATE TABLE chuanglansms_template (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'模板ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', template_type VARCHAR(255) NOT NULL COMMENT \'短信类型: 153：验证码;49：短信通知;52：推广短信;\', template_name VARCHAR(255) NOT NULL COMMENT \'模板名称\', remark VARCHAR(255) NOT NULL COMMENT \'模板申请说明\', template_content LONGTEXT NOT NULL COMMENT \'模板内容\', scene_id INT NOT NULL COMMENT \'短信场景\', template_id INT DEFAULT NULL COMMENT \'三方模板id\', status VARCHAR(255) NOT NULL COMMENT \'审核状态:0-审核中;1-审核通过;2-审核失败\', reason VARCHAR(255) DEFAULT NULL COMMENT \'审核备注\', related_sign_name VARCHAR(20) DEFAULT NULL COMMENT \'关联签名名称\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'模板表\' ');
        $this->addSql('CREATE TABLE chuanglansms_username (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id BIGINT NOT NULL COMMENT \'公司id\', username VARCHAR(255) NOT NULL COMMENT \'username\', account VARCHAR(255) NOT NULL COMMENT \'account\', password VARCHAR(255) NOT NULL COMMENT \'password\', sms_password VARCHAR(255) NOT NULL COMMENT \'sms_password\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'username表\' ');
        $this->addSql('CREATE TABLE distribution_distributor_category (id BIGINT AUTO_INCREMENT NOT NULL, company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', pid BIGINT DEFAULT 0 NOT NULL COMMENT \'父级分类id\', category_name VARCHAR(50) DEFAULT \'\' NOT NULL COMMENT \'分类名称\', is_active SMALLINT DEFAULT 1 COMMENT \'是否可用 1:启用,2:禁用\', sort_num INT DEFAULT 0 COMMENT \'分类排序\', valid_shop_num INT DEFAULT 0 COMMENT \'有效的店铺数量\', created bigint NOT NULL, updated bigint NOT NULL, INDEX ix_regionauth_id (regionauth_id), INDEX ix_category_name (category_name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'店铺分类表\' ');
        $this->addSql('CREATE TABLE distribution_distributor_change_logs (id BIGINT AUTO_INCREMENT NOT NULL, distributor_id BIGINT NOT NULL, company_id BIGINT NOT NULL, act_type VARCHAR(15) DEFAULT \'\' NOT NULL COMMENT \'操作类型(店铺审核，店铺编辑)\', log_content VARCHAR(100) DEFAULT \'\' NOT NULL COMMENT \'操作内容(店铺数据创建)\', log_items LONGTEXT DEFAULT NULL COMMENT \'操作项\', operator_id BIGINT DEFAULT 0 NOT NULL COMMENT \'操作人ID\', operator VARCHAR(50) DEFAULT \'\' NOT NULL COMMENT \'操作人\', created bigint NOT NULL, updated bigint NOT NULL, INDEX idx_distributor_id (distributor_id), INDEX idx_created (created), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'店铺变更日志表\' ');
        $this->addSql('CREATE TABLE items_change_log (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', operator_id BIGINT DEFAULT NULL COMMENT \'操作员Id\', item_id BIGINT NOT NULL COMMENT \'商品ID\', goods_id BIGINT DEFAULT NULL COMMENT \'商品Id\', operator_type VARCHAR(255) NOT NULL COMMENT \'操作类型, \', content VARCHAR(255) NOT NULL COMMENT \'变更内容, \', params JSON DEFAULT NULL COMMENT \'变更参数(DC2Type:json_array)\', created INT NOT NULL, updated INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'商品信息变更日志\' ');
        $this->addSql('CREATE TABLE items_ranking (id INT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id INT NOT NULL COMMENT \'公司ID\', regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域ID\', name VARCHAR(100) NOT NULL COMMENT \'名称\', intro VARCHAR(255) DEFAULT NULL COMMENT \'简介\', sort INT DEFAULT 0 NOT NULL COMMENT \'排序\', start_time INT NOT NULL COMMENT \'开始时间\', end_time INT NOT NULL COMMENT \'结束时间\', cover VARCHAR(255) DEFAULT NULL COMMENT \'封面图\', background VARCHAR(255) DEFAULT NULL COMMENT \'背景图\', rank_by VARCHAR(20) DEFAULT \'hot\' NOT NULL COMMENT \'排序规则\', num INT DEFAULT 10 NOT NULL COMMENT \'展示数量\', apply_scope VARCHAR(20) DEFAULT \'main_category\' NOT NULL COMMENT \'适用范围\', scope_id INT NOT NULL COMMENT \'适用范围ID\', top1_intro VARCHAR(255) DEFAULT NULL COMMENT \'top1推荐理由\', top2_intro VARCHAR(255) DEFAULT NULL COMMENT \'top2推荐理由\', top3_intro VARCHAR(255) DEFAULT NULL COMMENT \'top3推荐理由\', latest_rank_time INT DEFAULT 0 NOT NULL COMMENT \'最后更新排名时间\', created INT NOT NULL, updated INT DEFAULT NULL, INDEX ix_company_id (company_id), INDEX ix_regionauth_id (regionauth_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'商品排行榜\' ');
        $this->addSql('CREATE TABLE items_ranking_list (id INT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id INT NOT NULL COMMENT \'公司ID\', regionauth_id INT NOT NULL COMMENT \'区域ID\', ranking_id INT NOT NULL COMMENT \'排行榜ID\', item_id INT NOT NULL COMMENT \'商品ID\', ranking INT NOT NULL COMMENT \'排名\', score INT NOT NULL COMMENT \'得分\', INDEX ix_company_id (company_id), INDEX ix_regionauth_id (regionauth_id), INDEX ix_ranking_id (ranking_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'商品排行榜列表\' ');
        $this->addSql('CREATE TABLE items_sync (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', store_code VARCHAR(255) NOT NULL COMMENT \'门店编码\', customer_store_code VARCHAR(255) NOT NULL COMMENT \'门店编码\', spu_code VARCHAR(255) NOT NULL COMMENT \'商品编码\', supplier_code VARCHAR(255) NOT NULL COMMENT \'供应商编码\', sync_status INT DEFAULT 0 NOT NULL COMMENT \'提货时间类型 0:待同步 1:同步成功 2:同步失败 \', sync_fail_reason VARCHAR(255) DEFAULT NULL COMMENT \'同步失败的原因\', created bigint NOT NULL, updated bigint NOT NULL, INDEX ix_company_id (company_id), INDEX ix_store_code (store_code), INDEX ix_spu_code (spu_code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'商品同步表\' ');
        $this->addSql('CREATE TABLE items_view_num (goods_id BIGINT NOT NULL COMMENT \'产品ID\', distributor_id BIGINT NOT NULL COMMENT \'店铺ID\', page_view INT DEFAULT 0 NOT NULL COMMENT \'PV\', PRIMARY KEY(goods_id, distributor_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'商品访问统计表\' ');
        $this->addSql('CREATE TABLE kaquan_card_change_logs (id BIGINT AUTO_INCREMENT NOT NULL, card_id BIGINT NOT NULL, company_id BIGINT NOT NULL, act_type VARCHAR(15) DEFAULT \'\' NOT NULL COMMENT \'操作类型(创建优惠券模板，更新优惠券模板，审批)\', log_content VARCHAR(100) DEFAULT \'\' NOT NULL COMMENT \'操作内容(店铺数据创建)\', log_items LONGTEXT DEFAULT NULL COMMENT \'操作项\', operator_id BIGINT DEFAULT 0 NOT NULL COMMENT \'操作人ID\', operator VARCHAR(50) DEFAULT \'\' NOT NULL COMMENT \'操作人\', created bigint NOT NULL, updated bigint NOT NULL, INDEX idx_card_id (card_id), INDEX idx_created (created), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'优惠券变更日志表\' ');
        $this->addSql('CREATE TABLE kaquan_card_snapshot (id BIGINT AUTO_INCREMENT NOT NULL, card_id BIGINT NOT NULL, company_id BIGINT NOT NULL, md5_key VARCHAR(64) DEFAULT \'\' NOT NULL COMMENT \'唯一ID\', snapshot_data LONGTEXT NOT NULL COMMENT \'快照数据\', is_check BIGINT DEFAULT 0 NOT NULL COMMENT \'是否审核过\', created bigint NOT NULL, updated bigint NOT NULL, INDEX idx_card_id (card_id), INDEX idx_created (created), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'优惠券快照表\' ');
        $this->addSql('CREATE TABLE kaquan_coupon_change_logs (id BIGINT AUTO_INCREMENT NOT NULL, user_id BIGINT NOT NULL COMMENT \'用户的唯一标识\', code VARCHAR(30) NOT NULL COMMENT \'卡券 code 序列号\', company_id BIGINT NOT NULL, act_type VARCHAR(20) DEFAULT \'\' NOT NULL COMMENT \'操作类型\', log_content VARCHAR(250) DEFAULT \'\' NOT NULL COMMENT \'操作内容(店铺数据创建)\', operator_id BIGINT DEFAULT 0 NOT NULL COMMENT \'操作人ID\', operator VARCHAR(50) DEFAULT \'\' NOT NULL COMMENT \'操作人\', created bigint NOT NULL, updated bigint NOT NULL, INDEX idx_code (code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'优惠券日志\' ');
        $this->addSql('CREATE TABLE member_cdp_tag (id INT AUTO_INCREMENT NOT NULL COMMENT \'主键ID\', segment_id VARCHAR(50) NOT NULL COMMENT \'人群包id\', group_id INT NOT NULL COMMENT \'人群分组id\', segment_name VARCHAR(100) NOT NULL COMMENT \'人群名，如：高价值用户\', group_name VARCHAR(100) NOT NULL COMMENT \'人群分组分组名，如：京津小镇人群\', cover_count INT NOT NULL COMMENT \'人群包覆盖人数\', status INT DEFAULT 1 NOT NULL COMMENT \'状态：1-可用，0-不可用\', create_time VARCHAR(255) NOT NULL COMMENT \'创建时间\', update_time VARCHAR(255) NOT NULL COMMENT \'更新时间\', type SMALLINT DEFAULT 1 NOT NULL COMMENT \'人群类型：1-离线，2-实时\', insert_time INT NOT NULL COMMENT \'插入时间\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
        $this->addSql('CREATE TABLE member_cdp_tagdetail (id INT AUTO_INCREMENT NOT NULL COMMENT \'主键ID\', segment_id VARCHAR(50) NOT NULL COMMENT \'人群包id\', operate_type VARCHAR(10) NOT NULL COMMENT \'操作类型：add-新增，delete-移除\', member_id VARCHAR(50) NOT NULL COMMENT \'会员id\', cover_count INT NOT NULL COMMENT \'人群包覆盖人数\', timestamp BIGINT NOT NULL COMMENT \'投递时间戳\', version VARCHAR(50) NOT NULL COMMENT \'版本\', is_deleted SMALLINT DEFAULT 0 NOT NULL COMMENT \'是否删除 0:未删除 1:已删除\', insert_time DATETIME NOT NULL COMMENT \'插入时间\', INDEX idx_segment_id (segment_id), INDEX idx_operate_type (operate_type), INDEX idx_member_id (member_id), INDEX idx_timestamp (timestamp), INDEX idx_version (version), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'kafka人群包标签详情表\' ');
        $this->addSql('CREATE TABLE members_log (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'主键ID\', operation_type VARCHAR(50) NOT NULL COMMENT \'操作类型：会员激活/注册、会员信息更新、短信订阅\', modified_field VARCHAR(255) DEFAULT NULL COMMENT \'修改项\', before_value VARCHAR(255) DEFAULT NULL COMMENT \'修改前值\', after_value VARCHAR(255) DEFAULT NULL COMMENT \'修改后值\', operator VARCHAR(50) NOT NULL COMMENT \'操作人\', operation_time INT NOT NULL COMMENT \'操作时间\', remark VARCHAR(255) DEFAULT NULL COMMENT \'备注\', user_id BIGINT NOT NULL COMMENT \'用户ID\', update_params LONGTEXT DEFAULT NULL COMMENT \'修改内容JSON串\', INDEX idx_user_id (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'会员日志表\' ');
        $this->addSql('CREATE TABLE middle_members (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'会员ID\', code VARCHAR(255) DEFAULT NULL COMMENT \'会员编码\', oldcode VARCHAR(255) DEFAULT NULL COMMENT \'旧会员编码\', mobile VARCHAR(255) DEFAULT NULL COMMENT \'手机号\', name VARCHAR(255) DEFAULT NULL COMMENT \'会员姓名\', sex INT DEFAULT NULL COMMENT \'性别\', birthday VARCHAR(255) DEFAULT NULL COMMENT \'生日\', province VARCHAR(255) DEFAULT NULL COMMENT \'省份\', city VARCHAR(255) DEFAULT NULL COMMENT \'城市\', county VARCHAR(255) DEFAULT NULL COMMENT \'区县\', grade VARCHAR(255) DEFAULT NULL COMMENT \'会员等级\', regtime DATETIME DEFAULT NULL COMMENT \'注册时间\', regshop VARCHAR(255) DEFAULT NULL COMMENT \'注册店铺\', regsource VARCHAR(255) DEFAULT NULL COMMENT \'注册来源\', bonus VARCHAR(255) DEFAULT NULL COMMENT \'积分\', status INT DEFAULT 0 NOT NULL COMMENT \'状态\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'会员中间表\' ');
        $this->addSql('CREATE TABLE mob_api_log (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT DEFAULT 0 NOT NULL COMMENT \'公司id\', log_key VARCHAR(50) NOT NULL COMMENT \'msg_id\', api_type VARCHAR(30) DEFAULT \'\' NOT NULL COMMENT \'日志同步类型\', api_url VARCHAR(200) DEFAULT \'\' NOT NULL COMMENT \'接口地址\', params LONGTEXT DEFAULT NULL COMMENT \'请求参数\', result LONGTEXT DEFAULT NULL COMMENT \'返回数据\', status VARCHAR(15) DEFAULT \'running\' NOT NULL COMMENT \'状态：running,success,fail\', create_time DATETIME DEFAULT NULL COMMENT \'创建时间\', update_time DATETIME DEFAULT NULL COMMENT \'更新时间\', INDEX idx_log_key (log_key), INDEX idx_create_time (create_time), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'Mob接口日志\' ');
        $this->addSql('CREATE TABLE open_api_logs (id INT AUTO_INCREMENT NOT NULL COMMENT \'主键ID\', company_id INT DEFAULT 0 NOT NULL COMMENT \'公司id\', api_name VARCHAR(255) NOT NULL COMMENT \'接口名\', data_id VARCHAR(255) DEFAULT \'0\' NOT NULL COMMENT \'数据ID，订单id 等\', param_json LONGTEXT NOT NULL COMMENT \'请求内容\', return_json LONGTEXT DEFAULT NULL COMMENT \'请求返回内容\', api_status INT NOT NULL COMMENT \'接口状态；0 发起请求、1 请求成功、2 请求失败\', api_start_time INT NOT NULL COMMENT \'请求发起时间\', api_end_time INT NOT NULL COMMENT \'请求结束时间\', INDEX idx_company_id (company_id), INDEX idx_api_name (api_name), INDEX idx_data_id (data_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'OpenApi请求日志表\' ');
        $this->addSql('CREATE TABLE order_freight_fee (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', order_id BIGINT NOT NULL COMMENT \'订单号\', regionauth_id INT NOT NULL COMMENT \'区域ID\', distributor_id INT NOT NULL COMMENT \'店铺ID\', freight_fee INT DEFAULT 0 NOT NULL COMMENT \'支付运费金额\', ship_template_name VARCHAR(50) DEFAULT \'\' COMMENT \'运费模板名称\', ship_template_id INT DEFAULT 0 NOT NULL COMMENT \'运费模板ID\', ship_price_model VARCHAR(20) DEFAULT NULL COMMENT \'运费模板计费方式(single 单店计费, combine 多店合并计费)\', shop_code VARCHAR(20) DEFAULT \'\' COMMENT \'店铺编号\', pay_method VARCHAR(20) NOT NULL COMMENT \'支付方式\', order_create_time INT NOT NULL COMMENT \'下单时间\', pay_time INT DEFAULT NULL COMMENT \'支付时间\', order_status INT DEFAULT 0 NOT NULL COMMENT \'订单状态(1 订单完成;2 未支付;3 部分付款;4 等待拼团成功;5 已支付;6 已取消;7 待用户收货)\', refund_status INT DEFAULT 0 NOT NULL COMMENT \'退款状态\', refund_bn VARCHAR(50) DEFAULT NULL COMMENT \'退款申请单号\', aftersales_bn BIGINT DEFAULT NULL COMMENT \'售后单号\', refund_time INT DEFAULT NULL COMMENT \'退款时间\', refund_shipping_fee INT DEFAULT 0 COMMENT \'已退运费金额\', create_time INT NOT NULL COMMENT \'订单创建时间\', update_time INT DEFAULT NULL COMMENT \'订单更新时间\', INDEX idx_order_id (order_id), INDEX idx_order_status (order_status), INDEX idx_regionauth_id (regionauth_id), INDEX idx_distributor_id (distributor_id), INDEX idx_pay_time (pay_time), INDEX idx_refund_time (refund_time), INDEX idx_ship_template_id (ship_template_id), INDEX idx_order_create_time (order_create_time), INDEX idx_refund_bn (refund_bn), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'订单运费表\' ');
        $this->addSql('CREATE TABLE orders_aftersale_approval_rule (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT NULL COMMENT \'区域id\', rule_type VARCHAR(32) DEFAULT NULL COMMENT \'规则类型\', regionauth_name VARCHAR(255) DEFAULT NULL COMMENT \'区域名称\', distributor_id BIGINT DEFAULT NULL COMMENT \'店铺id\', distributor_name VARCHAR(255) DEFAULT NULL COMMENT \'店铺名称\', refund_amount_limit INT DEFAULT 0 NOT NULL COMMENT \'申请退款金额上限，以分为单位\', aftersale_reason VARCHAR(1000) DEFAULT NULL COMMENT \'售后原因，多个原因用英文逗号分隔\', status INT DEFAULT 1 NOT NULL COMMENT \'状态：0-禁用，1-启用\', create_time INT NOT NULL COMMENT \'创建时间\', update_time INT DEFAULT NULL COMMENT \'更新时间\', INDEX idx_company_id (company_id), INDEX idx_regionauth_id (regionauth_id), INDEX idx_distributor_id (distributor_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'售后审批规则配置表\' ');
        $this->addSql('CREATE TABLE orders_invoice (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增id\', invoice_apply_bn VARCHAR(64) NOT NULL COMMENT \'发票申请单号\', user_id BIGINT NOT NULL COMMENT \'用户id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT NULL COMMENT \'区域id\', order_id VARCHAR(255) NOT NULL COMMENT \'订单id，多订单以英文逗号分隔\', invoice_type VARCHAR(20) NOT NULL COMMENT \'开票类型，企业enterprise,和个人individual\', company_title VARCHAR(255) NOT NULL COMMENT \'公司抬头\', company_tax_number VARCHAR(64) DEFAULT NULL COMMENT \'公司税号\', company_address VARCHAR(255) DEFAULT NULL COMMENT \'公司地址\', company_telephone VARCHAR(20) DEFAULT NULL COMMENT \'公司电话\', bank_name VARCHAR(255) DEFAULT NULL COMMENT \'开户银行\', bank_account VARCHAR(64) DEFAULT NULL COMMENT \'开户账号\', email VARCHAR(255) DEFAULT NULL COMMENT \'电子邮箱\', mobile VARCHAR(20) DEFAULT NULL COMMENT \'手机号码\', invoice_status VARCHAR(20) DEFAULT \'pending\' NOT NULL COMMENT \'开票状态：待开票：pending，开票中：inProgress，开票成功：success，已作废：waste，开票失败：failed\', invoice_amount INT DEFAULT 0 COMMENT \'开票金额，以分为单位\', invoice_file_url VARCHAR(255) DEFAULT NULL COMMENT \'发票文件地址\', invoice_method VARCHAR(20) DEFAULT \'online\' NOT NULL COMMENT \'开票类型：线上和线下\', invoice_source VARCHAR(20) NOT NULL COMMENT \'开票来源：user客户端,oms\', remark VARCHAR(255) DEFAULT NULL COMMENT \'备注\', is_oms INT DEFAULT 0 NOT NULL COMMENT \'是否推送OMS，0是未推送，1是已推送\', create_time INT NOT NULL COMMENT \'创建时间\', update_time INT DEFAULT NULL COMMENT \'更新时间\', INDEX idx_invoice_apply_bn (invoice_apply_bn), INDEX idx_company_id (company_id), INDEX idx_user_id (user_id), INDEX idx_order_id (order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'订单发票表\' ');
        $this->addSql('CREATE TABLE orders_invoice_item (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增id\', user_id BIGINT NOT NULL COMMENT \'用户id\', company_id BIGINT NOT NULL COMMENT \'公司id\', invoice_id BIGINT NOT NULL COMMENT \'关联发票表id\', invoice_apply_bn VARCHAR(64) NOT NULL COMMENT \'发票申请单号\', order_id VARCHAR(64) NOT NULL COMMENT \'订单号\', oid VARCHAR(64) DEFAULT NULL COMMENT \'OMS系统订单ID\', item_name VARCHAR(255) NOT NULL COMMENT \'商品名称\', item_bn VARCHAR(64) DEFAULT NULL COMMENT \'商品编码\', main_img VARCHAR(255) DEFAULT NULL COMMENT \'商品主图\', spec_info VARCHAR(255) DEFAULT NULL COMMENT \'商品规格\', num INT NOT NULL COMMENT \'数量\', amount INT NOT NULL COMMENT \'金额，以分为单位\', create_time INT NOT NULL COMMENT \'创建时间\', update_time INT DEFAULT NULL COMMENT \'更新时间\', INDEX idx_invoice_id (invoice_id), INDEX idx_invoice_apply_bn (invoice_apply_bn), INDEX idx_company_id (company_id), INDEX idx_user_id (user_id), INDEX idx_order_id (order_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'订单发票商品表\' ');
        $this->addSql('CREATE TABLE orders_invoice_log (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增id\', invoice_id BIGINT NOT NULL COMMENT \'关联发票表id\', operator_type VARCHAR(20) NOT NULL COMMENT \'操作类型\', user_id BIGINT DEFAULT NULL COMMENT \'用户id\', operator_id BIGINT DEFAULT NULL COMMENT \'操作人id\', operator_content JSON DEFAULT NULL COMMENT \'操作内容(DC2Type:json_array)\', create_time INT NOT NULL COMMENT \'创建时间\', update_time INT DEFAULT NULL COMMENT \'更新时间\', INDEX idx_invoice_id (invoice_id), INDEX idx_user_id (user_id), INDEX idx_operator_id (operator_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'订单发票日志表\' ');
        $this->addSql('CREATE TABLE orders_invoices (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'自增id\', invoice_id BIGINT NOT NULL COMMENT \'关联发票表id\', company_id BIGINT NOT NULL COMMENT \'公司id\', invoice_type VARCHAR(20) NOT NULL COMMENT \'开票类型，红red,和蓝blue\', invoice_no VARCHAR(255) DEFAULT NULL COMMENT \'发票号码\', invoice_code VARCHAR(255) DEFAULT NULL COMMENT \'发票代码\', invoice_time VARCHAR(255) DEFAULT NULL COMMENT \'开票时间\', create_time INT NOT NULL COMMENT \'创建时间\', update_time INT DEFAULT NULL COMMENT \'更新时间\', INDEX idx_invoice_id (invoice_id), INDEX idx_company_id (company_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'发票表\' ');
        $this->addSql('CREATE TABLE pages_ad_place (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'设置id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', use_bound INT DEFAULT 0 COMMENT \'适用范围: 0:全部,1:指定店铺\', ad_type VARCHAR(20) NOT NULL COMMENT \'广告类型：弹窗=>popup，轮播图=>carousel\', name VARCHAR(100) NOT NULL COMMENT \'广告位名称\', pages VARCHAR(30) NOT NULL COMMENT \'关联页面\', start_time BIGINT NOT NULL COMMENT \'开始时间\', end_time BIGINT NOT NULL COMMENT \'结束时间\', setting LONGTEXT DEFAULT NULL COMMENT \'设置\', auto_play INT DEFAULT 0 NOT NULL COMMENT \'自动播放\', play_interval INT DEFAULT 3 NOT NULL COMMENT \'播放间隔时间\', auto_close INT DEFAULT 0 NOT NULL COMMENT \'自动关闭\', close_delay INT DEFAULT 10 NOT NULL COMMENT \'关闭延迟时间\', source_id BIGINT DEFAULT 0 NOT NULL COMMENT \'添加者ID: 如店铺ID\', created INT NOT NULL, updated INT DEFAULT NULL, audit_status VARCHAR(255) DEFAULT \'submitting\' NOT NULL COMMENT \'审核状态 submitting待提交 processing审核中 approved成功 rejected审核拒绝\', audit_remark VARCHAR(255) DEFAULT NULL COMMENT \'审核备注\', sort INT DEFAULT 0 NOT NULL COMMENT \'排序\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'广告位设置\' ');
        $this->addSql('CREATE TABLE pages_ad_place_rel_distributors (company_id BIGINT NOT NULL COMMENT \'公司id\', ad_place_id BIGINT NOT NULL COMMENT \'广告位id\', distributor_id BIGINT NOT NULL COMMENT \'店铺id\', PRIMARY KEY(company_id, ad_place_id, distributor_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'广告位与店铺关联表\' ');
        $this->addSql('CREATE TABLE pages_ad_place_rel_member_tags (company_id BIGINT NOT NULL COMMENT \'公司id\', ad_place_id BIGINT NOT NULL COMMENT \'广告位id\', tag_id BIGINT NOT NULL COMMENT \'人群标签id\', PRIMARY KEY(company_id, ad_place_id, tag_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'广告位与人群标签关联表\' ');
        $this->addSql('CREATE TABLE pages_side_bar (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'设置id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', name VARCHAR(100) NOT NULL COMMENT \'名称\', pages VARCHAR(100) NOT NULL COMMENT \'关联页面\', disabled TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否禁用\', setting LONGTEXT DEFAULT NULL COMMENT \'设置\', created INT NOT NULL, updated INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'侧边栏设置\' ');
        $this->addSql('CREATE TABLE polyv_anchor (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id VARCHAR(255) NOT NULL COMMENT \'企业ID\', anchor_account VARCHAR(64) NOT NULL COMMENT \'主播账号\', regionauth_id BIGINT DEFAULT NULL COMMENT \'区域（关联区域表的id字段）\', regionauth_name VARCHAR(50) DEFAULT NULL COMMENT \'地区名称\', distributor_id BIGINT DEFAULT NULL COMMENT \'店铺（关联店铺表的id字段）\', distributor_name VARCHAR(255) DEFAULT NULL COMMENT \'店铺名称\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), INDEX ix_regionauth_id (regionauth_id), INDEX ix_distributor_id (distributor_id), INDEX ix_anchor_account (anchor_account), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'主播账号表\' ');
        $this->addSql('CREATE TABLE polyv_channel (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', company_id VARCHAR(255) NOT NULL COMMENT \'企业ID\', polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\', polyv_user_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威用户ID\', name VARCHAR(255) DEFAULT NULL COMMENT \'直播名称\', cover_image_url VARCHAR(255) DEFAULT NULL COMMENT \'直播封面\', start_time BIGINT DEFAULT NULL COMMENT \'直播开始时间\', anchor_id BIGINT DEFAULT NULL COMMENT \'主播（关联主播账号表的id字段）\', anchor_account VARCHAR(64) NOT NULL COMMENT \'主播账号\', publisher VARCHAR(64) DEFAULT NULL COMMENT \'主持人\', regionauth_id BIGINT DEFAULT NULL COMMENT \'区域（关联区域表的id字段）\', regionauth_name VARCHAR(50) DEFAULT NULL COMMENT \'地区名称\', distributor_id BIGINT DEFAULT NULL COMMENT \'店铺（关联店铺表的id字段）\', sort INT DEFAULT 0 NOT NULL COMMENT \'商品排序\', new_scene VARCHAR(20) DEFAULT \'alone\' COMMENT \'直播场景 alone:活动营销;\', live_template VARCHAR(20) DEFAULT \'alone\' COMMENT \'直播模版 alone:纯视频;\', watch_template VARCHAR(20) DEFAULT \'\' COMMENT \'观看模板 portrait:竖屏;\', pure_rtc_enabled VARCHAR(1) DEFAULT \'Y\' COMMENT \'直播延迟Y：开启（无延迟），N：关闭（普通延迟）\', category_id BIGINT DEFAULT NULL COMMENT \'直播分类ID\', category_name VARCHAR(50) DEFAULT NULL COMMENT \'直播分类名称\', label_data LONGTEXT DEFAULT NULL COMMENT \'标签id数组\', watch_status VARCHAR(20) DEFAULT \'unStart\' NOT NULL COMMENT \'观看状态 live:直播中;playback:回放中;end:已结束;waiting:等待中;unStart:未开始\', audit_status VARCHAR(20) DEFAULT \'pending\' NOT NULL COMMENT \'审核状态 pending:待审核;pass:审核通过;reject:审核拒绝;updated_pending:已更新待审核;\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), INDEX ix_polyv_channel_id (polyv_channel_id), INDEX ix_name (name), INDEX ix_audit_status (audit_status), INDEX ix_regionauth_id (regionauth_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'直播表\' ');
        $this->addSql('CREATE TABLE polyv_channel_rel_coupon (channel_id BIGINT NOT NULL COMMENT \'频道ID\', rel_id BIGINT NOT NULL COMMENT \'关联ID\', company_id BIGINT NOT NULL COMMENT \'企业ID\', cover VARCHAR(255) DEFAULT NULL COMMENT \'封面图\', title VARCHAR(255) DEFAULT NULL COMMENT \'优惠券标题\', type VARCHAR(16) NOT NULL COMMENT \'卡券类型，可选值有，discount:折扣券;cash:满减券;gift:兑换券;new_gift:兑换券(新)\', rule LONGTEXT DEFAULT NULL COMMENT \'券规则\', expire_date_text VARCHAR(255) DEFAULT NULL COMMENT \'有效期\', polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\', polyv_product_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威商品id\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), PRIMARY KEY(channel_id, rel_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'直播关联优惠券表\' ');
        $this->addSql('CREATE TABLE polyv_channel_rel_coupon_package (channel_id BIGINT NOT NULL COMMENT \'频道ID\', rel_id BIGINT NOT NULL COMMENT \'关联ID\', company_id BIGINT NOT NULL COMMENT \'企业ID\', title VARCHAR(255) DEFAULT NULL COMMENT \'标题\', cover VARCHAR(255) DEFAULT NULL COMMENT \'封面图\', description LONGTEXT DEFAULT NULL COMMENT \'描述\', polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\', polyv_product_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威商品id\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), PRIMARY KEY(channel_id, rel_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'直播关联优惠券包表\' ');
        $this->addSql('CREATE TABLE polyv_channel_rel_items (channel_id BIGINT NOT NULL COMMENT \'频道（关联频道表的id字段）\', goods_id BIGINT NOT NULL COMMENT \'商品（关联商品表的goods_id字段）\', company_id BIGINT NOT NULL COMMENT \'企业ID\', item_id BIGINT NOT NULL COMMENT \'商品（关联商品表的item_id字段）\', item_name VARCHAR(255) DEFAULT NULL COMMENT \'商品名称\', polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\', polyv_product_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威商品id\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), PRIMARY KEY(channel_id, goods_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'直播关联商品表\' ');
        $this->addSql('CREATE TABLE polyv_channel_rel_pages (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', channel_id BIGINT NOT NULL COMMENT \'频道（关联频道表的id字段）\', rel_id BIGINT NOT NULL COMMENT \'关联id\', page_type VARCHAR(30) NOT NULL COMMENT \'页面类型\', company_id BIGINT NOT NULL COMMENT \'企业ID\', image VARCHAR(255) DEFAULT NULL COMMENT \'图片\', page_name VARCHAR(255) DEFAULT NULL COMMENT \'页面名称\', custom_name VARCHAR(255) DEFAULT NULL COMMENT \'自定义名称\', polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\', polyv_product_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威商品id\', created INT NOT NULL COMMENT \'创建时间\', updated INT DEFAULT NULL COMMENT \'更新时间\', INDEX ix_company_id (company_id), INDEX ux_channel_rel_page_type (channel_id, rel_id, page_type), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'直播关联页面表\' ');
        $this->addSql('CREATE TABLE promotions_activity_budgetcode (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', budget_code VARCHAR(50) DEFAULT NULL COMMENT \'budgetCode\', create_time INT DEFAULT NULL COMMENT \'添加时间\', INDEX ix_budget_code (budget_code), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'BudgetCode表\' ');
        $this->addSql('CREATE TABLE promotions_activity_collection (collection_id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域\', collection_name VARCHAR(255) NOT NULL COMMENT \'集合页名称\', company_id BIGINT NOT NULL COMMENT \'公司ID\', collection_desc VARCHAR(255) NOT NULL COMMENT \'营销活动描述\', share_title VARCHAR(255) NOT NULL COMMENT \'分享标题\', share_pic VARCHAR(255) NOT NULL COMMENT \'分享图片\', is_enabled TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否启用\', header_pic VARCHAR(255) NOT NULL COMMENT \'顶部背景图\', activity_type VARCHAR(255) NOT NULL COMMENT \'活动类型: limited_time_sale:限时特惠, groups:拼团\', create_time INT DEFAULT NULL COMMENT \'添加时间\', updated INT DEFAULT NULL, INDEX ix_regionauth_id (regionauth_id), INDEX ix_create_time (create_time), INDEX ix_collection_name (collection_name), INDEX ix_is_enabled (is_enabled), INDEX ix_activity_type (activity_type), PRIMARY KEY(collection_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'活动集合表\' ');
        $this->addSql('CREATE TABLE promotions_activity_collection_items (collection_item_id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', collection_id INT NOT NULL COMMENT \'关联集合页ID\', collection_name VARCHAR(255) NOT NULL COMMENT \'关联集合页名称\', relation_id INT NOT NULL COMMENT \'关联活动ID\', relation_name VARCHAR(255) NOT NULL COMMENT \'关联活动名称\', activity_type VARCHAR(255) NOT NULL COMMENT \'活动类型: limited_time_sale:限时特惠, groups:拼团\', INDEX ix_relation_id (relation_id), INDEX ix_collection_id (collection_id), PRIMARY KEY(collection_item_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'活动集合表\' ');
        $this->addSql('CREATE TABLE promotions_activity_log (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'主键ID\', promotion_type VARCHAR(255) DEFAULT NULL COMMENT \'营销类型: full_discount:满折,full_minus:满减,full_gift:满赠,self_select:任选优惠,plus_price_buy:加价购,member_preference:会员优先购,seckill:秒杀, limited_time_sale:限时特惠, specific_crowd:定向营销,groups:拼团\', operation_type VARCHAR(50) DEFAULT NULL COMMENT \'操作类型\', operator VARCHAR(50) DEFAULT NULL COMMENT \'操作人\', operation_time INT DEFAULT NULL COMMENT \'操作时间\', relation_id BIGINT DEFAULT NULL COMMENT \'关联的营销ID\', operation_content LONGTEXT DEFAULT NULL COMMENT \'操作内容\', change_details LONGTEXT DEFAULT NULL COMMENT \'变更详情(JSON格式)\', INDEX idx_relation_id (relation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'营销操作日志表\' ');
        $this->addSql('CREATE TABLE promotions_groups_rel_goods (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'关联id\', groups_activity_id BIGINT NOT NULL COMMENT \'拼团活动id\', item_id BIGINT NOT NULL COMMENT \'活动商品id\', item_type VARCHAR(255) DEFAULT \'normal\' NOT NULL COMMENT \'活动商品类型。可选值有 normal-实体类;services-服务类\', is_show TINYINT(1) DEFAULT \'1\' NOT NULL COMMENT \'查询列表是否显示\', item_spec_desc VARCHAR(255) DEFAULT NULL COMMENT \'商品规格描述\', company_id BIGINT NOT NULL COMMENT \'公司ID\', activity_start_time INT NOT NULL COMMENT \'开始时间\', activity_end_time INT NOT NULL COMMENT \'结束时间\', item_title VARCHAR(255) NOT NULL COMMENT \'活动商品名称\', item_pic LONGTEXT DEFAULT NULL COMMENT \'活动商品图片\', activity_price INT DEFAULT 0 NOT NULL COMMENT \'活动价格\', limit_num INT DEFAULT 0 NOT NULL COMMENT \'活动限购\', sort INT DEFAULT 0 NOT NULL COMMENT \'商品排序\', created INT NOT NULL, updated INT DEFAULT NULL, disabled TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否失效\', INDEX ix_company_id (company_id), INDEX ix_groups_activity_item_id (groups_activity_id, item_id), INDEX ix_item_type (item_type), INDEX ix_end_time (activity_end_time), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'拼团关联商品表\' ');
        $this->addSql('CREATE TABLE promotions_marketing_activity_finance (finance_id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', relation_id BIGINT NOT NULL COMMENT \'关联的营销id\', po_code VARCHAR(50) DEFAULT NULL COMMENT \'PO编码\', budget_code VARCHAR(50) DEFAULT NULL COMMENT \'budgetCode\', platform_ratio INT DEFAULT NULL COMMENT \'平台承担比例\', shop_ratio INT DEFAULT NULL COMMENT \'店铺承担比例\', create_time INT DEFAULT NULL COMMENT \'添加时间\', promotion_type VARCHAR(255) NOT NULL COMMENT \'营销类型: full_discount:满折,full_minus:满减,full_gift:满赠,self_select:任选优惠,plus_price_buy:加价购,member_preference:会员优先购,seckill:秒杀,limited_time_sale:限时特惠,specific_crowd:定向营销,groups:拼团\', INDEX ix_po_code (po_code), INDEX ix_budget_code (budget_code), PRIMARY KEY(finance_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'促销活动财务配置表\' ');
        $this->addSql('CREATE TABLE promotions_marketing_activity_member_tag (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'ID\', relation_id BIGINT NOT NULL COMMENT \'关联的营销id\', member_tag_id BIGINT NOT NULL COMMENT \'人群ID\', create_time INT DEFAULT NULL COMMENT \'添加时间\', promotion_type VARCHAR(255) NOT NULL COMMENT \'营销类型: full_discount:满折,full_minus:满减,full_gift:满赠,self_select:任选优惠,plus_price_buy:加价购,member_preference:会员优先购,seckill:秒杀,limited_time_sale限时特惠,specific_crowd:定向营销\', INDEX ix_member_tag_id (member_tag_id), INDEX ix_promotion_type (promotion_type), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'促销活动人群表\' ');
        $this->addSql('CREATE TABLE search_hot_keywords (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT NOT NULL COMMENT \'区域id\', keyword VARCHAR(255) NOT NULL COMMENT \'关键词\', keyword_type VARCHAR(10) NOT NULL COMMENT \'关键词类型，text:文本，image:图片\', color VARCHAR(10) DEFAULT \'default\' NOT NULL COMMENT \'文案颜色\', background VARCHAR(10) DEFAULT \'default\' NOT NULL COMMENT \'背景颜色\', icon VARCHAR(255) DEFAULT NULL COMMENT \'图标\', start_time BIGINT NOT NULL COMMENT \'开始时间\', end_time BIGINT NOT NULL COMMENT \'结束时间\', sort INT DEFAULT 0 NOT NULL COMMENT \'排序\', link_type VARCHAR(10) NOT NULL COMMENT \'跳转链接类型，url_link:h5链接，wx_path:小程序页面路径\', link_path VARCHAR(255) DEFAULT NULL COMMENT \'链接地址\', created INT NOT NULL, updated INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'热门关键词\' ');
        $this->addSql('CREATE TABLE search_no_result_ad_place (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT NOT NULL COMMENT \'区域id\', type VARCHAR(10) DEFAULT \'default\' NOT NULL COMMENT \'类型 default:默认 keyword:关键词\', keywords VARCHAR(255) DEFAULT NULL COMMENT \'关键词\', ad_pic VARCHAR(255) DEFAULT NULL COMMENT \'广告图片\', start_time BIGINT NOT NULL COMMENT \'开始时间\', end_time BIGINT NOT NULL COMMENT \'结束时间\', link_type VARCHAR(10) NOT NULL COMMENT \'跳转链接类型，url_link:h5链接，wx_path:小程序页面路径\', link_path VARCHAR(255) DEFAULT NULL COMMENT \'链接地址\', created INT NOT NULL, updated INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'无结果页配置\' ');
        $this->addSql('CREATE TABLE search_placeholder_text (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', text VARCHAR(255) NOT NULL COMMENT \'底纹词\', start_time BIGINT NOT NULL COMMENT \'开始时间\', end_time BIGINT NOT NULL COMMENT \'结束时间\', sort INT DEFAULT 0 NOT NULL COMMENT \'排序\', link_type VARCHAR(10) DEFAULT NULL COMMENT \'跳转链接类型，url_link:h5链接，wx_path:小程序页面路径\', link_path VARCHAR(255) DEFAULT NULL COMMENT \'链接地址\', created INT NOT NULL, updated INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'底纹词\' ');
        $this->addSql('CREATE TABLE search_placeholder_text_rel_member_tags (company_id BIGINT NOT NULL COMMENT \'公司id\', text_id BIGINT NOT NULL COMMENT \'底纹词id\', tag_id BIGINT NOT NULL COMMENT \'人群标签id\', PRIMARY KEY(company_id, text_id, tag_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'底纹词与人群标签关联表\' ');
        $this->addSql('CREATE TABLE search_synonyms (id BIGINT AUTO_INCREMENT NOT NULL COMMENT \'id\', company_id BIGINT NOT NULL COMMENT \'公司id\', synonyms VARCHAR(255) NOT NULL COMMENT \'同义词\', created INT NOT NULL, updated INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'同义词\' ');
        $this->addSql('DROP TABLE Hfpay_withdraw_set');
        $this->addSql('DROP TABLE custom_declare_order_result');
        $this->addSql('DROP TABLE hfpay_bank_card');
        $this->addSql('DROP TABLE hfpay_cash_record');
        $this->addSql('DROP TABLE hfpay_company_statistics_day');
        $this->addSql('DROP TABLE hfpay_distributor_statistics_day');
        $this->addSql('DROP TABLE hfpay_distributor_transaction_statistics');
        $this->addSql('DROP TABLE hfpay_enterapply');
        $this->addSql('DROP TABLE hfpay_ledger_config');
        $this->addSql('DROP TABLE hfpay_merchant_payment');
        $this->addSql('DROP TABLE hfpay_trade_record');
        $this->addSql('DROP TABLE item_keywords');
        $this->addSql('DROP TABLE order_profit_sharing');
        $this->addSql('DROP TABLE order_profit_sharing_details');
        $this->addSql('DROP TABLE promotions_marketing_activity_category');
        $this->addSql('DROP TABLE promotions_seckill_rel_category');
        $this->addSql('DROP TABLE supplier_goods');
        $this->addSql('DROP TABLE supplier_goods_attr');
        $this->addSql('ALTER TABLE aftersales ADD request_type VARCHAR(255) DEFAULT \'after\' NOT NULL COMMENT \'申请类型：before-售前，after-售后\', ADD refuse_proof JSON DEFAULT NULL COMMENT \'拒绝图片(DC2Type:json_array)\', ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\', ADD refund_time INT DEFAULT NULL COMMENT \'退款时间\', ADD disabled TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否删除。0:否；1:是\', ADD from_source VARCHAR(255) DEFAULT \'weapp_user\' NOT NULL COMMENT \'售后单提交来源\'');
        $this->addSql('CREATE INDEX idx_disabled ON aftersales (disabled)');
        $this->addSql('CREATE INDEX idx_request_type ON aftersales (request_type)');
        $this->addSql('ALTER TABLE aftersales_refund ADD request_type VARCHAR(255) DEFAULT \'after\' NOT NULL COMMENT \'申请类型：before-售前，after-售后\', ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\', ADD operator_id BIGINT DEFAULT 0 NOT NULL COMMENT \'强制完成交易操作人\', ADD offline_evidence VARCHAR(255) DEFAULT NULL COMMENT \'线下退款打款凭证\', DROP hf_order_id');
        $this->addSql('CREATE INDEX idx_request_type ON aftersales_refund (request_type)');
        $this->addSql('ALTER TABLE business_rep_user CHANGE create_time create_time bigint NOT NULL');
        $this->addSql('ALTER TABLE card_package ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD pic VARCHAR(500) DEFAULT \'\' COMMENT \'图片,主要用于直播关联券包后的直播间商品图片展示\'');
        $this->addSql('ALTER TABLE community_activity CHANGE activity_status activity_status VARCHAR(255) NOT NULL COMMENT \'活动状态 private私有 public公开 protected隐藏 success确认成团 fail成团失败\'');
        $this->addSql('DROP INDEX ix_regionauth_id ON companys_regionauth');
        $this->addSql('ALTER TABLE companys_regionauth ADD regionauth_code VARCHAR(50) DEFAULT NULL COMMENT \'地区编码\', ADD regionauth_province VARCHAR(100) DEFAULT NULL, ADD regionauth_city VARCHAR(100) DEFAULT NULL, ADD regionauth_area VARCHAR(100) DEFAULT NULL, ADD regions_id LONGTEXT DEFAULT NULL COMMENT \'国家行政区划编码组合，逗号隔开\', ADD regionauth_address VARCHAR(500) DEFAULT NULL COMMENT \'地区详细地址\', ADD regionauth_tel VARCHAR(30) DEFAULT NULL COMMENT \'地区客服电话\', ADD store_100_api_key VARCHAR(64) DEFAULT NULL COMMENT \'库存100对接KEY\', ADD store_100_api_secret VARCHAR(64) DEFAULT NULL COMMENT \'库存100对接SECRET\', ADD mob_app_key VARCHAR(64) DEFAULT NULL COMMENT \'mob对接KEY\', ADD mob_app_secret VARCHAR(64) DEFAULT NULL COMMENT \'mob对接SECRET\', CHANGE state state INT NOT NULL COMMENT \'数据状态(1开启，2关闭，-1删除)\'');
        $this->addSql('ALTER TABLE datacube_monitors ADD regionauth_id VARCHAR(255) DEFAULT NULL COMMENT \'区域ID\'');
        $this->addSql('ALTER TABLE distribution_distributor ADD category_id BIGINT DEFAULT 0 NOT NULL COMMENT \'分类id\', ADD first_letter VARCHAR(5) DEFAULT \'\' NOT NULL COMMENT \'店铺名称首字母\', ADD ship_template_id BIGINT DEFAULT 0 NOT NULL COMMENT \'运费模板id\', ADD unit_number VARCHAR(50) DEFAULT \'\' COMMENT \'单元号,铺位号\', ADD business_mode VARCHAR(15) DEFAULT \'\' COMMENT \'经营模式\', ADD opening_date INT DEFAULT 0 NOT NULL COMMENT \'开业日期\', ADD closing_date INT DEFAULT 0 NOT NULL COMMENT \'闭店日期\', ADD priority INT DEFAULT 0 NOT NULL COMMENT \'优先级\', ADD is_display INT DEFAULT 1 NOT NULL COMMENT \'是否展示(1 展示，2 不展示)\', ADD related_shop_id INT DEFAULT 0 NOT NULL COMMENT \'原始店铺ID：换铺前的店铺ID\', ADD tag_name VARCHAR(30) DEFAULT \'\' COMMENT \'标签名称\', ADD tag_start_time INT DEFAULT 0 COMMENT \'标签开始时间\', ADD tag_end_time INT DEFAULT 0 COMMENT \'标签结束时间\', ADD status INT DEFAULT 0 COMMENT \'店铺状态，0 待审核，1 已上架，2 已下架，9 已撤柜\', CHANGE is_open is_open VARCHAR(15) DEFAULT \'false\' NOT NULL COMMENT \'是否开启分账\'');
        $this->addSql('CREATE INDEX ix_category_id ON distribution_distributor (category_id)');
        $this->addSql('CREATE INDEX ix_related_shop_id ON distribution_distributor (related_shop_id)');
        $this->addSql('CREATE INDEX ix_ship_template_id ON distribution_distributor (ship_template_id)');
        $this->addSql('ALTER TABLE distributor_tags ADD start_time INT NOT NULL COMMENT \'开始时间\', ADD end_time INT NOT NULL COMMENT \'结束时间\'');
        $this->addSql('ALTER TABLE items ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD store_code VARCHAR(255) DEFAULT NULL COMMENT \'店铺编码\', ADD supply_model VARCHAR(255) DEFAULT \'0\' NOT NULL COMMENT \'供应链模式（A1-店仓店发、A2-店仓第三方发、B1-云仓店发、B2云仓第三方发、采销-C1）\', ADD promotion_start_time INT DEFAULT NULL COMMENT \'推广开始时间\', ADD promotion_end_time INT DEFAULT NULL COMMENT \'推广结束时间\', ADD is_show INT DEFAULT 1 COMMENT \'是否展示  1:是 0:否\', ADD large_size VARCHAR(255) DEFAULT NULL COMMENT \'商品大码\', ADD delivery_method INT DEFAULT 0 NOT NULL COMMENT \'提货方式默认0（0-仅邮寄，1-仅自提，2-邮寄或自提）\', ADD is_free_delivery INT DEFAULT 1 COMMENT \'是否包邮  1:是 0:否\', ADD delivery_time_type INT DEFAULT 0 COMMENT \'提货时间类型 0:按系统默认周期 1:按周期 2:按时间 \', ADD delivery_cycle INT DEFAULT 1 COMMENT \'提货周期 单位天 \', ADD delivery_start_time INT DEFAULT NULL COMMENT \'提货开始时间\', ADD delivery_end_time INT DEFAULT NULL COMMENT \'提货结束时间\', ADD feature_activity_tag VARCHAR(255) DEFAULT NULL COMMENT \'特色活动标签\', ADD service_interest_tag VARCHAR(255) DEFAULT NULL COMMENT \'服务权益标签\', ADD main_img VARCHAR(255) NOT NULL COMMENT \'商品主图\', ADD item_no VARCHAR(255) NOT NULL COMMENT \'商品货号\', ADD erp_sku_code VARCHAR(255) NOT NULL COMMENT \'ERP SKU 编号\', ADD international_code VARCHAR(255) NOT NULL COMMENT \'国际码\', ADD size_table LONGTEXT DEFAULT NULL COMMENT \'尺码表\', ADD discount_rate INT DEFAULT NULL COMMENT \'折扣率\', ADD service_interest_tag_list JSON DEFAULT NULL COMMENT \'服务权益标签描述(DC2Type:json_array)\', ADD sku_img_url VARCHAR(255) DEFAULT NULL COMMENT \'商品规格图\', CHANGE item_source item_source VARCHAR(255) DEFAULT \'mall\' NOT NULL COMMENT \'商品来源:mall:主商城;distributor:店铺自有;openapi:开放接口;store100:库存100;\'');
        $this->addSql('CREATE INDEX ix_store_code ON items (store_code)');
        $this->addSql('CREATE INDEX ix_regionauth_id ON items (regionauth_id)');
        $this->addSql('ALTER TABLE items_category ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'地区ID\', ADD main_category_id BIGINT DEFAULT 0 COMMENT \'关联主分类id\', ADD is_show TINYINT(1) DEFAULT \'1\' COMMENT \'是否展示\'');
        $this->addSql('ALTER TABLE kaquan_discount_cards ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD intro VARCHAR(256) DEFAULT \'\' COMMENT \'优惠券介绍\', ADD cover_pic VARCHAR(500) DEFAULT \'\' COMMENT \'券封面图\', ADD is_returnable INT DEFAULT 0 NOT NULL COMMENT \'优惠券是否支持退回\', ADD is_stackable INT DEFAULT 0 NOT NULL COMMENT \'是否支持与其他优惠券叠加使用\', ADD max_use_num INT DEFAULT 0 NOT NULL COMMENT \'单笔订单最多使用数量\', ADD po_code VARCHAR(30) DEFAULT \'\' COMMENT \'PO号\', ADD budget_code VARCHAR(30) DEFAULT \'\' COMMENT \'Budget Code\', ADD platform_cost_ratio INT DEFAULT 10000 NOT NULL COMMENT \'平台承担比例(80%)\', ADD is_cross_shop INT DEFAULT 1 NOT NULL COMMENT \'是否允许跨店分摊\', ADD is_shareable INT DEFAULT 1 COMMENT \'是否支持分享\', ADD member_tags VARCHAR(255) DEFAULT \'\' COMMENT \'适用人群\', ADD status INT DEFAULT 4 NOT NULL COMMENT \'审核状态，可选值：1 审核通过，2 待审核，3 审核拒绝，4 已上架，5 已下架\', ADD refuse_reason VARCHAR(50) DEFAULT \'\' COMMENT \'审核拒绝的原因\', ADD get_num INT DEFAULT 0 COMMENT \'已领取数量\', CHANGE card_type card_type VARCHAR(16) NOT NULL COMMENT \'卡券类型，可选值有，discount:折扣券;cash:满减券;minus:立减券;gift:兑换券;new_gift:兑换券(新)\', CHANGE title title VARCHAR(256) NOT NULL COMMENT \'卡券名\', CHANGE least_cost least_cost INT DEFAULT 0 COMMENT \'满减券起用金额\', CHANGE reduce_cost reduce_cost INT DEFAULT 0 COMMENT \'满减券减免金额 or 兑换券起用金额\', CHANGE accept_category accept_category VARCHAR(255) DEFAULT NULL COMMENT \'指定可用的商品类目,满减券专用\', CHANGE reject_category reject_category VARCHAR(255) DEFAULT NULL COMMENT \'指定不可用的商品类目,满减券专用\', CHANGE receive receive VARCHAR(15) DEFAULT \'true\' COMMENT \'是否前台直接领取\', CHANGE most_cost most_cost INT DEFAULT 0 COMMENT \'满减券最高消费限额\', CHANGE use_bound use_bound INT DEFAULT 0 NOT NULL COMMENT \'适用范围: 0:全场可用,1:指定商品可用,2:指定分类可用,3:指定商品标签可用,4:指定商品品牌可用,6:指定店铺商品可用\'');
        $this->addSql('CREATE INDEX ix_status ON kaquan_discount_cards (status)');
        $this->addSql('CREATE INDEX ix_regionauth_id ON kaquan_discount_cards (regionauth_id)');
        $this->addSql('CREATE INDEX ix_title ON kaquan_discount_cards (title)');
        $this->addSql('CREATE INDEX ix_send_end_time ON kaquan_discount_cards (send_end_time)');
        $this->addSql('ALTER TABLE kaquan_rel_items CHANGE item_id item_id BIGINT NOT NULL COMMENT \'筛选id(按item_type区分为商品ID,标签ID，店铺ID等)\', CHANGE item_type item_type VARCHAR(255) DEFAULT \'normal\' NOT NULL COMMENT \'筛选类型,可选值有normal:普通商品,tag:标签,brand:品牌,category:主类目,shop:店铺\'');
        $this->addSql('ALTER TABLE kaquan_user_discount ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD po_code VARCHAR(30) DEFAULT \'\' COMMENT \'PO号\', ADD budget_code VARCHAR(30) DEFAULT \'\' COMMENT \'Budget Code\', ADD used_order_id VARCHAR(200) DEFAULT \'\' COMMENT \'核销订单号(逗号拼接)\', CHANGE card_id card_id BIGINT NOT NULL COMMENT \'微信用户领取的卡券 id \', CHANGE card_type card_type VARCHAR(255) DEFAULT \'1\' COMMENT \'优惠券类型,可选值有 discount:折扣券，cash:满减券，new_gift:兑换券, minus:立减券\', CHANGE title title VARCHAR(256) NOT NULL COMMENT \'卡券名,最大256个汉字\', CHANGE least_cost least_cost INT DEFAULT 0 COMMENT \'满减券起用金额\', CHANGE reduce_cost reduce_cost INT DEFAULT 0 COMMENT \'满减券减免金额 or 兑换券起用金额\', CHANGE rel_distributor_ids rel_distributor_ids LONGTEXT DEFAULT NULL COMMENT \'使用店铺\', CHANGE most_cost most_cost INT DEFAULT 0 COMMENT \'满减券最高消费限额\', CHANGE use_bound use_bound INT DEFAULT 0 NOT NULL COMMENT \'适用范围: 0:全场可用,1:指定商品可用,2:指定分类可用,3:指定商品标签可用,4:指定商品品牌可用,6:指定店铺商品可用\'');
        $this->addSql('ALTER TABLE kaquan_user_discount_logs ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD discount_fee INT DEFAULT 0 COMMENT \'实际核销金额\', ADD use_distributor_id VARCHAR(100) DEFAULT \'\' COMMENT \'核销店铺ID(逗号拼接)\', ADD cancel_info VARCHAR(500) DEFAULT NULL COMMENT \'作废记录\', CHANGE title title VARCHAR(256) NOT NULL COMMENT \'卡券名,最大256个汉字\', CHANGE card_type card_type VARCHAR(255) NOT NULL COMMENT \'优惠券类型，可选值有 discount 折扣券;cash:满减券;gift:兑换券\', CHANGE used_status used_status VARCHAR(255) DEFAULT NULL COMMENT \'核销状态；consume:核销，callback:撤销，cancel:作废\', CHANGE used_order used_order VARCHAR(255) DEFAULT NULL COMMENT \'核销订单号(逗号拼接)\'');
        $this->addSql('CREATE INDEX idx_card_id ON kaquan_user_discount_logs (card_id)');
        $this->addSql('CREATE INDEX idx_regionauth_id ON kaquan_user_discount_logs (regionauth_id)');
        $this->addSql('CREATE INDEX idx_used_status ON kaquan_user_discount_logs (used_status)');
        $this->addSql('CREATE INDEX idx_code ON kaquan_user_discount_logs (code)');
        $this->addSql('CREATE INDEX idx_used_time ON kaquan_user_discount_logs (used_time)');
        $this->addSql('DROP INDEX mobile_company ON members');
        $this->addSql('ALTER TABLE members ADD promotion_channels VARCHAR(255) DEFAULT NULL COMMENT \'推广渠道\', ADD frist_page VARCHAR(255) DEFAULT NULL COMMENT \'首访模块路径\', ADD from_source VARCHAR(255) DEFAULT NULL COMMENT \'来源\', ADD regionauth_id VARCHAR(255) DEFAULT NULL COMMENT \'区域ID\', ADD active_time INT DEFAULT NULL COMMENT \'激活时间\', ADD card_date VARCHAR(255) DEFAULT NULL COMMENT \'开卡日期\', ADD card_guide_code VARCHAR(255) DEFAULT NULL COMMENT \'开卡导购编码\', ADD brand VARCHAR(255) DEFAULT NULL COMMENT \'品牌\', ADD service_store_code VARCHAR(255) DEFAULT NULL COMMENT \'服务门店编码\', ADD service_guide_code VARCHAR(255) DEFAULT NULL COMMENT \'服务导购编码\', ADD bind_store_code VARCHAR(255) DEFAULT NULL COMMENT \'绑卡门店编码\', ADD bind_guide_code VARCHAR(255) DEFAULT NULL COMMENT \'绑卡导购编码\', ADD bind_scene VARCHAR(255) DEFAULT NULL COMMENT \'绑卡场景\', ADD accept_noticetime VARCHAR(255) DEFAULT NULL COMMENT \'是否同意营销信息推送\', ADD frist_page_name VARCHAR(255) DEFAULT NULL COMMENT \'首访模块名称\'');
        $this->addSql('ALTER TABLE members_associations ADD is_login TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否登录。0:未登录；1:已登陆\', ADD updated bigint NOT NULL');
        $this->addSql('ALTER TABLE members_distribution_fav ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\'');
        $this->addSql('ALTER TABLE members_info ADD register_time INT DEFAULT NULL COMMENT \'入会时间\', ADD province VARCHAR(50) DEFAULT NULL COMMENT \'省份\', ADD city VARCHAR(50) DEFAULT NULL COMMENT \'城市\', ADD district VARCHAR(50) DEFAULT NULL COMMENT \'区县\', ADD true_name VARCHAR(500) DEFAULT NULL COMMENT \'真实姓名\'');
        $this->addSql('ALTER TABLE members_items_fav ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\'');
        $this->addSql('ALTER TABLE members_subscribe_notice ADD num INT DEFAULT 0 NOT NULL COMMENT \'订阅次数\'');
        $this->addSql('CREATE INDEX idx_sub_type ON members_subscribe_notice (sub_type)');
        $this->addSql('ALTER TABLE members_tags ADD regionauth_id VARCHAR(255) DEFAULT NULL COMMENT \'区域ID\', ADD from_source VARCHAR(20) DEFAULT \'AIO PRO\' NOT NULL COMMENT \'来源：AIO PRO，CDP\', ADD start_time BIGINT DEFAULT NULL COMMENT \'生效开始时间\', ADD end_time BIGINT DEFAULT NULL COMMENT \'生效结束时间\', ADD status SMALLINT DEFAULT 1 NOT NULL COMMENT \'状态：1-启用，0-未启用\', ADD realtime_type VARCHAR(50) DEFAULT \'REAL_TIME\' NOT NULL COMMENT \'类型：REAL_TIME-实时，NON_REAL_TIME-非实时\', ADD cdp_sync_count INT DEFAULT 0 NOT NULL COMMENT \'cdp同步人数\', ADD received_count INT DEFAULT 0 NOT NULL COMMENT \'已接收人数\', ADD valid_count INT DEFAULT 0 NOT NULL COMMENT \'实际有效人数\', ADD latest_push_version VARCHAR(50) DEFAULT NULL COMMENT \'最新人群推送版本\', ADD segment_id VARCHAR(50) DEFAULT NULL COMMENT \'人群包id\', ADD group_id INT DEFAULT NULL COMMENT \'人群分组id\'');
        $this->addSql('CREATE INDEX idx_segment_id ON members_tags (segment_id)');
        $this->addSql('ALTER TABLE operators ADD password_updated INT DEFAULT NULL COMMENT \'密码更新时间\', ADD regionauth_ids LONGTEXT DEFAULT NULL COMMENT \'员工管理的区域id集合\', ADD reset_initial_password TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否重置初始密码.1:是,0:否\', ADD last_login_time INT DEFAULT NULL COMMENT \'最后登录时间\', DROP regionauth_id');
        $this->addSql('ALTER TABLE orders_associations ADD order_no BIGINT DEFAULT NULL COMMENT \'订单号\', ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD address_modify_count INT DEFAULT 0 COMMENT \'地址修改次数\'');
        $this->addSql('CREATE INDEX idx_order_no ON orders_associations (order_no)');
        $this->addSql('ALTER TABLE orders_cart ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\', ADD polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\'');
        $this->addSql('CREATE INDEX idx_regionauth_id ON orders_cart (regionauth_id)');
        $this->addSql('ALTER TABLE orders_delivery ADD shipping_status VARCHAR(255) DEFAULT \'\' COMMENT \'物流状态。可选值有COLLECTED-已揽收;SIGNED-已签收\', ADD shipping_time INT DEFAULT NULL COMMENT \'物流签收时间\', ADD auto_finish_time VARCHAR(255) DEFAULT NULL COMMENT \'订单自动完成时间\', ADD delivery_method VARCHAR(255) DEFAULT NULL COMMENT \'发货方式 online_shipping-在线发货;filllogino_shipping-补录运单号;\'');
        $this->addSql('ALTER TABLE orders_merchant_trade DROP hf_order_id, DROP hf_order_date, DROP hf_cash_type, DROP user_cust_id, DROP bind_card_id');
        $this->addSql('ALTER TABLE orders_normal_orders ADD invoice_status VARCHAR(255) DEFAULT \'PENDING\' NOT NULL COMMENT \'开票状态。可选值有 DONE—已开票;PENDING—待开票;PARTAIL-部分开票\', ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\', ADD pay_time INT DEFAULT NULL COMMENT \'支付时间\', ADD order_no BIGINT DEFAULT NULL COMMENT \'订单号\', ADD disabled TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否删除。0:否；1:是\', ADD business_mode VARCHAR(15) DEFAULT \'\' COMMENT \'店铺经营模式\', DROP is_shopscreen, DROP is_logistics, CHANGE freight_type freight_type VARCHAR(255) DEFAULT \'cash\' NOT NULL COMMENT \'运费类型-用于积分商城 cash:现金 point:积分 cod:到付\'');
        $this->addSql('CREATE INDEX idx_disabled ON orders_normal_orders (disabled)');
        $this->addSql('ALTER TABLE orders_normal_orders_items ADD freight_type VARCHAR(15) DEFAULT NULL COMMENT \'运费类型(cash 买家支付; free 包邮; cod 到付)\', ADD freight_fee INT UNSIGNED DEFAULT 0 NOT NULL COMMENT \'商品分摊的运费，以分为单位\', ADD polyv_channel_id VARCHAR(255) DEFAULT NULL COMMENT \'保利威频道号\', ADD shipping_status VARCHAR(255) DEFAULT \'\' COMMENT \'物流状态。可选值有COLLECTED-已揽收;SIGNED-已签收\', ADD shipping_time INT DEFAULT NULL COMMENT \'物流时间\', ADD refunded_num INT DEFAULT 0 COMMENT \'退款数量\', ADD is_invoice INT DEFAULT 0 NOT NULL COMMENT \'是否开票,0否 1已开票 2开票中 3红冲\', ADD delivery_method VARCHAR(255) DEFAULT NULL COMMENT \'快递公司\', ADD auto_close_ziti_time INT DEFAULT NULL COMMENT \'自动关闭自提时间\', ADD order_no BIGINT DEFAULT NULL COMMENT \'订单号\', ADD logistics_type VARCHAR(255) DEFAULT NULL COMMENT \'发货的模式:online_shipping 在线发货;filllogino_shipping 补录运单号 \', ADD is_return INT DEFAULT 0 NOT NULL COMMENT \'是否开票,0否 1是\', ADD act_price INT UNSIGNED DEFAULT 0 COMMENT \'活动价，以分为单位\', ADD source_from VARCHAR(10) DEFAULT NULL COMMENT \'订单来源 通用下单general、直播间 live\', ADD weixin_scene VARCHAR(10) DEFAULT NULL COMMENT \'微信场景 \', DROP is_logistics, CHANGE id id BIGINT NOT NULL COMMENT \'ID\', CHANGE aftersales_status aftersales_status VARCHAR(255) DEFAULT NULL COMMENT \'售后状态。可选值有 WAIT_SELLER_AGREE 0 等待商家处理;WAIT_BUYER_RETURN_GOODS 1 商家接受申请，等待消费者回寄;WAIT_SELLER_CONFIRM_GOODS 2 消费者回寄，等待商家收货确认;SELLER_REFUSE_BUYER 3 售后驳回;SELLER_SEND_GOODS 4 卖家重新发货 换货完成;REFUND_SUCCESS 5 退款成功;REFUND_CLOSED 6 退款关闭;CLOSED 7 售后关闭 REFUND_AUDIT_SUCCESS 退款审核成功\'');
        $this->addSql('ALTER TABLE orders_rel_promotions ADD order_no BIGINT DEFAULT NULL COMMENT \'订单号\', ADD is_return TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'额度是否可以返还\'');
        $this->addSql('ALTER TABLE orders_rel_ziti CHANGE pickup_date pickup_date VARCHAR(20) DEFAULT NULL COMMENT \'自提日期\', CHANGE pickup_time pickup_time VARCHAR(20) DEFAULT NULL COMMENT \'自提时间\'');
        $this->addSql('ALTER TABLE pages_open_screen_ad ADD start_time BIGINT NOT NULL COMMENT \'开始时间\', ADD end_time BIGINT NOT NULL COMMENT \'结束时间\'');
        $this->addSql('ALTER TABLE pages_template ADD regionauth_id BIGINT DEFAULT 0 COMMENT \'区域id\', CHANGE weapp_pages weapp_pages VARCHAR(255) DEFAULT \'index\' COMMENT \'模版页面:index-首页 distributor_index-门店首页\'');
        $this->addSql('ALTER TABLE pages_template_set ADD regionauth_id BIGINT DEFAULT 0 COMMENT \'区域id\'');
        $this->addSql('DROP INDEX idx_goodsid_begintime_endtime ON promotion_groups_activity');
        $this->addSql('ALTER TABLE promotion_groups_activity ADD regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域\', ADD marketing_desc VARCHAR(255) NOT NULL COMMENT \'活动描述\', ADD finance_id INT DEFAULT 0 NOT NULL COMMENT \'财务配置ID\', ADD audit_status VARCHAR(15) DEFAULT \'processing\' NOT NULL COMMENT \'审核状态: processing待审核 approved审核通过 rejected审核拒绝\', ADD approve_status VARCHAR(15) DEFAULT NULL COMMENT \'活动状态 on 上架，down 下架\', ADD rejected_reason VARCHAR(255) DEFAULT NULL COMMENT \'审核拒绝原因\'');
        $this->addSql('CREATE INDEX idx_begintime_endtime ON promotion_groups_activity (begin_time, end_time)');
        $this->addSql('ALTER TABLE promotion_groups_team_member CHANGE member_info member_info LONGTEXT DEFAULT NULL COMMENT \'拼团机器人\'');
        $this->addSql('ALTER TABLE promotions_items_tag ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\'');
        $this->addSql('ALTER TABLE promotions_marketing_activity ADD regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域\', ADD finance_id INT DEFAULT 0 NOT NULL COMMENT \'财务配置ID\', ADD is_use_coupon TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否支持叠加优惠券\', ADD audit_status VARCHAR(15) DEFAULT \'processing\' NOT NULL COMMENT \'审核状态: processing待审核 approved审核通过 rejected审核拒绝\', ADD approve_status VARCHAR(15) DEFAULT NULL COMMENT \'活动状态 on 上架，down 下架\', ADD rejected_reason VARCHAR(255) DEFAULT NULL COMMENT \'审核拒绝原因\', CHANGE source_id source_id BIGINT DEFAULT 0 NOT NULL COMMENT \'添加者ID: 如店铺ID\'');
        $this->addSql('ALTER TABLE promotions_marketing_activity_items ADD regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域\'');
        $this->addSql('ALTER TABLE promotions_package_item CHANGE is_show is_show TINYINT(1) DEFAULT NULL COMMENT \'列表页是否显示\'');
        $this->addSql('ALTER TABLE promotions_seckill_activity ADD regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域\', ADD is_use_coupon TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否支持叠加优惠券\', ADD finance_id INT DEFAULT 0 NOT NULL COMMENT \'财务配置ID\', ADD valid_grade LONGTEXT DEFAULT NULL COMMENT \'会员级别集合\', ADD audit_status VARCHAR(15) DEFAULT \'processing\' NOT NULL COMMENT \'审核状态: processing待审核 approved审核通过 rejected审核拒绝\', ADD approve_status VARCHAR(15) DEFAULT NULL COMMENT \'活动状态 on 上架，down 下架\', ADD rejected_reason VARCHAR(255) DEFAULT NULL COMMENT \'审核拒绝原因\', DROP tag_ids, DROP brand_ids, CHANGE use_bound use_bound INT DEFAULT 1 NOT NULL COMMENT \'适用范围: 1:指定商品可用\'');
        $this->addSql('ALTER TABLE promotions_seckill_rel_goods ADD goods_id BIGINT NOT NULL COMMENT \'秒杀活动商品id\'');
        $this->addSql('ALTER TABLE promotions_specific_crowd_discount ADD regionauth_id INT DEFAULT 0 NOT NULL COMMENT \'区域\', ADD finance_id INT DEFAULT 0 NOT NULL COMMENT \'财务配置ID\', ADD is_use_coupon TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否支持叠加优惠券\', ADD specific_desc VARCHAR(255) DEFAULT NULL COMMENT \'营销活动描述\', ADD audit_status VARCHAR(15) DEFAULT \'processing\' NOT NULL COMMENT \'审核状态: processing待审核 approved审核通过 rejected审核拒绝\', ADD approve_status VARCHAR(15) DEFAULT NULL COMMENT \'活动状态 on 上架，down 下架\', ADD rejected_reason VARCHAR(255) DEFAULT NULL COMMENT \'审核拒绝原因\'');
        $this->addSql('ALTER TABLE refund_error_logs ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\', ADD refund_bn BIGINT DEFAULT NULL COMMENT \'申请退款单号\', ADD aftersales_bn BIGINT DEFAULT NULL COMMENT \'售后单号\'');
        $this->addSql('ALTER TABLE selfservice_registration_activity CHANGE pics pics TEXT');
        $this->addSql('ALTER TABLE shipping_templates ADD intro VARCHAR(200) DEFAULT \'\' NOT NULL COMMENT \'运费模板说明\', ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', ADD price_model VARCHAR(15) DEFAULT \'1\' NOT NULL COMMENT \'计费模式(single 单店计费, combine 多店合并计费)\', ADD cod_conf LONGTEXT DEFAULT NULL COMMENT \'指定到付的条件\', CHANGE is_free is_free VARCHAR(255) DEFAULT \'0\' NOT NULL COMMENT \'是否包邮(0 自定义运费, 1 卖家包邮, 2 买家到付)\', CHANGE valuation valuation VARCHAR(1) DEFAULT \'1\' NOT NULL COMMENT \'运费计算参数来源(1 按重量, 2 按件数, 3 按金额, 4 按体积)\'');
        $this->addSql('CREATE INDEX idx_name ON shipping_templates (name)');
        $this->addSql('CREATE INDEX idx_regionauth_id ON shipping_templates (regionauth_id)');
        $this->addSql('CREATE INDEX idx_supplier_id ON shipping_templates (supplier_id)');
        $this->addSql('ALTER TABLE supplier_order CHANGE freight_type freight_type VARCHAR(255) DEFAULT \'cash\' NOT NULL COMMENT \'运费类型-用于积分商城 cash:现金 point:积分 cod:到付\'');
        $this->addSql('ALTER TABLE trade ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域ID\', ADD is_conbined TINYINT(1) DEFAULT \'0\' NOT NULL COMMENT \'是否合并支付\', CHANGE trade_id trade_id BIGINT NOT NULL COMMENT \'交易单号\', CHANGE order_id order_id BIGINT DEFAULT NULL COMMENT \'订单号\', CHANGE company_id company_id INT NOT NULL COMMENT \'企业ID\', CHANGE shop_id shop_id INT DEFAULT NULL COMMENT \'门店ID\', CHANGE distributor_id distributor_id INT DEFAULT NULL COMMENT \'店铺ID\', CHANGE dealer_id dealer_id INT DEFAULT 0 COMMENT \'经销商ID\', CHANGE trade_source_type trade_source_type VARCHAR(50) DEFAULT NULL COMMENT \'交易单来源类型。可选值有 membercard-会员卡购买;normal-实体订单购买;servers-服务订单购买;normal_community-社区订单购买;diposit-预存款购买;order_pay-买单购买;\', CHANGE user_id user_id INT NOT NULL COMMENT \'购买用户\', CHANGE open_id open_id VARCHAR(50) DEFAULT NULL COMMENT \'用户open_id\', CHANGE mch_id mch_id INT DEFAULT NULL COMMENT \'商户号，微信支付\', CHANGE trade_state trade_state VARCHAR(20) NOT NULL COMMENT \'交易状态。可选值有 SUCCESS—支付成功;REFUND—转入退款;NOTPAY—未支付;CLOSED—已关闭;REVOKED—已撤销;PAYERROR--支付失败(其他原因，如银行返回失败)\', CHANGE pay_type pay_type VARCHAR(20) NOT NULL COMMENT \'支付方式。wxpay-微信支付;deposit-预存款支付;pos-刷卡;point-积分\', CHANGE pay_channel pay_channel VARCHAR(20) DEFAULT \'\' COMMENT \'adapay支付渠道\', CHANGE bank_type bank_type VARCHAR(50) DEFAULT NULL COMMENT \'付款银行\', CHANGE time_start time_start INT NOT NULL COMMENT \'交易起始时间\', CHANGE time_expire time_expire INT DEFAULT NULL COMMENT \'交易结束时间\', CHANGE adapay_fee_mode adapay_fee_mode VARCHAR(1) DEFAULT \'\' COMMENT \'adapay手续费收取模式\', CHANGE adapay_div_status adapay_div_status VARCHAR(10) DEFAULT NULL COMMENT \'分账状态。可选值有NOTDIV—未分账;DIVED-已分账;\', CHANGE cur_fee_symbol cur_fee_symbol VARCHAR(10) DEFAULT \'￥\' NOT NULL COMMENT \'系统配置货币符号\', CHANGE bspay_req_date bspay_req_date VARCHAR(30) DEFAULT NULL COMMENT \'斗拱支付的请求日期\', CHANGE bspay_div_status bspay_div_status VARCHAR(10) DEFAULT NULL COMMENT \'斗拱分账状态。可选值有NOTDIV—未分账;DIVED-已分账;\', CHANGE bspay_fee_mode bspay_fee_mode INT DEFAULT NULL COMMENT \'斗拱手续费收取模式 1:外扣 2:内扣\'');
        $this->addSql('ALTER TABLE wechat_weapp_customize_page ADD regionauth_id BIGINT DEFAULT 0 NOT NULL COMMENT \'区域id\', CHANGE page_type page_type VARCHAR(255) DEFAULT \'normal\' NOT NULL COMMENT \'页面类型 normal:普通页面 salesperson:导购首页 category:分类页 my:我的\'');
    }

    /**
     * @param Schema $schema
     */
    public function down(Schema $schema): void
    {
    }

