Files
liche/sql/app/liche.sql
T
2021-08-03 19:13:30 +08:00

67 lines
3.8 KiB
SQL

-- ----------------------------
-- Title:狸车小程序用户表
-- Author:lcc
-- Table:lc_app_liche_users
-- ---------------------------
drop table if exists lc_app_liche_users;
create table lc_app_liche_users (
id int(10) unsigned not null auto_increment comment '自增id',
mobile varchar(11) not null default '' comment '手机号码',
nickname varchar(32) not null default '' comment '用户名/微信昵称',
headimg varchar(200) not null default '' comment '用户头像',
signature varchar(256) not null comment '用户签名',
unionid varchar(32) not null default '' comment 'unionid',
openid varchar(32) not null default '' comment 'openid',
jsondata json default null comment '其他信息',
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_liche_users add dealer tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否分销' after jsondata;
alter table lc_app_liche_users add up_uid int(10) NOT NULL DEFAULT '0' COMMENT '上级uid' after dealer;
-- ----------------------------
-- Title:狸车小程序cms
-- Author:lcc
-- Table:lc_app_liche_cms
-- ---------------------------
drop table if exists lc_app_liche_cms;
create table lc_app_liche_cms (
id int(10) unsigned not null auto_increment comment '自增id',
title varchar(128) not null default '' comment '标题',
url varchar(128) not null default '' comment '链接',
cover varchar(128) not null default '' comment '图片',
content text comment '详情',
s_time int(10) unsigned not null default '0' comment '开始时间',
e_time int(10) unsigned not null default '0' comment '结束时间 0表示长期有效',
type tinyint(1) not null default '1' comment '类型 1购车 ',
target_id int(10) unsigned not null default '0' comment '对象id',
position tinyint(1) not null default '0' comment '默认0首页',
jsondata json default null comment '其他信息',
sort int(11) not null default '0' comment '排序',
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='狸车小程序cms';
-- ----------------------------
-- Title:狸车用户数据表
-- Author:lcc
-- Table:lc_app_liche_udata
-- ---------------------------
drop table if exists lc_app_liche_udata;
create table lc_app_liche_udata (
id int(10) unsigned not null auto_increment comment '自增id',
cf_id int(10) unsigned not null default '0' comment '来源id',
type int(10) unsigned not null default '0' comment '类型(0推广素材二维码)',
datatype char(10) not null default '0' comment '数据类型 img video',
dataurl char(200) not null default '' comment '资源地址',
jsondata json default null comment '附加字段',
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='狸车用户数据表';