Commit 3bd5c913 by mercymodest

feat:- add yoga sql

parent 78c28152
# CREATE TABLE `api_client_credentials`
# CREATE TABLE `api_client_credentials`
......@@ -213,8 +213,58 @@ CREATE TABLE user_card_audit_log
update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP COMMENT '更新时间'
) COMMENT ='会员卡审核记录表';
alter table user_card
add audit_status tinyint(1) default 1 null comment '会员卡审核状态:0:待审核 1:审核通过 2:审核驳回 default:1';
add audit_status tinyint(1) default 1 null comment '审核状态枚举: 0:待审核,1:审核通过,2:审核驳回 3:已撤销 default:1';
alter table user_card_audit_log
modify step tinyint not null comment ' 审核步骤: 0:待审核,1:已撤销 2:审核通过,3:审核拒绝。';
alter table user_card
add audit_record_id BIGINT null comment '当前审核记录ID';
create index user_card_audit_log_record_id_index
on user_card_audit_log (record_id);
alter table user_card_change_logs
modify operation_type tinyint(1) default 1 null comment '卡操作类型,1:发卡,2;开卡,3:请假,4:退卡,5:补卡,6:挂失,7:续卡,8:转卡,9:解挂,10:停卡,11:解除停卡,12:卡升级 13:(会员卡)待审核,14:(会员卡)审核通过,15:(会员卡)审核驳回 16:(会员卡)已撤销';
alter table user_card_change_logs
add record_id BIGINT null comment '会员卡记录ID,同一条审核记录ID相同。';
alter table user_card_change_logs
add step tinyint null comment '会员卡审核步骤: 0:待审核,1:已撤销 2:审核通过,3:审核拒绝。';
alter table user_card_change_logs
add remarks varchar(200) null comment '会员卡审核备注';
-- 使用雪花算法生成的主键
CREATE TABLE user_management_records (
member_management_records_id BIGINT PRIMARY KEY COMMENT '主键ID',
`year` INT NOT NULL COMMENT '年',
`month` TINYINT NOT NULL COMMENT '月',
year_month_str VARCHAR(7) NOT NULL COMMENT '年月',
reservation_count INT NOT NULL COMMENT '预约次数',
checkin_count INT NOT NULL COMMENT '签到次数',
weight DECIMAL(5,2) NOT NULL COMMENT '体重(kg)',
notes text COMMENT '备注',
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
update_time DATETIME NULL COMMENT '最新编辑时间',
user_uuid BIGINT NOT NULL COMMENT '用户UUID'
) COMMENT='用户管理记录表';
create index user_management_records_month_index
on user_management_records (month);
create index user_management_records_user_uuid_index
on user_management_records (user_uuid);
create index user_management_records_year_index
on user_management_records (year);
......
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