|
@@ -1,14 +1,32 @@
|
|
|
-- 数据字典:所属区域【界面中手动添加】
|
|
|
-- INSERT INTO zuihou_base_bt_0000.c_common_dictionary (id,type_,name,describe_,status_,create_user,create_time) VALUES (7,'REGION','所属区域','',1,3,'2023-02-20 15:06:33');
|
|
|
|
|
|
--- 新增 所属区域 字段
|
|
|
-ALTER TABLE zuihou_base_bt_0000.c_core_org ADD region_id BIGINT(20) NULL COMMENT '所属区域ID(数据字典项 - REGION)';
|
|
|
-ALTER TABLE zuihou_base_bt_0000.bt_place ADD region_id BIGINT(20) NULL COMMENT '所属区域ID(数据字典项 - REGION)';
|
|
|
-
|
|
|
--- 新增 简介 字段
|
|
|
+-- 产品表新增 简介 字段
|
|
|
ALTER TABLE zuihou_base_bt_0000.bt_goods ADD introduction varchar(200) NULL COMMENT '简介';
|
|
|
|
|
|
--- 新增 优惠券 表,承载优惠券数据
|
|
|
+-- 新增表:组织 - 所属区域
|
|
|
+create table c_core_org_region
|
|
|
+(
|
|
|
+ id bigint(20) not null comment '主键',
|
|
|
+ org_id bigint(20) not null comment '组织机构ID',
|
|
|
+ region_id bigint(20) not null comment '所属区域ID(数据字典项 - REGION)',
|
|
|
+ create_time datetime not null comment '创建时间',
|
|
|
+ create_user bigint(20) not null comment '创建人',
|
|
|
+ primary key (id)
|
|
|
+) DEFAULT CHARSET=utf8mb4 comment '组织 - 所属区域';
|
|
|
+
|
|
|
+-- 新增表:组织 - 所属区域
|
|
|
+create table bt_place_region
|
|
|
+(
|
|
|
+ id bigint(20) not null comment '主键',
|
|
|
+ place_id bigint(20) not null comment '场地ID',
|
|
|
+ region_id bigint(20) not null comment '所属区域ID(数据字典项 - REGION)',
|
|
|
+ create_time datetime not null comment '创建时间',
|
|
|
+ create_user bigint(20) not null comment '创建人',
|
|
|
+ primary key (id)
|
|
|
+) DEFAULT CHARSET=utf8mb4 comment '场地 - 所属区域';
|
|
|
+
|
|
|
+-- 新增表:优惠券
|
|
|
create table bt_coupon
|
|
|
(
|
|
|
id bigint(20) not null comment '主键',
|
|
@@ -26,11 +44,9 @@ create table bt_coupon
|
|
|
update_user bigint(20) not null comment '修改人',
|
|
|
delete_flag char(1) not null comment '删除标识: 0 -> 未删除, 1 -> 删除,落库是默认为0',
|
|
|
primary key (id)
|
|
|
-);
|
|
|
-
|
|
|
-alter table bt_coupon comment '优惠券';
|
|
|
+) DEFAULT CHARSET=utf8mb4 comment '优惠券';
|
|
|
|
|
|
--- 新增 会员优惠券 表,承载会员领券记录
|
|
|
+-- 新增表:会员优惠券
|
|
|
create table bt_member_coupon
|
|
|
(
|
|
|
id bigint(20) not null comment '',
|
|
@@ -41,6 +57,4 @@ create table bt_member_coupon
|
|
|
create_time datetime not null comment '创建时间',
|
|
|
update_time datetime not null comment '修改时间',
|
|
|
primary key (id)
|
|
|
-);
|
|
|
-
|
|
|
-alter table bt_member_coupon comment '会员优惠券';
|
|
|
+) DEFAULT CHARSET=utf8mb4 comment '会员优惠券';
|