Files
2021-12-24 16:24:51 +08:00

43 lines
2.6 KiB
SQL

-- ----------------------------
-- Title:狸车宝用户表
-- Author:lcc
-- Table:lc_app_licheb_users
-- ---------------------------
drop table if exists lc_app_licheb_users;
create table lc_app_licheb_users (
id int(10) unsigned not null auto_increment comment '自增id',
pid int(10) not null default '0' comment '父id',
mobile varchar(11) not null default '' comment '手机号码',
uname varchar(20) not null default '' comment '姓名',
nickname varchar(32) not null default '' comment '用户名/微信昵称',
headimg varchar(200) not null default '' comment '用户头像',
signature varchar(256) not null default '' comment '用户签名',
unionid varchar(32) not null default '' comment 'unionid',
openid varchar(32) not null default '' comment 'openid',
group_id tinyint(1) not null default '1' comment '用户角色(1销售 2店长 3掌柜)',
biz_id int(10) not null default '0' comment '门店id',
status tinyint(1) not null default '1' comment '状态:-1删除,0禁用,1正常',
c_time int(10) unsigned not null default '0' comment '创建时间',
u_time timestamp not null default current_timestamp on update current_timestamp,
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='狸车宝用户表';
alter table lc_app_licheb_users add column jsondata json default null comment '其他信息' after biz_id;
alter table lc_app_licheb_users modify biz_id varchar(200) not null default 0 comment '门店id多个用逗号隔开(1,2,3)';
-- ----------------------------
-- Title:商家订单分佣配置
-- Author:lcc
-- Table:lc_app_licheb_brokerage
-- ---------------------------
drop table if exists lc_app_licheb_brokerage;
create table lc_app_licheb_brokerage (
id int(10) not null auto_increment comment '自增id',
biz_id varchar(50) not null default '' comment '商家id',
brokerage_1 decimal(12,2) not null default 0.00 comment '一级佣金',
brokerage_2 decimal(12,2) not null default 0.00 comment '二级佣金',
status tinyint(1) not null default 0 comment '状态(1正常 0禁用 -1删除)',
c_time int(10) not null default 0 comment '创建时间',
u_time timestamp not null default current_timestamp on update current_timestamp comment '更新时间',
primary key (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商家订单分佣配置';