|
| 1 | +create table goods |
| 2 | +( |
| 3 | + id int unsigned primary key auto_increment comment’商品id’, |
| 4 | + category_id int unsigned not null default 0 comment’分类id’, |
| 5 | + spu_id int unsigned not null default 0 comment’SPU id’, |
| 6 | + sn varchar(20) not null default ‘’ comment’编号’, |
| 7 | + name varchar(120) not null default ‘‘comment’名称’, |
| 8 | + keyword varchar(255) not null default ‘’ comment’关键字’, |
| 9 | + picture varchar(255) not null default ’’ comment’图片’, |
| 10 | + tips varchar(255) not null default ‘’ comment’提示’, |
| 11 | + description varchar(255) not null default ‘’ comment’描述’, |
| 12 | + content text not null comment’详情’, |
| 13 | + price decimal(10, 2) unsigned not null default 0 comment ‘价格’, |
| 14 | + stock int unsigned not null default 0 comment ‘库存’, |
| 15 | + score decimal(3, 2) unsigned not null default 0 comment’评分’, |
| 16 | + is_on_sale tinyint unsigned not null default 0 comment’是否上架’, |
| 17 | + is_del tinyint unsigned not null default 0 comment’是否删除’, |
| 18 | + is_free_shipping tinyint unsigned not null default 0 comment’是否包邮’, |
| 19 | + sell_count int unsigned not null default 0 comment’销量计数’, |
| 20 | + comment int unsigned not null default 0 comment’评论计数’, |
| 21 | + on_sale_time datetime default null comment’上架时间’, |
| 22 | + create_time datetime not null default current_timestamp comment’创建时间’, |
| 23 | + update_time datetime default null comment’更新时间’ |
| 24 | +); |
0 commit comments