71.yty_shop_message_cats
CREATE TABLE `yty_shop_message_cats` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`msgDataId` int(11) DEFAULT '0' COMMENT '消息标识ID 1:商品审核提醒2:新订单提醒3:订单投诉提醒4:订单失效提醒5:退货退款提醒<br/>6:结算消息提醒7:订单评价提醒8:收货提醒9:商品举报提醒10:售后消息提醒',
`msgType` tinyint(4) DEFAULT '0' COMMENT '消息类型1:商城消息2:手机短信提醒4:微信模板消息提醒',
`msgCode` varchar(100) DEFAULT NULL COMMENT '消息代码 对应yty_datas的dataVal值',
PRIMARY KEY (`id`),
KEY `msgDataId` (`msgDataId`),
CONSTRAINT `yty_shop_message_cats_ibfk_1` FOREIGN KEY (`msgDataId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
72.yty_shop_roles
CREATE TABLE `yty_shop_roles` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) DEFAULT '0' COMMENT '店铺ID',
`roleName` varchar(100) DEFAULT NULL COMMENT '角色名称',
`privilegeMsgs` text COMMENT '权限',
`privilegeUrls` text COMMENT '权限url路径N/A',
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
`dataFlag` tinyint(4) DEFAULT '1' COMMENT '有效标识 -1:无效 1:有效',
PRIMARY KEY (`id`),
KEY `shopId` (`shopId`),
CONSTRAINT `yty_shop_roles_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_shop_roles_ibfk_2` FOREIGN KEY (`shopId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
73.yty_shop_scores
CREATE TABLE `yty_shop_scores` (
`scoreId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL 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`),
CONSTRAINT `yty_shop_scores_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_shop_scores_ibfk_2` FOREIGN KEY (`shopId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
74.yty_shop_services
CREATE TABLE `yty_shop_services` (
`shopId` int(11) NOT NULL AUTO_INCREMENT COMMENT '所对应的店铺ID',
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
`dataFlag` tinyint(4) DEFAULT NULL COMMENT '有效状态 1:有效-1:删除',
`serviceId` varchar(50) DEFAULT NULL COMMENT '店铺ID',
PRIMARY KEY (`shopId`),
CONSTRAINT `yty_shop_services_ibfk_1` FOREIGN KEY (`shopId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
75.yty_shop_styles
CREATE TABLE `yty_shop_styles` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`styleSys` varchar(255) DEFAULT NULL COMMENT '风格适应的系统 例如手机端,电脑端,微信端',
`styleName` varchar(255) DEFAULT NULL COMMENT '风格名称',
`styleCat` tinyint(4) unsigned DEFAULT '0' COMMENT '风格所属分类',
`stylePath` varchar(255) DEFAULT NULL COMMENT '风格目录',
`screenshot` varchar(255) DEFAULT NULL COMMENT '缩略图路径',
`isShow` tinyint(4) DEFAULT '1' COMMENT '是否显示',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
76.yty_shop_users
CREATE TABLE `yty_shop_users` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL DEFAULT '0' COMMENT '店铺ID',
`userId` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`roleId` int(11) NOT NULL DEFAULT '0' COMMENT '角色ID',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效标识 -1:无效1:有效',
`serviceId` varchar(50) NOT NULL COMMENT '客服ID',
`privilegeMsgTypes` varchar(50) DEFAULT NULL COMMENT '接收信息类型权限 1:系统消息2:短信3:邮件4:微信消息',
`privilegeMsgs` varchar(200) DEFAULT NULL COMMENT '接收信息权限',
`privilegePhoneMsgs` varchar(200) DEFAULT NULL COMMENT '接收短信权限',
PRIMARY KEY (`id`),
KEY `shopId` (`shopId`),
CONSTRAINT `yty_shop_users_ibfk_1` FOREIGN KEY (`id`) REFERENCES `yty_users` (`ucUid`),
CONSTRAINT `yty_shop_users_ibfk_2` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
77.yty_shops
CREATE TABLE `yty_shops` (
`shopId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopSn` varchar(20) NOT NULL COMMENT '店铺编号',
`userId` int(11) NOT NULL COMMENT '店铺所有人ID',
`areaIdPath` varchar(255) NOT NULL COMMENT '区域路径',
`areaId` int(11) NOT NULL DEFAULT '0' COMMENT '最终所属区域ID N/A',
`isSelf` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否自营 1:自营 0:非自营',
`shopName` varchar(100) NOT NULL COMMENT '店铺名称',
`shopkeeper` varchar(50) NOT NULL COMMENT '店主',
`telephone` varchar(20) NOT NULL COMMENT '店主手机号',
`shopCompany` varchar(255) NOT NULL COMMENT '公司名称',
`shopImg` varchar(150) NOT NULL COMMENT '店铺图标',
`shopTel` varchar(40) NOT NULL COMMENT '店铺电话',
`shopQQ` varchar(50) DEFAULT NULL COMMENT 'QQ号',
`shopWangWang` varbinary(50) DEFAULT NULL COMMENT '旺旺号',
`shopAddress` varchar(255) NOT NULL COMMENT '店铺地址',
`bankId` int(11) NOT NULL DEFAULT '0' COMMENT '银行ID',
`bankNo` varchar(20) NOT NULL COMMENT '银行卡号',
`bankUserName` varchar(50) NOT NULL COMMENT '银行卡所有人名称',
`isInvoice` tinyint(4) NOT NULL DEFAULT '0' COMMENT '能否开发票 1:能 0:不能',
`invoiceRemarks` varchar(255) DEFAULT NULL COMMENT '发票说明',
`serviceStartTime` time NOT NULL DEFAULT '08:30:00' COMMENT '开始营业时间',
`serviceEndTime` time NOT NULL DEFAULT '22:30:00' COMMENT '结束营业时间',
`shopAtive` tinyint(4) NOT NULL DEFAULT '1' COMMENT '店铺状态 1:营业中 0:休息中',
`shopStatus` tinyint(4) NOT NULL DEFAULT '1' COMMENT '店铺状态 -1:拒绝|停用 0:未审核 1:已审核',
`statusDesc` varchar(255) DEFAULT NULL COMMENT '状态说明 一般用于停止和拒绝说明',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志 -1:删除 1:有效',
`createTime` date NOT NULL COMMENT '创建时间',
`shopMoney` decimal(11,2) DEFAULT NULL COMMENT '商家钱包',
`lockMoney` decimal(11,2) DEFAULT NULL COMMENT '冻结金额',
`noSettledOrderNum` int(11) DEFAULT NULL COMMENT '未结算的订单数',
`noSettledOrderFee` decimal(11,2) DEFAULT NULL COMMENT '未结算的订单金额',
`paymentMoney` decimal(11,2) DEFAULT NULL COMMENT '需缴纳的佣金',
`bankAreaId` int(11) DEFAULT '0' COMMENT '银行账号开卡地区',
`bankAreaIdPath` varchar(100) DEFAULT NULL COMMENT '银行账号开卡地区ID路径',
`applyStatus` tinyint(4) DEFAULT '0' COMMENT '申请状态 -1:申请失败 0:填写中 1:提交申请,等待审核 2:审核通过',
`applyDesc` varchar(255) DEFAULT NULL COMMENT '申请失败原因',
`applyTime` datetime DEFAULT NULL COMMENT '提交申请时间',
`applyStep` tinyint(4) DEFAULT '1' COMMENT '当前填写步骤',
`shopNotice` varchar(300) DEFAULT NULL COMMENT '店铺公告',
`rechargeMoney` decimal(11,2) DEFAULT NULL COMMENT '充值金额',
`longitude` decimal(10,7) DEFAULT NULL COMMENT '经度',
`latitude` decimal(10,7) DEFAULT NULL COMMENT '纬度',
`mapLevel` int(11) DEFAULT '16' COMMENT '地图放大倍数',
`expireDate` date DEFAULT NULL COMMENT '开店截止日期',
`isPay` tinyint(4) DEFAULT '0' COMMENT '是否支付',
`payAnnualFee` decimal(11,2) DEFAULT NULL COMMENT '入驻费用',
`isRefund` tinyint(4) DEFAULT '0' COMMENT '是否退款',
`tradeId` int(11) DEFAULT '0' COMMENT '所属行业',
`isGuide` tinyint(4) DEFAULT '0' COMMENT '是否关闭操作指引 1:是 0:否',
`commissionType` tinyint(4) DEFAULT '0' COMMENT '商家佣金类型 1:商家佣金 0:平台统一佣金',
PRIMARY KEY (`shopId`),
KEY `userId` (`userId`),
KEY `areaId` (`areaId`),
KEY `tradeId` (`tradeId`),
KEY `bankAreaId` (`bankAreaId`),
KEY `bankId` (`bankId`),
CONSTRAINT `yty_shops_ibfk_1` FOREIGN KEY (`areaId`) REFERENCES `yty_areas` (`areald`),
CONSTRAINT `yty_shops_ibfk_10` FOREIGN KEY (`bankId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_shops_ibfk_2` FOREIGN KEY (`bankId`) REFERENCES `yty_banks` (`bankld`),
CONSTRAINT `yty_shops_ibfk_3` FOREIGN KEY (`shopId`) REFERENCES `yty_users` (`ucUid`),
CONSTRAINT `yty_shops_ibfk_4` FOREIGN KEY (`userId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_shops_ibfk_5` FOREIGN KEY (`areaId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_shops_ibfk_6` FOREIGN KEY (`userId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_shops_ibfk_7` FOREIGN KEY (`areaId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_shops_ibfk_8` FOREIGN KEY (`tradeId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_shops_ibfk_9` FOREIGN KEY (`bankAreaId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
78.yty_spec_cats
CREATE TABLE `yty_spec_cats` (
`catId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`goodsCatId` int(11) NOT NULL DEFAULT '0' COMMENT '最后一级商品分类ID',
`goodsCatPath` varchar(100) NOT NULL COMMENT '商品分类路径',
`catName` varchar(255) NOT NULL COMMENT '类型名称',
`isAllowImg` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否允许上传图片 0:不允许 1:允许',
`isShow` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否显示 1:是 0:否',
`catSort` int(11) DEFAULT '0' COMMENT '排序号',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志 1:有效 -1:无效',
`createTime` datetime NOT NULL COMMENT '创建时间',
`shopId` int(11) DEFAULT '0' COMMENT '店铺ID 该值大于0说明是店铺新增的规格',
PRIMARY KEY (`catId`),
KEY `goodsCatId` (`goodsCatId`),
CONSTRAINT `yty_spec_cats_ibfk_1` FOREIGN KEY (`goodsCatId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
79.yty_spec_items
CREATE TABLE `yty_spec_items` (
`itemId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL COMMENT '店铺ID',
`catId` int(11) NOT NULL COMMENT '类型Id',
`goodsId` int(11) NOT NULL COMMENT '商品ID',
`itemName` varchar(100) NOT NULL COMMENT '项名称',
`itemDesc` varchar(255) DEFAULT NULL COMMENT '规格描述',
`itemImg` varchar(150) NOT NULL COMMENT '规格图片',
`dataFlag` tinyint(4) NOT NULL COMMENT '有效状态 1:有效-1:无效',
`createTime` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`itemId`),
KEY `goodsId` (`goodsId`),
KEY `catId` (`catId`),
KEY `shopId` (`shopId`),
CONSTRAINT `yty_spec_items_ibfk_1` FOREIGN KEY (`catId`) REFERENCES `yty_article_cats` (`catld`),
CONSTRAINT `yty_spec_items_ibfk_2` FOREIGN KEY (`catId`) REFERENCES `yty_data_cats` (`catId`),
CONSTRAINT `yty_spec_items_ibfk_3` FOREIGN KEY (`catId`) REFERENCES `yty_goods_cats` (`catId`),
CONSTRAINT `yty_spec_items_ibfk_4` FOREIGN KEY (`catId`) REFERENCES `yty_shop_cats` (`catId`),
CONSTRAINT `yty_spec_items_ibfk_5` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`),
CONSTRAINT `yty_spec_items_ibfk_6` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`),
CONSTRAINT `yty_spec_items_ibfk_7` FOREIGN KEY (`catId`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_spec_items_ibfk_8` FOREIGN KEY (`shopId`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
80.yty_staffs
CREATE TABLE `yty_staffs` (
`staffId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`loginName` varchar(40) NOT NULL COMMENT '账号',
`loginPwd` varchar(50) NOT NULL COMMENT '密码',
`secretKey` int(32) NOT NULL COMMENT '安全码 安全码用于和用户密码混合在一起加密',
`staffName` varchar(50) NOT NULL COMMENT '职员名称',
`staffNo` varchar(20) DEFAULT NULL COMMENT '职员编号',
`staffPhoto` varchar(150) DEFAULT NULL COMMENT '职员头像',
`staffRoleId` int(11) NOT NULL COMMENT '职员角色ID',
`workStatus` tinyint(4) NOT NULL DEFAULT '1' COMMENT '工作状态 0:离职1:在职',
`staffStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '职员状态 1:正常2:停用',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志 1:有效-1:无效',
`creataTime` datetime NOT NULL COMMENT '建立时间',
`lastTime` datetime DEFAULT NULL COMMENT '最后登录时间',
`lastIP` char(16) DEFAULT NULL COMMENT '最后登录IP',
`wxOpenId` varchar(100) DEFAULT NULL COMMENT '微信openId',
`staffPhone` char(11) DEFAULT NULL COMMENT '职员手机号',
PRIMARY KEY (`staffId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;