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

Commit 62e25376 authored by 胡佳晨's avatar 胡佳晨

新增sql文件

parent bbb66a28
drop table if exists stone_score_logs;
create table stone_score_logs
(
mid bigint unsigned auto_increment primary key,
uid varchar(64) default '' comment '用户id',
score decimal(8, 2) default 0 comment '积分',
content varchar(255) default '' comment '积分动态明细',
reason varchar(255) default '' comment '变更原因',
created_at datetime ,
updated_at datetime ,
comment text
) engine = InnoDB comment '积分日志表';
drop table if exists stone_score_items;
create table stone_score_items
(
mid bigint unsigned auto_increment primary key,
target_id varchar(64) default '' comment '目标id',
type integer default 0 comment '目标类型[1-券|1x-商品维度|2x-演出维度]',
img varchar(64) default '' comment '展示图',
score decimal(8, 2) default 0 comment '所需积分',
price decimal(8, 2) default 0 comment '所需金额',
general_total int default 0 comment '总库存[-1-不限]',
general_surplus int default 0 comment '剩余库存',
limit_count int default 0 comment '限购数量[0-不限]',
details longtext default NULL comment '商品详情',
notice longtext default NULL comment '注意事项',
status int default 0 comment '状态[-1-删除|0-未上架|1-已上架|2-定时上架]',
start_time datetime NULLABLE COMMENT '定时上架-起始时间',
end_time datetime NULLABLE COMMENT '定时上架-终止时间',
created_at datetime ,
updated_at datetime ,
comment text
) engine = InnoDB comment '积分物品表';
drop table if exists stone_score_user;
create table stone_score_user
(
mid bigint unsigned auto_increment primary key,
uid varchar(64) default '' comment '用户id',
score_surplus decimal(8, 2) default 0 comment '可用积分',
score_used decimal(8, 2) default 0 comment '医用积分',
created_at datetime ,
updated_at datetime ,
comment text
) engine = InnoDB comment '积分用户表';
drop table if exists stone_score_order;
create table stone_score_order
(
mid bigint unsigned auto_increment primary key,
uid varchar(64) default '' comment '用户id',
score_surplus decimal(8, 2) default 0 comment '可用积分',
score_used decimal(8, 2) default 0 comment '已用积分',
created_at datetime ,
updated_at datetime ,
comment text
) engine = InnoDB comment '积分用户表';
\ No newline at end of file
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