You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

66 lines
3.3 KiB

/*==============================================================*/
/* Table: channel */
/*==============================================================*/
CREATE TABLE `channel` (
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`merchant_id` BIGINT(20) NULL DEFAULT NULL,
`merchant_no` VARCHAR(32) NULL DEFAULT NULL COMMENT '商户编号',
`merchant_name` VARCHAR(32) NULL DEFAULT NULL COMMENT '商户名称',
`channel_no` VARCHAR(32) NULL DEFAULT NULL COMMENT '渠道编号',
`channel_name` VARCHAR(32) NULL DEFAULT NULL COMMENT '渠道名称',
`channel_type` TINYINT(4) NULL DEFAULT NULL COMMENT '渠道类型:0-全平台渠道,1-商户渠道',
`create_at` BIGINT(20) NULL DEFAULT NULL COMMENT '创建时间',
`create_by` VARCHAR(32) NULL DEFAULT NULL COMMENT '创建者',
`update_at` BIGINT(20) NULL DEFAULT NULL COMMENT '更新时间',
`update_by` VARCHAR(32) NULL DEFAULT NULL COMMENT '更新者',
`remark` TEXT NULL COMMENT '备注',
`del_flag` TINYINT(1) NULL DEFAULT '0' COMMENT '删除标志:0-有效,1-失效',
PRIMARY KEY (`id`)
)
COMMENT='渠道表'
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=24
;
/*==============================================================*/
/* Table: coupon_version_history */
/*==============================================================*/
create table coupon_version_history
(
id int(20) unsigned not null auto_increment comment '主键',
coupon_batch_id int(20) not null comment '主键',
merchant_no national varchar(32) comment '商户编号',
create_at bigint comment '创建时间',
create_by varchar(32) comment '创建者',
version_detail text comment '版本明细',
version tinyint comment '版本号',
primary key (id)
);
alter table coupon_version_history comment '优惠券模版历史版本';
/*==============================================================*/
/* Table: coupon_batch */
/*==============================================================*/
alter table coupon_batch add column use_limit tinyint DEFAULT 0 comment '使用限制:0-不限制,1-限新用户',
add column channel_id int comment '渠道id',
add column version tinyint DEFAULT 0 comment '编辑更新版本号';
/*==============================================================*/
/* Table: coupon */
/*==============================================================*/
alter table coupon add column use_limit tinyint DEFAULT 0 comment '使用限制:0-不限制,1-限新用户',
add column channel_id int comment '渠道id',
add column version tinyint DEFAULT 0 comment '模板版本号';
/*==============================================================*/
/* Table: vgoods */
/*==============================================================*/
alter table vgoods add column is_show_coupon tinyint DEFAULT 0 comment '优惠券展示:0-不展示,1-展示',
add column coupon_batch_id int(20) comment '优惠券模板id';
/*==============================================================*/
/* Table: vorder */
/*==============================================================*/
alter table vorder add column channel_id int comment '渠道id';