11.yty_carts
CREATE TABLE `yty_carts` (
`cartld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`userld` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`isCheck` tinyint(4) NOT NULL DEFAULT '1' COMMENT '是否选中',
`goodsId` int(11) NOT NULL DEFAULT '0' COMMENT '商品Id',
`goodsSpecld` varchar(200) NOT NULL DEFAULT '0' COMMENT '商品-规格ID',
`cartNum` int(11) NOT NULL DEFAULT '0' COMMENT '商品数量',
PRIMARY KEY (`cartld`),
KEY `userld` (`userld`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_carts_ibfk_1` FOREIGN KEY (`cartld`) REFERENCES `yty_cat_brands` (`catld`),
CONSTRAINT `yty_carts_ibfk_2` FOREIGN KEY (`userld`) REFERENCES `yty_users` (`userId`),
CONSTRAINT `yty_carts_ibfk_3` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
12.yty_cash_configs
CREATE TABLE `yty_cash_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`targetType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '提现对象 0:用户 1:商家',
`targetId` int(11) NOT NULL COMMENT '提现对象ID',
`accType` tinyint(4) DEFAULT '0' COMMENT '提现类型 3:银行卡',
`accTargetId` int(11) DEFAULT '0' COMMENT '银行卡ID -1:支付宝 -2:微信',
`accAreald` int(11) DEFAULT NULL COMMENT '开卡地区ID',
`accNo` varchar(100) NOT NULL COMMENT '银行卡号',
`accUser` varchar(100) NOT NULL COMMENT '持卡人',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '有效标志 1:删除 -1:删除',
`createTime` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
13.yty_cash_draws
CREATE TABLE `yty_cash_draws` (
`cashld` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`cashNo` varchar(50) NOT NULL COMMENT '提现单号',
`targetType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '提现对象 0:用户 1:商家',
`targetId` int(11) NOT NULL COMMENT '提现对象ID',
`money` decimal(11,2) NOT NULL COMMENT '金额',
`accType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '提现类型',
`accTargetName` varchar(100) DEFAULT NULL COMMENT '开卡银行名称',
`accAreaName` varchar(100) DEFAULT NULL COMMENT '开卡地区名称',
`accNo` varchar(100) NOT NULL COMMENT '卡号',
`accUser` varchar(100) DEFAULT NULL COMMENT '持卡人',
`cashSatus` varchar(4) DEFAULT '0' COMMENT '提现状态 -1:提现失败 0:待处理 1:提现成功',
`cashRemarks` varchar(255) DEFAULT NULL COMMENT '提现备注',
`cashConfigld` int(11) NOT NULL COMMENT '提现设置对应的id',
`createTime` datetime NOT NULL COMMENT '创建时间',
`commission` decimal(11,2) DEFAULT NULL COMMENT '提现手续费',
`actualMoney` decimal(11,2) DEFAULT NULL COMMENT '实际到账金额',
`commissionRate` tinyint(4) DEFAULT NULL COMMENT '提现手续费率',
`sendData` text COMMENT '向微信商户号请求的内容',
`returnData` text COMMENT '向微信商户号返回的内容',
`returnMsg` varchar(300) DEFAULT NULL COMMENT '微信商户返回的结果 内容取自returnData',
`payTime` datetime DEFAULT NULL COMMENT '付款时间 N/A',
`payNo` varchar(300) DEFAULT NULL COMMENT '付款流水 商户号返回的',
`accTargetld` int(11) DEFAULT '0' COMMENT '银行ID 通过这个可以知道银行代码是什么',
`payFee` int(11) DEFAULT '0' COMMENT '手续费 微信账户号收',
`incNo` int(11) DEFAULT '0' COMMENT '自增ID 向银行卡付款失败后,再次请求需要做加1操作,和提现申请单号组合使用',
`queryData` text COMMENT '查询银行卡付款状态请求的数据N/A',
`queryReturnData` text COMMENT '查询银行卡付款状态返回的数据',
PRIMARY KEY (`cashld`),
KEY `targetId` (`targetId`),
KEY `cashConfigld` (`cashConfigld`),
KEY `accTargetld` (`accTargetld`),
CONSTRAINT `yty_cash_draws_ibfk_1` FOREIGN KEY (`cashConfigld`) REFERENCES `yty_cash_configs` (`id`),
CONSTRAINT `yty_cash_draws_ibfk_2` FOREIGN KEY (`accTargetld`) REFERENCES `yty_cash_configs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14.yty_cat_brands
CREATE TABLE `yty_cat_brands` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`catld` int(11) DEFAULT NULL COMMENT '分类ID',
`brandId` int(11) DEFAULT NULL COMMENT '品牌ID',
PRIMARY KEY (`id`),
KEY `catld` (`catld`),
KEY `brandId` (`brandId`),
CONSTRAINT `yty_cat_brands_ibfk_1` FOREIGN KEY (`catld`) REFERENCES `yty_data_cats` (`catId`),
CONSTRAINT `yty_cat_brands_ibfk_2` FOREIGN KEY (`catld`) REFERENCES `yty_goods_cats` (`catId`),
CONSTRAINT `yty_cat_brands_ibfk_3` FOREIGN KEY (`catld`) REFERENCES `yty_shop_cats` (`catId`),
CONSTRAINT `yty_cat_brands_ibfk_4` FOREIGN KEY (`catld`) REFERENCES `yty_spec_cats` (`catId`),
CONSTRAINT `yty_cat_brands_ibfk_5` FOREIGN KEY (`catld`) REFERENCES `yty_article_cats` (`catld`),
CONSTRAINT `yty_cat_brands_ibfk_6` FOREIGN KEY (`brandId`) REFERENCES `yty_brands` (`brandld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
15.yty_cat_shops
CREATE TABLE `yty_cat_shops` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT ' 自增ID',
`shopId` int(11) NOT NULL DEFAULT '0' COMMENT '店铺ID',
`catld` int(11) NOT NULL DEFAULT '0' COMMENT '所属分类ID',
`commissionRate` decimal(11,2) DEFAULT NULL COMMENT '商家店铺分类佣金比例',
PRIMARY KEY (`id`),
KEY `catld` (`catld`),
KEY `shopId` (`shopId`),
CONSTRAINT `yty_cat_shops_ibfk_1` FOREIGN KEY (`catld`) REFERENCES `yty_article_cats` (`catld`),
CONSTRAINT `yty_cat_shops_ibfk_2` FOREIGN KEY (`catld`) REFERENCES `yty_data_cats` (`catId`),
CONSTRAINT `yty_cat_shops_ibfk_3` FOREIGN KEY (`catld`) REFERENCES `yty_goods_cats` (`catId`),
CONSTRAINT `yty_cat_shops_ibfk_4` FOREIGN KEY (`catld`) REFERENCES `yty_shop_cats` (`catId`),
CONSTRAINT `yty_cat_shops_ibfk_5` FOREIGN KEY (`catld`) REFERENCES `yty_spec_cats` (`catId`),
CONSTRAINT `yty_cat_shops_ibfk_6` FOREIGN KEY (`shopId`) REFERENCES `yty_shops` (`shopId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
16.yty_charge_items
CREATE TABLE `yty_charge_items` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`chargeMoney` int(11) DEFAULT '0' COMMENT '充值金额',
`giveMoney` decimal(11,1) DEFAULT NULL COMMENT '赠送金额',
`itemSort` int(11) DEFAULT '0' COMMENT '排序号',
`dataFlag` tinyint(4) DEFAULT '1' COMMENT '是否有效 1:有效 -1:删除',
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
17.yty_data_cats
CREATE TABLE `yty_data_cats` (
`catId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`catName` varchar(255) NOT NULL COMMENT '数据分类名称',
`dataFlag` tinyint(4) DEFAULT '1' COMMENT '有效标志 1:有效 -1:删除',
`catCode` varchar(255) NOT NULL COMMENT '分类表标记字母',
PRIMARY KEY (`catId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18.yty_datas
CREATE TABLE `yty_datas` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`catId` int(11) NOT NULL DEFAULT '0' COMMENT '分类id',
`dataName` varchar(255) NOT NULL COMMENT '数据名称',
`dataVal` varchar(255) NOT NULL COMMENT '数据值',
`dataSort` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
`dataFlag` tinyint(4) DEFAULT '1' COMMENT '有效标记 1:有效 -1:删除',
`subCatId` int(11) DEFAULT '0' COMMENT '子分类ID',
`subDataVal` int(11) DEFAULT '0' COMMENT '子分类数据内容',
PRIMARY KEY (`id`),
KEY `catId` (`catId`),
KEY `subCatId` (`subCatId`),
CONSTRAINT `yty_datas_ibfk_1` FOREIGN KEY (`catId`) REFERENCES `yty_article_cats` (`catld`),
CONSTRAINT `yty_datas_ibfk_2` FOREIGN KEY (`catId`) REFERENCES `yty_data_cats` (`catId`),
CONSTRAINT `yty_datas_ibfk_3` FOREIGN KEY (`catId`) REFERENCES `yty_goods_cats` (`catId`),
CONSTRAINT `yty_datas_ibfk_4` FOREIGN KEY (`catId`) REFERENCES `yty_shop_cats` (`catId`),
CONSTRAINT `yty_datas_ibfk_5` FOREIGN KEY (`catId`) REFERENCES `yty_spec_cats` (`catId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
19.yty_express
CREATE TABLE `yty_express` (
`expressId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`expressName` varchar(50) NOT NULL DEFAULT '1' COMMENT '快递名称',
`dataFlag` tinyint(4) NOT NULL DEFAULT '1' COMMENT '删除标志 1:有效 -1:删除',
`expressCode` varchar(50) DEFAULT NULL COMMENT '主要用于物流插件',
`isShow` tinyint(4) DEFAULT '1' COMMENT '是否启用 1:是 0:否',
PRIMARY KEY (`expressId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
20.yty_favorites
CREATE TABLE `yty_favorites` (
`favoriteId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`userId` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`createTime` datetime NOT NULL COMMENT '创建时间',
`goodsId` int(11) DEFAULT NULL COMMENT '商品ID',
`currShopPrice` decimal(11,2) NOT NULL COMMENT '关注时的价格',
PRIMARY KEY (`favoriteId`),
KEY `userId` (`userId`),
KEY `goodsId` (`goodsId`),
CONSTRAINT `yty_favorites_ibfk_1` FOREIGN KEY (`goodsId`) REFERENCES `yty_goods` (`goodsld`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;