21.yty_feedbacks
CREATE TABLE `yty_feedbacks` (
`feedbackld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`feedbackType` int(4) NOT NULL DEFAULT '0' COMMENT '反馈类型,内容来自原系统基础数据表',
`userId` int(11) DEFAULT NULL COMMENT '反馈者ID',
`createTime` datetime NOT NULL COMMENT '反馈时间',
`feedbackContent` text COMMENT '反馈内容',
`contactInfo` varchar(100) DEFAULT NULL COMMENT '联系方式',
`dataFlag` tinyint(4) DEFAULT '1' COMMENT '删除标志 1:有效 -1:删除',
`feedbackStatus` tinyint(4) DEFAULT '0' COMMENT '反馈记录状态 0:待处理 1:已处理',
`staffld` int(11) DEFAULT '0' COMMENT '处理者ID',
`handleTime` datetime DEFAULT NULL COMMENT '处理时间',
`handleContent` text COMMENT '处理结果',
PRIMARY KEY (`feedbackld`),
KEY `userId` (`userId`),
KEY `staffld` (`staffld`),
CONSTRAINT `yty_feedbacks_ibfk_1` FOREIGN KEY (`staffld`) REFERENCES `yty_staffs` (`staffId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
22.yty_friendlinks
CREATE TABLE `yty_friendlinks` (
`friendlinkId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`friendlinklco` varchar(150) DEFAULT NULL COMMENT '图标',
`friendlinkName` varchar(50) NOT NULL COMMENT '名称',
`friendlinkUrl` varchar(150) NOT NULL COMMENT '网址',
`friendlinkSort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志',
`createTime` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`friendlinkId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
23.yty_goods
CREATE TABLE `yty_goods` (
`goodsld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`goodSn` varchar(20) NOT NULL COMMENT '商品编号',
`productNo` varchar(20) NOT NULL COMMENT '商品货号',
`goodsName` varchar(200) NOT NULL COMMENT '商品名称',
`goodsImg` varchar(150) NOT NULL COMMENT '商品图片',
`shopId` int(11) NOT NULL COMMENT '店铺ID',
`marketPrice` decimal(11,2) NOT NULL COMMENT '市场价',
`shopPrice` decimal(11,2) NOT NULL COMMENT '店铺价',
`warnStock` int(11) NOT NULL DEFAULT '0' COMMENT '预警库存',
`goodsStock` int(11) NOT NULL DEFAULT '0' COMMENT '商品总库存',
`goodsUnit` char(10) NOT NULL COMMENT '单位',
`goodsTips` text COMMENT '促销信息',
`isSale` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否上架 0:不上架 1:上架',
`isBest` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否精品 0:否 1:是',
`isHot` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否热销产品 0:否 1:是',
`isNew` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否新品 0:否 1:是',
`isRecom` tinyint(4) DEFAULT '0' COMMENT '是否推荐 0:否 1:是',
`goodsCatldPath` varchar(255) DEFAULT NULL COMMENT '商品分类ID路径 catld1_catld2_catld3',
`goodsCatld` int(11) NOT NULL COMMENT '最后一级商品分类ID',
`shopCatId1` int(11) NOT NULL COMMENT '门店商品分类第一级ID',
`shopCatId2` int(11) NOT NULL COMMENT '门店商品第二级分类ID',
`brandId` int(11) NOT NULL DEFAULT '0' COMMENT '品牌ID',
`goodsDesc` text COMMENT '商品描述',
`goodsStatus` tinyint(4) DEFAULT '0' COMMENT '商品状态',
`saleNum` int(11) NOT NULL DEFAULT '0' COMMENT '总销售量',
`saleTime` datetime NOT NULL COMMENT '上架时间',
`visitNum` int(11) DEFAULT '0' COMMENT '访问数',
`appraiseNum` int(11) DEFAULT '0' COMMENT '评价数',
`isSpec` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否有规格 0:没有 1:有',
`gallery` text COMMENT '商品相册',
`goodsSeoKeywords` varchar(200) DEFAULT NULL COMMENT '商品SEO关键字',
`illegalRemarks` varchar(255) DEFAULT NULL COMMENT '状态说明 一般用于说明拒绝原因',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志 -1:删除 1:有效',
`createTime` datetime NOT NULL COMMENT '创建时间',
`goods Type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '商品类型 0:实物商品 1:虚拟商品',
`isDistribut` int(11) DEFAULT '0' COMMENT '是否分销商品 0:否 1:是',
`commission` decimal(11,2) DEFAULT NULL COMMENT '分销佣金 0',
`isFreeShipping` tinyint(4) DEFAULT '0' COMMENT '是否包邮 0:否 1:是',
`goodsSerachKeywords` text COMMENT '商品关键字搜索 该字段内容由系统生成,取商品名称+属性内容',
`goodsVideo` varchar(150) DEFAULT NULL COMMENT '商品视频',
`costPrice` decimal(11,2) DEFAULT NULL COMMENT '成本价',
`goodsVideoThumb` varchar(150) DEFAULT NULL COMMENT '视频缩略图,未用',
`goodsSeoDesc` varchar(600) DEFAULT NULL COMMENT '商品SEO描述',
`shippingFee Type` tinyint(4) DEFAULT '1' COMMENT '计价方式 1:计件 2:重量 3:体积',
`goodsWeight` decimal(11,2) DEFAULT NULL COMMENT '商品重量',
`goodsVolume` decimal(11,2) DEFAULT NULL COMMENT '商品体积',
`shopExpressld` tinyint(4) DEFAULT '0' COMMENT '是否属于批发商品 1:批发商品 0:不是批发商品',
`isPifa` int(11) DEFAULT '0' COMMENT '收藏该商品的人数',
`collectNum` tinyint(4) DEFAULT '1' COMMENT '是否可以批量上架 1:是 0:否。一般终于导入或者采集商品才会用到这个字段',
PRIMARY KEY (`goodsld`),
KEY `brandId` (`brandId`),
KEY `shopId` (`shopId`),
KEY `goodsCatld` (`goodsCatld`),
KEY `goodsCatldPath` (`goodsCatldPath`),
CONSTRAINT `yty_goods_ibfk_1` FOREIGN KEY (`brandId`) REFERENCES `yty_brands` (`brandld`),
CONSTRAINT `yty_goods_ibfk_2` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
24.yty_goods_appraises
CREATE TABLE `yty_goods_appraises` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL DEFAULT '0' COMMENT '店铺ID',
`orderId` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
`goodsId` int(11) NOT NULL DEFAULT '0' COMMENT '评价对象ID',
`goodsSpecld` int(11) NOT NULL DEFAULT '0' COMMENT '商品-规格Id',
`userId` int(11) NOT NULL DEFAULT '0' COMMENT '会员ID',
`goodsScore` int(11) NOT NULL DEFAULT '0' COMMENT '商品评分',
`serviceScore` int(11) NOT NULL DEFAULT '0' COMMENT '服务评分',
`timeScore` int(11) NOT NULL DEFAULT '0' COMMENT '时效评分',
`content` text NOT NULL COMMENT '点评内容',
`shopReply` text COMMENT '店铺回复',
`images` text COMMENT '上传图片',
`isShow` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示 1:显示 0:隐藏',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效状态 1:有效 -1:无效',
`createTime` datetime NOT NULL COMMENT '创建时间',
`replyTime` date DEFAULT NULL COMMENT '商家回复时间',
`orderGoodsId` int(10) unsigned NOT NULL COMMENT '订单上商品表自增ID',
PRIMARY KEY (`id`),
KEY `shopId` (`shopId`),
KEY `orderId` (`orderId`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_goods_appraises_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_goods_appraises_ibfk_2` FOREIGN KEY (`orderId`) REFERENCES `yty_orders` (`orderId`),
CONSTRAINT `yty_goods_appraises_ibfk_3` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
25.yty_goods_attributes
CREATE TABLE `yty_goods_attributes` (
`id` int(11) NOT NULL COMMENT '自增ID',
`shopId` int(11) NOT NULL COMMENT '店铺ID',
`goodsId` int(11) NOT NULL COMMENT '商品ID',
`attrId` int(11) NOT NULL COMMENT '属性名称',
`attrVal` text NOT NULL COMMENT '属性值',
`createTime` datetime NOT NULL COMMENT '创建时间',
KEY `attrId` (`attrId`),
KEY `id` (`id`),
KEY `shopId` (`shopId`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_goods_attributes_ibfk_1` FOREIGN KEY (`attrId`) REFERENCES `yty_attributes` (`attrld`),
CONSTRAINT `yty_goods_attributes_ibfk_2` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_goods_attributes_ibfk_3` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26.yty_goods_cats
CREATE TABLE `yty_goods_cats` (
`catId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`parentId` int(11) NOT NULL COMMENT '父ID',
`catName` varchar(20) NOT NULL COMMENT '分类名称',
`isShow` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示 0:隐藏 1:显示',
`isFloor` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示楼层 0:不显示 1:显示',
`catSort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志 1:有效 -1:删除',
`createTime` datetime NOT NULL COMMENT '建立时间',
`commissionRate` decimal(11,2) DEFAULT '-1.00' COMMENT '商品佣金比例 -1代表使用上级父类的佣金设置',
`catImg` varchar(150) DEFAULT NULL COMMENT '分类图片',
`subTitle` varchar(150) DEFAULT NULL COMMENT '二级标题',
`simpleName` varchar(20) NOT NULL COMMENT '移动端商品简称',
`seoTitle` varchar(200) NOT NULL COMMENT '分类SEO标题',
`seoKeywords` varchar(200) NOT NULL COMMENT '分类SEO关键字',
`seoDes` varchar(200) NOT NULL COMMENT '分类SEO描述',
`catListTheme` varchar(200) NOT NULL DEFAULT 'goods_list' COMMENT '电脑端商品列表模板名',
`detailTheme` varchar(200) NOT NULL DEFAULT 'goods_detail' COMMENT '电脑端商品详情模板名',
`mobileCatListTheme` varchar(200) NOT NULL DEFAULT 'goods_list' COMMENT '移动端商品列表模板名',
`mobileDetailTheme` varchar(200) NOT NULL DEFAULT 'goods_detail' COMMENT '移动端商品详情模板名',
`wechatCatListTheme` varchar(200) NOT NULL DEFAULT 'goods_list' COMMENT '微信端商品列表模板名',
`wechatDetailTheme` varchar(200) NOT NULL DEFAULT 'goods_detail' COMMENT '微信端商品详情模板名',
`showWay` tinyint(4) DEFAULT '0' COMMENT '移动端列表显示方式 0:一行两个 1:一行一个',
PRIMARY KEY (`catId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
27.yty_goods_consult
CREATE TABLE `yty_goods_consult` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`goodsId` int(10) unsigned NOT NULL COMMENT '商品ID',
`userId` int(10) unsigned DEFAULT NULL COMMENT '咨询人ID',
`consultType` tinyint(3) unsigned DEFAULT NULL COMMENT '咨询类型',
`consultContent` varchar(500) NOT NULL COMMENT '咨询内容',
`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
`reply` varchar(255) NOT NULL COMMENT '商家回复内容',
`replyTime` datetime DEFAULT NULL COMMENT '回复时间',
`dataFlag` tinyint(4) DEFAULT '1' COMMENT '有效状态 1:有效 -1:删除',
`isShow` tinyint(4) DEFAULT '1' COMMENT '是否显示 1:显示 0:不显示',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
28.yty_goods_scores
CREATE TABLE `yty_goods_scores` (
`scoreId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`goodsId` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
`shopId` int(11) NOT NULL DEFAULT '0' COMMENT '店铺ID',
`totalScore` int(11) NOT NULL DEFAULT '0' COMMENT '总评分',
`totalUsers` int(11) NOT NULL DEFAULT '0' COMMENT '总评评分用户数',
`goodsScore` int(11) NOT NULL DEFAULT '0' COMMENT '商品评分',
`goodsUsers` int(11) NOT NULL DEFAULT '0' COMMENT '商品评分用户数',
`serviceScore` int(11) NOT NULL DEFAULT '0' COMMENT '服务评分',
`serviceUsers` int(11) NOT NULL DEFAULT '0' COMMENT '服务评分用户数',
`timeScore` int(11) NOT NULL DEFAULT '0' COMMENT '时效评分',
`timeUsers` int(11) NOT NULL DEFAULT '0' COMMENT '时效评分用户数',
PRIMARY KEY (`scoreId`),
KEY `shopId` (`shopId`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_goods_scores_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_goods_scores_ibfk_2` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
29.yty_goods_specs
CREATE TABLE `yty_goods_specs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL DEFAULT '0' COMMENT '店铺ID',
`goodsId` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
`productNo` varchar(20) NOT NULL COMMENT '商品货号',
`speclds` varchar(255) NOT NULL COMMENT '规格ID格式 例如:specId:specId:specId:specId:specId',
`marketPrice` decimal(11,2) NOT NULL COMMENT '市场价',
`specPrice` decimal(11,2) NOT NULL COMMENT '商品价',
`specStock` int(11) NOT NULL DEFAULT '0' COMMENT '库存',
`warnStock` int(11) NOT NULL DEFAULT '0' COMMENT '预警库存',
`saleNum` int(11) NOT NULL DEFAULT '0' COMMENT '销量',
`isDefault` tinyint(4) DEFAULT '0' COMMENT '默认规格 1:默认规格 0:非默认规格',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效状态 1:有效 -1:无效',
`specWeight` decimal(11,2) DEFAULT NULL COMMENT '商品重量',
`specVolume` decimal(11,2) DEFAULT NULL COMMENT '商品体积',
`costPrice` decimal(11,2) DEFAULT NULL COMMENT '成本价',
PRIMARY KEY (`id`),
KEY `shopId` (`shopId`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_goods_specs_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_goods_specs_ibfk_2` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods_specs` (`shopId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
30.yty_goods_virtuals
CREATE TABLE `yty_goods_virtuals` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL COMMENT '店铺ID',
`goodsId` int(11) NOT NULL COMMENT '商品ID',
`cardNo` varchar(20) NOT NULL COMMENT '卡券号',
`cardPwd` varchar(20) NOT NULL COMMENT '卡券密码',
`orderId` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
`orderNo` varchar(20) DEFAULT NULL COMMENT '订单号',
`isUse` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否使用 0:未使用 1:已下单',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效状态 -1:未用 1:已用',
`createTime` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `shopId` (`shopId`),
KEY `orderId` (`orderId`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_goods_virtuals_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_goods_virtuals_ibfk_2` FOREIGN KEY (`orderId`) REFERENCES `yty_orders` (`orderId`),
CONSTRAINT `yty_goods_virtuals_ibfk_3` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;