– 表的结构 `ecs_goods_activity`
CREATE TABLE IF NOT EXISTS `ecs_goods_activity` (
`act_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID号',
`act_name` varchar(255) NOT NULL COMMENT '促销活动的名称',
`act_desc` text NOT NULL COMMENT '促销活动的描述',
`act_type` tinyint(3) unsigned NOT NULL,
`goods_id` mediumint(8) unsigned NOT NULL COMMENT '参加活动的id,取值于ecs_goods的goods_id',
`goods_name` varchar(255) NOT NULL COMMENT '商品的名称,取值于ecs_goods的goods_id',
`start_time` int(10) unsigned NOT NULL COMMENT '活动开始时间',
`end_time` int(10) unsigned NOT NULL COMMENT '活动结束时间',
`is_finished` tinyint(3) unsigned NOT NULL COMMENT '活动是否结束,0,结束;1,未结束',
`ext_info` text NOT NULL COMMENT '序列化后的促销活动的配置信息,包括最低价,最高价,出价幅度,保证金等',
PRIMARY KEY (`act_id`),
KEY `act_name` (`act_name`,`act_type`,`goods_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='拍卖活动和夺宝奇兵活动配置信息表' AUTO_INCREMENT=5 ;
– 表的结构 `ecs_goods_article`
CREATE TABLE IF NOT EXISTS `ecs_goods_article` (
`goods_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '商品id,取自ecs_goods的goods_id',
`article_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '文章id,取自 ecs_article 的article_id',
`admin_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '猜想是管理员的id,但是程序中似乎没有提及到',
PRIMARY KEY (`goods_id`,`article_id`,`admin_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='文章关联产品表,即文章中提到的相关产品';
– 表的结构 `ecs_goods_attr`
CREATE TABLE IF NOT EXISTS `ecs_goods_attr` (
`goods_attr_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID号',
`goods_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '该具体属性属于的商品,取值于ecs_goods的goods_id',
`attr_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '该具体属性属于的属性类型的id,取自ecs_attribute 的attr_id',
`attr_value` text NOT NULL COMMENT '该具体属性的值',
`attr_price` varchar(255) NOT NULL COMMENT '该属性对应在商品原价格上要加的价格',
PRIMARY KEY (`goods_attr_id`),
KEY `goods_id` (`goods_id`),
KEY `attr_id` (`attr_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='具体商品的属性表' AUTO_INCREMENT=62 ;
– 表的结构 `ecs_goods_cat`
CREATE TABLE IF NOT EXISTS `ecs_goods_cat` (
`goods_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '商品id',
`cat_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '商品分类id',
PRIMARY KEY (`goods_id`,`cat_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='商品的扩展分类';
– 表的结构 `ecs_goods_gallery`
CREATE TABLE IF NOT EXISTS `ecs_goods_gallery` (
`img_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品相册自增id',
`goods_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '图片属于商品的id',
`img_url` varchar(255) NOT NULL COMMENT '实际图片url',
`img_desc` varchar(255) NOT NULL COMMENT '图片说明信息',
`thumb_url` varchar(255) NOT NULL COMMENT '微缩图片url',
`img_original` varchar(255) NOT NULL COMMENT '根据名字猜,应该是上传的图片文件的最原始的文件的url',
PRIMARY KEY (`img_id`),
KEY `goods_id` (`goods_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品相册表,只出现在页面的商品相册中' AUTO_INCREMENT=23 ;
– 表的结构 `ecs_booking_goods`
CREATE TABLE IF NOT EXISTS `ecs_booking_goods` (
`rec_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID号',
`user_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '登记该缺货记录的用户的id,取值ecs_users的user_id',
`email` varchar(60) NOT NULL COMMENT '页面填的用户的email,默认取值于ecs_users的email',
`link_man` varchar(60) NOT NULL COMMENT '页面填的用户的姓名,默认取值于ecs_users的consignee ',
`tel` varchar(60) NOT NULL COMMENT '页面填的用户的电话,默认取值于ecs_users的tel',
`goods_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '缺货登记的商品id,取值于ecs_goods的 goods_id',
`goods_desc` varchar(255) NOT NULL COMMENT '缺货登记时留的订购描述',
`goods_number` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '订购数量',
`booking_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '缺货登记的时间',
`is_dispose` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否已经被处理',
`dispose_user` varchar(30) NOT NULL COMMENT '处理该缺货登记的管理员用户名,取值于session,该session取值于ecs_admin_user的user_name',
`dispose_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '处理的时间',
`dispose_note` varchar(255) NOT NULL COMMENT '处理时管理员留的备注',
PRIMARY KEY (`rec_id`),
KEY `user_id` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT=' 缺货登记的订购和处理记录表' AUTO_INCREMENT=4 ;