11-20 DDL查询
/*
Navicat MySQL Data Transfer
Source Server : laoshifu
Source Server Version : 50726
Source Host : localhost:3306
Source Database : yan_shop
Target Server Type : MYSQL
Target Server Version : 50726
File Encoding : 65001
Date: 2024-04-28 14:05:07
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `yan_carts`
-- ----------------------------
DROP TABLE IF EXISTS `yan_carts`;
CREATE TABLE `yan_carts` (
`cartId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`userId` int(11) NOT NULL COMMENT '用户ID',
`isCheck` tinyint(4) NOT NULL COMMENT '是否选中',
`goodsId` int(11) NOT NULL COMMENT '商品Id',
`goodsSpecId` varchar(200) NOT NULL COMMENT '商品-规格ID',
`cartNum` int(11) NOT NULL COMMENT '商品数量',
PRIMARY KEY (`cartId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 购物车表';
-- ----------------------------
-- Records of yan_carts
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_cash_configs`
-- ----------------------------
DROP TABLE IF EXISTS `yan_cash_configs`;
CREATE TABLE `yan_cash_configs` (
`Id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`targetType` tinyint(4) NOT NULL COMMENT '提现对象(0:用户 1:商家)',
`targetId` int(11) NOT NULL COMMENT '提现对象ID',
`accType` tinyint(4) NOT NULL COMMENT '提现类型(3:银行卡)',
`accTargetId` int(11) NOT NULL COMMENT '银行卡ID(-1:支付宝 -2:微信)',
`accAreaId` int(11) DEFAULT NULL COMMENT '开卡地区ID',
`accNo` varchar(100) NOT NULL COMMENT '银行卡号',
`accUser` varchar(100) NOT NULL COMMENT '持卡人',
`dataFlag` tinyint(4) NOT NULL COMMENT '有效标志(1:有效 -1:删除)',
`createTime` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 提现账号配置表';
-- ----------------------------
-- Records of yan_cash_configs
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_cash_draws`
-- ----------------------------
DROP TABLE IF EXISTS `yan_cash_draws`;
CREATE TABLE `yan_cash_draws` (
`cashId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`cashNo` varchar(50) NOT NULL COMMENT '提现单号',
`targetType` tinyint(4) NOT NULL COMMENT '提现对象(0:用户 1:商家)',
`targetId` int(11) NOT NULL COMMENT '提现对象ID',
`money` decimal(11,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
`accType` tinyint(4) NOT NULL 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` tinyint(4) NOT NULL COMMENT '提现状态(-1:提现失败 0:待处理 1:提现成功)',
`cashRemarks` varchar(255) DEFAULT NULL COMMENT '提现备注',
`cashConfigId` int(11) NOT NULL COMMENT '提现设置对应的id',
`createTime` datetime NOT NULL COMMENT '创建时间',
`commission` decimal(11,2) DEFAULT '0.00' COMMENT '提现手续费',
`actualMoney` decimal(11,2) DEFAULT '0.00' 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 '付款流水(商户号返回的)',
`accTargetId` int(11) DEFAULT NULL COMMENT '银行ID(通过这个可以知道银行代码是什么)',
`payFee` int(11) DEFAULT NULL COMMENT '手续费(微信商户号收)',
`incNo` int(11) DEFAULT NULL COMMENT '自增ID(向银行卡付款失败后,再次请求需要做加1操作,和提现申请单号组合使用)',
`queryData` text COMMENT '查询银行卡付款状态请求的数据(N/A)',
`queryReturnData` text COMMENT '查询银行卡付款状态返回的数据',
PRIMARY KEY (`cashId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 提现记录表';
-- ----------------------------
-- Records of yan_cash_draws
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_cat_brands`
-- ----------------------------
DROP TABLE IF EXISTS `yan_cat_brands`;
CREATE TABLE `yan_cat_brands` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`catId` int(11) NOT NULL COMMENT '分类ID',
`brandId` int(11) NOT NULL COMMENT '品牌ID',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 分类-品牌表';
-- ----------------------------
-- Records of yan_cat_brands
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_cat_shops`
-- ----------------------------
DROP TABLE IF EXISTS `yan_cat_shops`;
CREATE TABLE `yan_cat_shops` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`shopId` int(11) NOT NULL COMMENT '店铺ID',
`catId` int(11) NOT NULL COMMENT '所属分类ID',
`commissionRate` decimal(11,2) DEFAULT '0.00' COMMENT '商家店铺分类佣金比例',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 店铺经营类目标';
-- ----------------------------
-- Records of yan_cat_shops
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_charge_items`
-- ----------------------------
DROP TABLE IF EXISTS `yan_charge_items`;
CREATE TABLE `yan_charge_items` (
`id` int(11) NOT NULL COMMENT '自增ID',
`chargeMoney` int(11) DEFAULT NULL COMMENT '充值金额',
`giveMoney` decimal(11,1) DEFAULT '0.0' COMMENT '赠送金额',
`itemSort` int(11) DEFAULT NULL COMMENT '排序号',
`dataFlag` tinyint(4) DEFAULT NULL COMMENT '是否有效(1:有效 -1:删除)',
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 充值项表';
-- ----------------------------
-- Records of yan_charge_items
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_data_cats`
-- ----------------------------
DROP TABLE IF EXISTS `yan_data_cats`;
CREATE TABLE `yan_data_cats` (
`catId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`catName` varchar(255) NOT NULL COMMENT '数据分类名称',
`dataFlag` tinyint(4) DEFAULT NULL COMMENT '有效标志(1:有效 -1:删除)',
`catCode` varchar(255) NOT NULL COMMENT '分类表标记字母',
PRIMARY KEY (`catId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 基础数据分类表';
-- ----------------------------
-- Records of yan_data_cats
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_datas`
-- ----------------------------
DROP TABLE IF EXISTS `yan_datas`;
CREATE TABLE `yan_datas` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`catId` int(11) NOT NULL COMMENT '分类id',
`dataName` varchar(255) NOT NULL COMMENT '数据名称',
`dataVal` varchar(255) NOT NULL COMMENT '数据值',
`dataSort` int(11) NOT NULL COMMENT '排序号',
`dataFlag` tinyint(4) DEFAULT NULL COMMENT '有效标记(1:有效 -1:删除)',
`subCatId` int(11) DEFAULT NULL COMMENT '子分类ID',
`subDataVal` int(11) DEFAULT NULL COMMENT '子分类数据内容',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 基础数据表';
-- ----------------------------
-- Records of yan_datas
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_express`
-- ----------------------------
DROP TABLE IF EXISTS `yan_express`;
CREATE TABLE `yan_express` (
`expressId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`expressName` varchar(50) NOT NULL COMMENT '快递名称',
`dataFlag` tinyint(4) NOT NULL COMMENT '删除标志(1:有效 -1:删除)',
`expressCode` varchar(50) DEFAULT NULL COMMENT '快递代码(主要用于物流插件)',
`isShow` tinyint(4) DEFAULT NULL COMMENT '是否启用(1:是 0:否)',
PRIMARY KEY (`expressId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 快递表';
-- ----------------------------
-- Records of yan_express
-- ----------------------------
-- ----------------------------
-- Table structure for `yan_favorites`
-- ----------------------------
DROP TABLE IF EXISTS `yan_favorites`;
CREATE TABLE `yan_favorites` (
`favoriteId` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`userId` int(11) NOT NULL COMMENT '用户ID',
`createTime` datetime NOT NULL COMMENT '创建时间',
`goodsId` int(11) DEFAULT NULL COMMENT '商品ID',
`currShopPrice` decimal(11,2) DEFAULT '0.00' COMMENT '关注时的价格',
PRIMARY KEY (`favoriteId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='闫晓仪 关注商品表';
-- ----------------------------
-- Records of yan_favorites
-- ----------------------------