记得上下班打卡 | git大法好,push需谨慎

Commit f6f0971b authored by 张国柄's avatar 张国柄

~sql;

parent d75d7874
......@@ -58,7 +58,7 @@ alter table adam_member_price add price_special decimal(8, 2) null comment '特
# 会员码表调整
alter table adam_member_code modify state tinyint null comment '状态[0-可用|1-已用|2-无效|3-过期|4-失效|5-退回]';
create index idx_amember_code_id on adam_member_code (code);
alter table adam_member_code add validity tinyint null comment '有效期(单位天)' after state;
alter table adam_member_code add validity int null comment '有效期(单位天)' after state;
alter table adam_member_code add effect_at datetime(3) null comment '生效时间' after validity;
alter table adam_member_code add expire_at datetime(3) null comment '过期时间' after effect_at;
alter table adam_member_code add operator varchar(64) null comment 'type=2时记录创建人' after expire_at;
......@@ -111,6 +111,11 @@ create table adam_member_rights
label varchar(50) comment '标注',
cover varchar(255) comment '图片标识',
detail text comment '详情内容',
operator varchar(64) comment '操作人',
created_at datetime(3) not null,
updated_at datetime(3),
comment varchar(255)
) engine = InnoDB comment '会员权益配置';
create unique index uidx_adam_member_rights_id on adam_member_rights (mrights_id);
......@@ -126,11 +131,35 @@ create table adam_user_busi_acct
work varchar(64) comment '业务服务模块',
ppwd varchar(64) comment '业务服务密码',
state tinyint comment '1-NORMAL,2-INVALID',
created_at datetime not null,
updated_at datetime,
created_at datetime(3) not null,
updated_at datetime(3),
comment text
) engine = InnoDB comment '用户业务服务账号表';
create index idx_adam_user_busi_acct_uid on adam_user_busi_acct (uid);
-- >>------------------------------------------------------------------------------------|20210924会员码管理
drop table if exists adam_member_code_batch;
create table adam_member_code_batch
(
mid bigint unsigned auto_increment primary key,
batch_no varchar(64) not null comment '会员码批次号',
member_id varchar(64) not null comment '~`adam_member.member_id`',
member_price_id varchar(64) not null comment '~`adam_member_price.member_price_id`',
member_name varchar(80) comment '会员卡名称~`adam_member.name`',
member_combo varchar(80) comment '套餐包名称',
gen_num int comment '生成数量',
use_num int comment '使用数量',
`describe` varchar(64) comment '描述',
validity int comment '有效期(单位天)',
effect_at datetime(3) null comment '生效时间',
expire_at datetime(3) null comment '失效时间',
operator varchar(64) comment '操作人',
created_at datetime(3) not null,
updated_at datetime(3),
comment varchar(255)
) engine = InnoDB comment '会员码批次记录';
create index idx_adam_member_code_batch_no on adam_member_code_batch (batch_no);
# -- >>------------------------------------------------------------------------------------ |20210817会员与券改版
# 券发放管理
drop table if exists candy_mgt_coupon;
......
......@@ -457,6 +457,6 @@ create table adam_member_code_batch
comment varchar(255)
) engine = InnoDB comment '会员码批次记录';
create index idx_adam_member_code_batch_no on adam_member_code_batch (batch_no);
-- >>------------------------------------------------------------------------------------
-- >>------------------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment