49 lines
2.4 KiB
SQL
49 lines
2.4 KiB
SQL
-- ----------------------------
|
|
-- 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='车型库_品牌';
|
|
alter table lc_auto_brand add logo varchar(70) not null default '' comment '品牌logo' after name;
|
|
|
|
-- ----------------------------
|
|
-- 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='车型属性';
|