add-sql-file
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:小程序表
|
||||
-- Author:laa
|
||||
-- Table:lc_app
|
||||
-- ---------------------------
|
||||
drop table if exists lc_app;
|
||||
create table lc_app (
|
||||
id int(11) not null auto_increment,
|
||||
name char(30) not null default '' comment '名称',
|
||||
logo varchar(128) not null default '' comment 'logo',
|
||||
jsondata text not null default '' comment '更多数据',
|
||||
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='小程序表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:app配置表
|
||||
-- Author:xxb
|
||||
-- Table:lc_app_config
|
||||
-- ---------------------------
|
||||
drop table if exists lc_app_config;
|
||||
create table lc_app_config (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
app_id int unsigned not null default 0 comment '小程序id',
|
||||
title varchar(128) not null default '' comment '标题',
|
||||
k varchar(32) not null comment '配置key',
|
||||
v json default null comment '配置数据',
|
||||
admin_id int unsigned not null default 0 comment '操作员ID',
|
||||
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 comment='app配置表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:支付回调日志
|
||||
-- Author:lcc
|
||||
-- Table:lc_app_wxpaylog
|
||||
-- ---------------------------
|
||||
drop table if exists lc_app_wxpaylog;
|
||||
create table lc_app_wxpaylog (
|
||||
id int(11) unsigned not null auto_increment comment '自增id',
|
||||
app_id int(10) unsigned not null default '1' comment '小程序id',
|
||||
sid varchar(32) not null comment '订单号',
|
||||
trade_no varchar(32) not null comment '支付流水号',
|
||||
notify_param text comment '回调参数',
|
||||
u_time timestamp not null default current_timestamp comment '更新时间',
|
||||
primary key (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='支付回调日志'
|
||||
@@ -0,0 +1,46 @@
|
||||
-- ----------------------------
|
||||
-- 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='狸车小程序用户表'
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- 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';
|
||||
@@ -0,0 +1,24 @@
|
||||
-- ----------------------------
|
||||
-- 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='狸车宝用户表'
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
-- ----------------------------
|
||||
-- Title:动态表
|
||||
-- Author:0fun
|
||||
-- Table:lc_subjects
|
||||
-- ---------------------------
|
||||
drop table if exists lc_subjects;
|
||||
create table lc_subjects(
|
||||
id int unsigned not null auto_increment comment '自增id',
|
||||
app_id int unsigned not null default 1 comment '小程序ID',
|
||||
app_uid int unsigned not null comment '用户id',
|
||||
title varchar(32) not null default '' comment '标题',
|
||||
cover text comment '封面(多图用逗号隔开,包含图片信息)',
|
||||
imgs text comment '图片信息(多图用逗号隔开,包含图片信息)',
|
||||
content text not null comment '内容',
|
||||
cate_id int(10) unsigned not null default '0' comment '图片信息',
|
||||
biz_id int(10) unsigned not null default '0' comment '商家id',
|
||||
address varchar(255) not null default '' comment '定位地址',
|
||||
lat double(15,12) not null default '0.000000000000' comment '经度',
|
||||
lng double(15,12) not null default '0.000000000000' comment '纬度',
|
||||
zan_num int unsigned not null default 0 comment '点赞数',
|
||||
fav_num int unsigned not null default 0 comment '收藏数',
|
||||
share_num int unsigned not null default 0 comment '分享数',
|
||||
status tinyint(1) not null default 1 comment '状态:-1删除,0禁用,1正常',
|
||||
top tinyint(1) not null default 0 comment '0正常,1置顶',
|
||||
c_time int unsigned not null default 0 comment '创建时间',
|
||||
u_time timestamp not null default current_timestamp on update current_timestamp,
|
||||
primary key(id),
|
||||
key idx_user_subject (app_id,app_uid,status),
|
||||
key idx_cate_subject (app_id,cate_id,status)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 comment='动态表';
|
||||
alter table lc_subjects add column hit_num int(10) not null default 0 comment '浏览量' after share_num;
|
||||
alter table lc_subjects add column type tinyint(1) unsigned not null default 0 comment '类型 0图片 1视频' after app_uid;
|
||||
alter table lc_subjects add column video varchar(128) not null default '' comment '视频地址' after imgs;
|
||||
alter table lc_subjects add column sort int unsigned not null default 0 comment '排序,倒序' after top;
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:用户动态喜好表
|
||||
-- Author:0fun
|
||||
-- Table:lc_subject_user_fond
|
||||
-- ---------------------------
|
||||
drop table if exists lc_subject_user_fond;
|
||||
create table lc_subject_user_fond(
|
||||
id int unsigned not null auto_increment comment '自增id',
|
||||
app_id int unsigned not null default 1 comment '小程序ID',
|
||||
app_uid int unsigned not null comment '用户id',
|
||||
type tinyint(1) not null default 0 comment '喜好类型 1收藏 2点赞 3分享',
|
||||
sub_id int unsigned not null comment '动态id',
|
||||
primary key (id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 comment='小程序用户喜好表';
|
||||
alter table lc_subject_user_fond
|
||||
add column ftype tinyint(1) unsigned not null default 0 comment '类型 0好评 1回复' after app_uid,
|
||||
add column ftype_id int unsigned not null comment '目标ID' after ftype;
|
||||
alter table lc_subject_user_fond add index idx_fond (app_id, app_uid) ;
|
||||
@@ -0,0 +1,47 @@
|
||||
-- ----------------------------
|
||||
-- Title:车型库_品牌
|
||||
-- Author:lcc
|
||||
-- Table:lc_auto_brand
|
||||
-- ---------------------------
|
||||
drop table if exists lc_auto_brand;
|
||||
create table lc_auto_brand (
|
||||
id int(10) unsigned not null auto_increment comment '品牌id',
|
||||
name char(16) not null default '' comment '品牌',
|
||||
status tinyint(1) not null default '1' comment '状态: 1正常 -1删除 0下架',
|
||||
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='车型库_品牌';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:车型库_车系
|
||||
-- Author:lcc
|
||||
-- Table:lc_auto_series
|
||||
-- ---------------------------
|
||||
drop table if exists lc_auto_series;
|
||||
create table lc_auto_series (
|
||||
id int(10) unsigned not null auto_increment comment '车系id',
|
||||
brand_id int(11) not null comment '品牌id',
|
||||
name char(32) not 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='车型库_车系'
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:车型属性
|
||||
-- Author:lcc
|
||||
-- Table:lc_auto_attr
|
||||
-- ---------------------------
|
||||
drop table if exists lc_auto_attr;
|
||||
create table lc_auto_attr (
|
||||
id int(10) not null auto_increment comment '自增id',
|
||||
s_id int(10) not null comment '车系id',
|
||||
title varchar(50) not null default '' comment '标题',
|
||||
type tinyint(2) not null default '0' comment '0颜色 1型号 2内饰颜色',
|
||||
jsondata json default null comment '参数数据',
|
||||
u_time timestamp not null default current_timestamp on update current_timestamp comment '更新时间',
|
||||
c_time int(10) not null default '0' comment '创建时间',
|
||||
primary key (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='车型属性';
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
-- ----------------------------
|
||||
-- Title:商家表
|
||||
-- Author:lcc
|
||||
-- Table:lc_biz
|
||||
-- ---------------------------
|
||||
drop table if exists lc_biz;
|
||||
create table lc_biz (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
biz_name varchar(32) not null comment '商家名称',
|
||||
headimg varchar(128) not null default '' comment '商家头像',
|
||||
cover varchar(128) not null default '' comment '商家封面',
|
||||
brand_id int(10) unsigned not null default '0' comment '品牌id',
|
||||
province_id int(10) unsigned not null default '0' comment '省id',
|
||||
city_id int(10) unsigned not null default '0' comment '城市id',
|
||||
county_id int(10) unsigned not null default '0' comment '区id',
|
||||
area_id int(10) unsigned not null default '0' comment '商圈/路段id',
|
||||
firstchar varchar(16) not null default '' comment '大写拼音首字母',
|
||||
lat double(15,12) not null default '0.000000000000' comment '经度',
|
||||
lng double(15,12) not null default '0.000000000000' comment '纬度',
|
||||
address varchar(255) not null default '' comment '具体地址',
|
||||
floor tinyint(1) not null default '0' comment '楼层',
|
||||
status tinyint(1) not null default '0' comment '-1删除,0下架,1正常',
|
||||
c_time int(11) 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 COLLATE=utf8mb4_0900_ai_ci COMMENT='商家表'
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:品牌表
|
||||
-- Author:lcc
|
||||
-- Table:lc_biz_brand
|
||||
-- ---------------------------
|
||||
drop table if exists lc_biz_brand;
|
||||
create table lc_biz_brand (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
brand_name varchar(32) not null comment '品牌名称',
|
||||
brand_logo varchar(128) not null default '' comment '品牌logo',
|
||||
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='品牌表'
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:商家标签关系
|
||||
-- Author:lcc
|
||||
-- Table:lc_biz_tagdata
|
||||
-- ---------------------------
|
||||
drop table if exists lc_biz_tagdata;
|
||||
create table lc_biz_tagdata (
|
||||
biz_id int(10) unsigned not null comment '商家id',
|
||||
tag_id int(10) unsigned not null comment '标签id',
|
||||
type tinyint(1) not null default '1' comment '1亮点标签 2附加标签',
|
||||
primary key (biz_id,tag_id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商家标签关系'
|
||||
@@ -0,0 +1,17 @@
|
||||
-- ----------------------------
|
||||
-- Title:行政区域表
|
||||
-- Author:0fun
|
||||
-- Table:lc_city
|
||||
-- ---------------------------
|
||||
drop table if exists lc_area;
|
||||
create table lc_area(
|
||||
id int unsigned not null auto_increment comment 'id',
|
||||
province_id int unsigned not null comment '省id',
|
||||
province_name varchar(32) not null comment '省名称',
|
||||
city_id int unsigned not null comment '城市id',
|
||||
city_name varchar(32) not null comment '城市名称',
|
||||
county_id int unsigned not null comment '区id',
|
||||
county_name varchar(32) not null comment '区名称',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='行政区域表';
|
||||
alter table lc_area add firstchar varchar(4) not null default '' comment '城市大写首字母'
|
||||
@@ -0,0 +1,36 @@
|
||||
-- ----------------------------
|
||||
-- Title:行政区域表
|
||||
-- Author:lcc
|
||||
-- Table:lc_items
|
||||
-- ---------------------------
|
||||
drop table if exists lc_items;
|
||||
create table lc_items (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
brand_id int(10) unsigned not null default '0' comment '品牌id',
|
||||
s_id int(10) unsigned not null default '0' comment '车系id',
|
||||
v_id int(10) unsigned not null default '0' comment '车型id',
|
||||
cor_id int(10) unsigned not null default '0' comment '车身颜色id',
|
||||
incor_id int(10) unsigned not null default '0' comment '内饰颜色',
|
||||
ori_price decimal(10,2) not null default '0.00' comment '指导价',
|
||||
sale_price decimal(10,2) not null default '0.00' comment '售价',
|
||||
bill_price decimal(10,2) not null default '0.00' comment '开票金额',
|
||||
buy_price decimal(10,2) not null default '0.00' comment '采购成本',
|
||||
dis_price decimal(10,2) not null default '0.00' comment '折扣价',
|
||||
discount tinyint(3) unsigned not null default '0' comment '折扣百分比',
|
||||
address varchar(100) not null default '' comment '送货地址',
|
||||
vin varchar(100) not null default '' comment 'vin码',
|
||||
frame_num varchar(100) not null default '' comment '车架号',
|
||||
engine_num varchar(100) not null default '' comment '发动机号',
|
||||
stdard_num varchar(100) not null default '' comment '合格证号',
|
||||
bill_num varchar(100) not null default '' comment '开票号',
|
||||
if_pack tinyint(1) unsigned not null default '0' comment '是否需要装包(0否 1是)',
|
||||
status tinyint(1) not null default '1' comment '状态值(0下架 1正常 2已售)',
|
||||
pro_time timestamp not null default '0000-00-00 00:00:00' comment '生产时间',
|
||||
p_time timestamp not null default '0000-00-00 00:00:00' comment '分配时间',
|
||||
out_time timestamp not null default '0000-00-00 00:00:00' comment '出库时间',
|
||||
bill_time timestamp not null default '0000-00-00 00:00:00' comment '开票时间',
|
||||
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 AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='商品表'
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
-- ----------------------------
|
||||
-- Title:消费订单表
|
||||
-- Author:lcc
|
||||
-- Table:lc_order_purchase
|
||||
-- ---------------------------
|
||||
drop table if exists hd_order_purchase;
|
||||
create table `lc_order_purchase` (
|
||||
`id` int(10) unsigned not null auto_increment,
|
||||
`app_id` int(10) unsigned not null comment '小程序id',
|
||||
`app_uid` int(10) unsigned not null comment '小程序用户id',
|
||||
`sid` varchar(32) not null default '' comment '订单号',
|
||||
`item_id` int(10) unsigned not null comment '商品/服务id',
|
||||
`sku_id` int(10) unsigned not null default '0' comment 'id',
|
||||
`item_title` varchar(1024) not null default '' comment '商品/服务名称',
|
||||
`item_num` int(10) unsigned not null default '1' comment '商品/服务数量',
|
||||
`item_price` decimal(12,2) not null default '0.00' comment '商品/服务价格',
|
||||
`biz_id` int(11) not null default '0' comment '商家id',
|
||||
`carriage` int(10) unsigned not null default '0', comment '运费',
|
||||
`total_price` decimal(12,2) not null default '0.00' comment '订单价格',
|
||||
`pay_price` decimal(12,2) not null default '0.00' comment '实付金额',
|
||||
`uname` varchar(16) not null default '' comment '订单用户姓名',
|
||||
`mobile` varchar(11) not null default '' comment '手机号码',
|
||||
`type` tinyint(1) not null default '0' comment '订单类型 1实物 2虚拟 3活动定金 4合同定金',
|
||||
`payway` tinyint(1) not null default '0' comment '支付方式 0未选择 1微信',
|
||||
`pay_time` timestamp not null default '0000-00-00 00:00:00' comment '付款时间',
|
||||
`jsondata` json default null comment '订单其它数据',
|
||||
`descrip` varchar(255) not null default '' comment '备注/描述',
|
||||
`cf_id` int(10) unsigned not null default '0' comment '来源id',
|
||||
`cf_uid` int(10) unsigned not null default '0' comment '来源用户id',
|
||||
`cf_platform` varchar(16) not null default '' comment '来源平台',
|
||||
`status` tinyint(1) not null default '0' comment '订单状态[-2已过期 -1删除 0待支付 1已支付 2退款中 3已退款]',
|
||||
`status_detail` tinyint(1) not null default '0' comment 'status',
|
||||
`expire_time` int(10) unsigned not null default '0' comment '订单过期时间(0不过期)',
|
||||
`express_time` timestamp not null default '0000-00-00 00:00:00' comment '发货时间',
|
||||
`finish_time` timestamp not null default '0000-00-00 00:00:00' 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`),
|
||||
key `idx_user_order` (`app_id`,`app_uid`,`status`),
|
||||
key `idx_sid` (`sid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='消费订单表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单总表
|
||||
-- Author:lcc
|
||||
-- Table:lc_orders
|
||||
-- ---------------------------
|
||||
drop table if exists lc_orders;
|
||||
create table lc_orders(
|
||||
id int unsigned not null auto_increment,
|
||||
app_id int unsigned not null default 1 comment '小程序ID',
|
||||
app_uid int unsigned not null default 1 comment '小程序用户ID',
|
||||
sid varchar(32) not null default '' comment '订单号',
|
||||
mobile varchar(11) not null default '' comment '手机号码',
|
||||
type varchar(16) not null default '' comment '订单类型(表名)',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 comment='订单表';
|
||||
@@ -0,0 +1,45 @@
|
||||
-- ----------------------------
|
||||
-- Title:线索池
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_clues
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_clues;
|
||||
create table `lc_receiver_clues` (
|
||||
`id` int(10) not null auto_increment comment '自增id',
|
||||
`name` varchar(32) not null comment '客户姓名',
|
||||
`mobile` varchar(11) not null comment '客户手机号码',
|
||||
`brand_id` int(10) not null default '0' comment '车型品牌id',
|
||||
`s_id` int(10) not null default '0' comment '车系id',
|
||||
`if_driver` tinyint(4) not null default '0' comment '是否试驾(0否 1是)',
|
||||
`admin_id` int(10) not null default '0' comment '销售id',
|
||||
`app_id` int(10) unsigned not null default '0' comment '来源小程序id',
|
||||
`cf_id` int(10) not null default '0' comment '来源id',
|
||||
`out_id` int(10) not null default '0' comment '外部来源id',
|
||||
`cf_uid` int(10) not null default '0' comment '来源用户id',
|
||||
`cf_platform` varchar(20) not null default '' comment '来源平台',
|
||||
`jsondata` json default null comment '其它信息',
|
||||
`status` tinyint(1) not null default '0' comment '状态',
|
||||
`status_id` int(10) not null default '1',
|
||||
`u_time` timestamp not null default current_timestamp on update current_timestamp,
|
||||
`c_time` int(10) unsigned not null default '0' comment '创建时间',
|
||||
primary key (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='线索池';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:线索操作日志表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_clue_oplogs
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_clue_oplogs;
|
||||
create table `lc_receiver_clue_oplogs` (
|
||||
`id` int(10) unsigned not null auto_increment comment '自增id',
|
||||
`clue_id` int(10) unsigned not null comment '线索id',
|
||||
`uid` int(10) unsigned not null comment '操作用户id',
|
||||
`uname` varchar(32) not null default '' comment '操作用户名',
|
||||
`type` tinyint(1) not null default '0' comment '类型',
|
||||
`log` varchar(256) not null default '' 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='线索操作日志表';
|
||||
@@ -0,0 +1,53 @@
|
||||
-- ----------------------------
|
||||
-- Title:客户表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_customers
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_customers;
|
||||
create table lc_receiver_customers (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
rid int(10) unsigned not null default '0' comment '线索池id',
|
||||
name varchar(32) not null comment '客户姓名',
|
||||
mobile varchar(11) not null comment '客户手机号码',
|
||||
biz_id int(10) not null default '0' comment '门店id',
|
||||
brand_id int(10) not null default '0' comment '车型品牌id',
|
||||
s_id int(10) not null default '0' comment '车系id',
|
||||
v_id int(10) not null default '0' comment '车型号',
|
||||
if_driver tinyint(4) not null default '0' comment '是否试驾(0否 1是)',
|
||||
is_top tinyint(4) not null default '0' comment '是否置顶(0否 1是)',
|
||||
admin_id int(10) not null default '0' comment '销售id',
|
||||
level enum('h','a','b','c','d') not null default 'd' comment '用户等级',
|
||||
cf_title varchar(50) not null default '' comment '来源title',
|
||||
t_num tinyint(3) not null default '0' comment '试驾次数',
|
||||
a_num tinyint(3) not null default '0' comment '到店次数',
|
||||
p_time timestamp not null default '0000-00-00 00:00:00' comment '分配时间',
|
||||
cont_time timestamp not null default '0000-00-00 00:00:00' comment '最后联系时间',
|
||||
buy_time timestamp not null default '0000-00-00 00:00:00' comment '预计购买时间',
|
||||
user_json json default null comment '用户其它数据',
|
||||
car_json json default null comment '车信息',
|
||||
jsondata json default null comment '其他信息',
|
||||
status tinyint(1) not null default '0' comment '状态:-1删除 0未见客户 1到店客户 2订单客户 3战败客户',
|
||||
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='客户表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:客户操作日志表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_customer_oplogs
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_customer_oplogs;
|
||||
create table lc_receiver_customer_oplogs (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
customer_id int(10) unsigned not null comment '客户id',
|
||||
uid int(10) unsigned not null comment '操作用户id',
|
||||
uname varchar(32) not null default '' comment '用户名',
|
||||
type tinyint(1) not null default '0' comment '类型 0 普通 1短信 2电话',
|
||||
log varchar(256) not null default '' comment '操作内容',
|
||||
cf_platform varchar(10) not null default '' 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='客户操作日志表';
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
-- ----------------------------
|
||||
-- Title:订单代办表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_agents
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_agents;
|
||||
create table lc_receiver_order_agents (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
car_num varchar(20) not null default '' comment '车牌号',
|
||||
if_ins tinyint(1) not null default '0' comment '否是交强制险',
|
||||
car_img varchar(100) not null default '' comment '行驶证',
|
||||
ins_img json default null comment '保险单图片',
|
||||
ins_time timestamp not null default '0000-00-00 00:00:00' comment '保险到期时间',
|
||||
status tinyint(1) not null default '0' comment '状态(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),
|
||||
unique key o_id (o_id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='订单代办表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单开票
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_bills
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_bills;
|
||||
create table lc_receiver_order_bills (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
cardida varchar(100) not null default '' comment '省份证正面图片',
|
||||
cardidb varchar(100) not null default '' comment '省份证正面图片',
|
||||
money decimal(10,2) not null default '0.00' comment '到账金额',
|
||||
file varchar(100) not null default '' comment 'pdf文件',
|
||||
jsondata json default null comment 'json数据',
|
||||
status tinyint(1) not null default '0' comment '状态(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),
|
||||
unique key o_id (o_id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='订单开票';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单车辆确定表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_ckcars
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_ckcars;
|
||||
create table lc_receiver_order_ckcars (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
status tinyint(1) not null default '0' comment '状态(0未确定 1后台确定 2用户签名)',
|
||||
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),
|
||||
unique key o_id (o_id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='订单车辆确定表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单合同信息
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_contracts
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_contracts;
|
||||
create table lc_receiver_order_contracts (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
cid varchar(32) not null comment '合同编号',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
file varchar(255) not null default '' comment '合同文件地址',
|
||||
imgs json default null comment '合同图片地址',
|
||||
jsondata json default null comment '其他信息',
|
||||
type tinyint(1) not null default '0' comment '合同类型(0整车合同 1代理协议 2确定信息 3交接信息)',
|
||||
status tinyint(1) not null default '0' comment '状态(0未签署 1已签署)',
|
||||
sign_time timestamp not null default '0000-00-00 00:00:00' 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='订单合同信息';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:交付确认订单
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_deliverys
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_deliverys;
|
||||
create table lc_receiver_order_deliverys (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
status tinyint(1) not null default '0' comment '状态(0待确认 1用户已确认 2销售已确认)',
|
||||
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),
|
||||
unique key o_id (o_id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='交付确认订单';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单贷款表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_loans
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_loans;
|
||||
create table lc_receiver_order_loans (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
title varchar(100) not null default '' comment '产品名称',
|
||||
year tinyint(2) not null default '0' comment '贷款年限',
|
||||
first_price decimal(9,2) not null default '0.00' comment '首付金额',
|
||||
notify_file varchar(100) not null default '' comment '通知函文件',
|
||||
lend_file varchar(100) not null default '' comment '放款函文件',
|
||||
status tinyint(1) not null default '0' comment '状态(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),
|
||||
unique key o_id (o_id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='订单贷款表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单操作日志表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_oplogs
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_loans;
|
||||
create table lc_receiver_order_oplogs (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
order_id int(10) unsigned not null comment '订单id',
|
||||
uid int(10) unsigned not null comment '操作用户id',
|
||||
uname varchar(32) not null default '' comment '用户名',
|
||||
type tinyint(1) not null default '0' comment '类型 0 普通 1短信 2电话',
|
||||
log varchar(256) not null default '' comment '操作内容',
|
||||
cf_platform varchar(10) not null default '' 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='订单操作日志表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单合同签订
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_order_signs
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_order_signs;
|
||||
create table lc_receiver_order_signs (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
o_id int(10) unsigned not null default '0' comment '订单表id',
|
||||
status tinyint(1) not null default '0' comment '状态(0已生成合同 1已签合同 2已预交款)',
|
||||
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),
|
||||
unique key o_id (o_id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='订单合同签订';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:订单表
|
||||
-- Author:lcc
|
||||
-- Table:lc_receiver_orders
|
||||
-- ---------------------------
|
||||
drop table if exists lc_receiver_orders;
|
||||
create table lc_receiver_orders (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
rid int(10) not null default '0' comment '客户池id',
|
||||
sid varchar(32) not null comment '订单号',
|
||||
name varchar(32) not null comment '客户姓名',
|
||||
mobile varchar(11) not null comment '客户手机号码',
|
||||
biz_id int(10) not null default '0' comment '门店id',
|
||||
item_id int(10) unsigned not null default '0' comment '商品id',
|
||||
brand_id int(10) not null default '0' comment '车型品牌id',
|
||||
s_id int(10) not null default '0' comment '车系id',
|
||||
v_id int(10) not null default '0' comment '车型号',
|
||||
cor_id int(10) not null default '0' comment '车身颜色id',
|
||||
incor_id int(10) not null default '0' comment '内饰颜色',
|
||||
price decimal(10,2) not null default '0.00' comment '车辆指导价',
|
||||
deposit decimal(8,2) not null default '0.00' comment '车辆定金',
|
||||
payway tinyint(1) not null default '0' comment '付款方式(0分期 1全款)',
|
||||
admin_id int(10) not null default '0' comment '销售id',
|
||||
info_json json default null comment '用户其它信息',
|
||||
car_json json default null comment '车信息',
|
||||
jsondata json default null comment '其他信息',
|
||||
status tinyint(2) not null default '0' comment '状态 0签合同 1办理分期 2车辆确认 3开票 4代理服务 5车辆交付 6完成交付 7退款',
|
||||
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='订单表';
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
-- ----------------------------
|
||||
-- Title:管理员表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_admin
|
||||
-- ---------------------------
|
||||
-- other_json:{"cate_id":[1,27], "city_id":["350200", "350500"], "platfrom_id":[0, 1], "app_id":[1,2]}
|
||||
-- cate_id:可操作行业,city_id:可操作城市,platfrom_id:可登录平台,app_id:可操作应用
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_admin;
|
||||
create table lc_sys_admin(
|
||||
id int unsigned not null auto_increment comment '管理id',
|
||||
username varchar(32) not null comment '管理员名称',
|
||||
mobile varchar(11) not null default '' comment '手机号码',
|
||||
password varchar(255) not null comment '用户密码',
|
||||
role_id int unsigned not null default 0 comment '角色id',
|
||||
other_json text not null default '' comment '行业、城市归属 json格式 {cate_id: [1,2]}',
|
||||
status tinyint(1) not null default 1 comment '状态 -1删除 0:禁用 1:启用',
|
||||
c_time int 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 COMMENT='管理员表';
|
||||
alter table lc_sys_admin add login_ip varchar(16) not null default '' comment '最近登录ip' after status;
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:管理日志表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_admin_log
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_admin_log;
|
||||
create table lc_sys_admin_log(
|
||||
id int unsigned not null auto_increment comment 'id',
|
||||
admin_id int unsigned not null comment '管理员id',
|
||||
username varchar(32) not null comment '管理员名称',
|
||||
target_id int unsigned not null default 0 comment '对象id',
|
||||
descrip varchar(255) not null comment '操作描述',
|
||||
action varchar(32) not null comment '操作节点',
|
||||
ip varchar(32) not null default '' comment 'ip',
|
||||
jsondata text not null default '' comment '更多数据',
|
||||
u_time timestamp not null default current_timestamp on update current_timestamp,
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='管理日志表';
|
||||
create index idx_admin_id on lc_sys_admin_log(admin_id);
|
||||
create index idx_action on lc_sys_admin_log(action);
|
||||
alter table lc_sys_admin_log add type varchar(16) not null default '' comment '特殊日志类型 如jjd';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:区域表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_area
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_area;
|
||||
create table lc_sys_area(
|
||||
id int unsigned not null auto_increment comment 'id',
|
||||
name varchar(32) not null comment '商圈/路段 名称',
|
||||
province_id int unsigned not null comment '省id',
|
||||
province_name varchar(32) not null comment '省名称',
|
||||
city_id int unsigned not null comment '城市id',
|
||||
city_name varchar(32) not null comment '城市名称',
|
||||
county_id int unsigned not null comment '区id',
|
||||
county_name varchar(32) not null comment '区名称',
|
||||
type tinyint(1) unsigned not null default 0 comment '类型 1:商圈|2:路段|3:卖场',
|
||||
status tinyint(1) not null default 1 comment '状态 -1删除 0:禁用 1:启用',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='区域表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:行业分类表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_category
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_category;
|
||||
create table lc_sys_category(
|
||||
id int unsigned not null auto_increment comment 'id',
|
||||
pid int unsigned not null default 0 comment '父id',
|
||||
name varchar(32) not null comment '行业分类名称',
|
||||
status tinyint(1) not null default 1 comment '状态 -1删除 0:禁用 1:启用',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='行业分类表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:开通城市表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_city
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_city;
|
||||
create table lc_sys_city(
|
||||
id int unsigned not null auto_increment comment 'id',
|
||||
city_id int unsigned not null comment '城市id',
|
||||
name varchar(32) not null default '' comment '城市名称',
|
||||
firstchar varchar(2) not null default '' comment '城市首字母',
|
||||
status tinyint(1) not null default 1 comment '状态 -1删除 0:禁用 1:启用',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='开通城市表';
|
||||
|
||||
|
||||
drop table if exists lc_sys_config;
|
||||
create table lc_sys_config(
|
||||
id int unsigned not null auto_increment comment '自增id',
|
||||
k varchar(32) not null comment '配置key',
|
||||
v text not null default '' comment '配置',
|
||||
c_time int 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 COMMENT='系统配置表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:系统菜单表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_menu
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_menu;
|
||||
create table lc_sys_menu(
|
||||
id int unsigned not null auto_increment comment '自增id',
|
||||
pid int unsigned not null default 0 comment '父id',
|
||||
name varchar(32) not null comment '菜单名称',
|
||||
icon varchar(128) not null default '' comment '菜单图标',
|
||||
node varchar(128) not null default '' comment '节点',
|
||||
url varchar(128) not null default '' comment '链接',
|
||||
sort int unsigned not null default 0 comment '排序',
|
||||
status tinyint(1) not null default 1 comment '状态 -1删除 0:禁用 1:启用',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='系统菜单表';
|
||||
alter table lc_sys_menu add outer_link tinyint(1) not null default 0 comment '是否为外链' after url;
|
||||
alter table lc_sys_menu add column type tinyint(1) unsigned not null default 0 comment '类型(0总后台 1商家后台)';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:系统角色表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_role
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_role;
|
||||
create table lc_sys_role(
|
||||
id int unsigned not null auto_increment comment '角色id',
|
||||
name varchar(32) not null comment '角色名称',
|
||||
menu_ids text not null default '' comment '菜单id 都会隔开',
|
||||
action_json text not null default '' comment '操作权限 json格式 {菜单id: [1,2]}',
|
||||
descrip varchar(255) not null default '' comment '角色描述',
|
||||
status tinyint(1) not null default 1 comment '状态 -1删除 0:禁用 1:启用',
|
||||
primary key(id)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='系统角色表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:标签表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_tag
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_tag;
|
||||
create table lc_sys_tag(
|
||||
id int unsigned not null auto_increment comment '自增id',
|
||||
tag_name varchar(128) not null comment '标签名称',
|
||||
primary key(id),
|
||||
unique key (tag_name)
|
||||
)ENGINE=InnoDB default CHARSET=utf8mb4 COMMENT='标签表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:系统内容标签表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_content_tags
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_content_tags;
|
||||
create table lc_sys_content_tags (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
cate_id int(10) unsigned not null comment '一级分类id',
|
||||
cate2_id int(10) unsigned not null comment '二级分类id',
|
||||
tag_id int(10) unsigned not null comment '标签id',
|
||||
status tinyint(1) not null default '1' comment '状态:-1删除,0禁用,1正常',
|
||||
primary key (id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='系统内容标签表'
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:系统内容标签表
|
||||
-- Author:0fun
|
||||
-- Table:lc_sys_tag_category
|
||||
-- ---------------------------
|
||||
drop table if exists lc_sys_tag_category;
|
||||
create table lc_sys_tag_category (
|
||||
id int(10) unsigned not null auto_increment comment '自增id',
|
||||
pid int(10) unsigned not null default '0' comment '父id',
|
||||
name varchar(32) not null default '' comment '分类名称',
|
||||
status tinyint(1) not null default '1' comment '状态:-1删除,0禁用,1正常',
|
||||
primary key (id)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COLLATE=UTF8MB4_0900_AI_CI COMMENT='系统标签分类表'
|
||||
Reference in New Issue
Block a user