Files
liche/sql/item.sql
T
2021-07-22 18:14:25 +08:00

37 lines
2.7 KiB
SQL

-- ----------------------------
-- 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='商品表'