shopCategory.sql
1.11 KB
CREATE TABLE `shop_sales_category`(
`category_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '类目ID',
`category_name` VARCHAR(50) NOT NULL COMMENT '类目名称',
`shop_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '店铺ID',
`create_time` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`category_id`),
KEY `ind_category_name` (`category_name`),
KEY `ind_shop_id` (`shop_id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT ='店铺销售类目表'
CREATE TABLE `category_product_mapper`(
`id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`category_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '类目ID',
`product_skn` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT ' 商品SKN',
`create_time` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '最后更新时间',
PRIMARY KEY (`id`),
KEY `ind_category_id` (`category_id`),
KEY `ind_product_skn` (`product_skn`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='类目和商品映射表'