分类表
字段名称 |
类型 |
约束 |
|
描述 |
cat_id |
int(32) |
PK |
NOT NULL |
分类唯一ID |
cat_name |
varchar(255) |
|
NULL |
分类名称 |
cat_pid |
int(32) |
|
NULL |
分类父ID |
cat_level |
int(4) |
|
NULL |
分类层级 0: 顶级 1:二级 2:三级 |
cat_deleted |
int(2) |
|
NULL |
是否删除 1为删除 |
cat_icon |
varchar(255) |
|
NULL |
|
cat_src |
text |
|
NULL |
|
CREATE TABLE `ms_category` (
`cat_id` int(32) NOT NULL AUTO_INCREMENT COMMENT '分类唯一ID',
`cat_name` varchar(255) DEFAULT NULL COMMENT '分类名称',
`cat_pid` int(32) DEFAULT NULL COMMENT '分类父ID',
`cat_level` int(4) DEFAULT NULL COMMENT '分类层级 0: 顶级 1:二级 2:三级',
`cat_deleted` int(2) DEFAULT '0' COMMENT '是否删除 1为删除',
`cat_icon` varchar(255) DEFAULT NULL,
`cat_src` text,
PRIMARY KEY (`cat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1484 DEFAULT CHARSET=utf8
商品表???
字段名称 |
类型 |
约束 |
|
描述 |
goods_id |
mediumint(8) |
PK |
unsigned NOT NULL |
主键id |
goods_name |
varchar(255) |
UNIQUE |
NOT NULL |
商品名称 |
goods_price |
decimal(10,2) |
|
NOT NULL |
商品价格 |
goods_number |
int(8) |
|
unsigned NOT NULL |
商品数量 |
goods_weight |
smallint(5) |
|
unsigned NOT NULL |
商品重量 |
cat_id |
smallint(5) |
FK |
unsigned NOT NULL |
类型id |
goods_introduce |
text |
|
NULL |
商品详情介绍 |
goods_big_logo |
char(128) |
|
NOT NULL |
图片logo大图 |
goods_small_logo |
char(128) |
|
NOT NULL |
图片logo小图 |
is_dele |
num(‘0’,‘1’) |
|
NOT NULL |
0:正常 1:删除 |
add_time |
int(11) |
|
NOT NULL |
添加商品时间 |
upd_time |
int(11) |
|
NOT NULL |
修改商品时间 |
delete_time |
int(11) |
|
NULL |
软删除标志字段 |
cat_one_id |
smallint(5) |
|
NULL |
一级分类id |
cat_two_id |
smallint(5) |
|
NULL |
二级分类id |
cat_three_id |
smallint(5) |
|
NULL |
三级分类id |
hot_mumber |
int(11) |
|
unsigned NULL |
热卖数量 |
is_promote |
smallint(5) |
|
NULL |
是否促销 |
goods_state |
int(11) |
|
NULL |
商品状态 0: 未通过 1: 审核中 2: 已审核 |
CREATE TABLE `ms_goods` (
`goods_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id',
`goods_name` varchar(255) NOT NULL COMMENT '商品名称',
`goods_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品价格',
`goods_number` int(8) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
`goods_weight` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '商品重量',
`cat_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '类型id',
`goods_introduce` text COMMENT '商品详情介绍',
`goods_big_logo` char(128) NOT NULL DEFAULT '' COMMENT '图片logo大图',
`goods_small_logo` char(128) NOT NULL DEFAULT '' COMMENT '图片logo小图',
`is_del` enum('0','1') NOT NULL DEFAULT '0' COMMENT '0:正常 1:删除',
`add_time` int(11) NOT NULL COMMENT '添加商品时间',
`upd_time` int(11) NOT NULL COMMENT '修改商品时间',
`delete_time` int(11) DEFAULT NULL COMMENT '软删除标志字段',
`cat_one_id` smallint(5) DEFAULT '0' COMMENT '一级分类id',
`cat_two_id` smallint(5) DEFAULT '0' COMMENT '二级分类id',
`cat_three_id` smallint(5) DEFAULT '0' COMMENT '三级分类id',
`hot_mumber` int(11) unsigned DEFAULT '0' COMMENT '热卖数量',
`is_promote` smallint(5) DEFAULT '0' COMMENT '是否促销',
`goods_state` int(11) DEFAULT '0' COMMENT '商品状态 0: 未通过 1: 审核中 2: 已审核',
PRIMARY KEY (`goods_id`),
UNIQUE KEY `goods_name` (`goods_name`),
KEY `cat_id ` (`cat_id `)
) ENGINE=InnoDB AUTO_INCREMENT=928 DEFAULT CHARSET=utf8 COMMENT='商品表'