Files
MER-2.2_2601/mer_java/sql/单商户V2.2.sql
2026-03-08 20:07:52 +08:00

2135 lines
125 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
Navicat Premium Dump SQL
Source Server : miaoay-161
Source Server Type : MySQL
Source Server Version : 50744 (5.7.44-log)
Source Host : 101.201.54.161:3306
Source Schema : yangtangyoupin
Target Server Type : MySQL
Target Server Version : 50744 (5.7.44-log)
File Encoding : 65001
Date: 24/02/2026 09:12:47
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for eb_activity_style
-- ----------------------------
DROP TABLE IF EXISTS `eb_activity_style`;
CREATE TABLE `eb_activity_style` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`name` varchar(255) NOT NULL COMMENT '活动名称',
`type` bit(1) NOT NULL COMMENT '活动类型0=活动边框1=活动背景',
`starttime` datetime NOT NULL COMMENT '开始时间',
`endtime` datetime NOT NULL COMMENT '结束时间',
`style` varchar(255) NOT NULL COMMENT '活动边框素材地址',
`status` bit(1) NOT NULL COMMENT '状态 0=关闭1=开启',
`method` int(11) DEFAULT NULL COMMENT '商品参与类型 0=全部商品参与1=指定商品参与2=指定品牌参与3=指定商品分类参与,4=指定商户产品',
`products` varchar(500) DEFAULT NULL COMMENT '参与活动商品',
`createtime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updatetime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for eb_ali_pay_callback
-- ----------------------------
DROP TABLE IF EXISTS `eb_ali_pay_callback`;
CREATE TABLE `eb_ali_pay_callback` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`notify_type` varchar(64) DEFAULT NULL COMMENT '通知的类型',
`notify_id` varchar(128) DEFAULT NULL COMMENT '通知校验 ID',
`app_id` varchar(32) DEFAULT NULL COMMENT '支付宝分配给开发者的应用 ID',
`charset` varchar(10) DEFAULT NULL COMMENT '编码格式,如 utf-8、gbk、gb2312 等',
`version` varchar(3) DEFAULT NULL COMMENT '调用的接口版本固定为1.0',
`sign_type` varchar(10) DEFAULT NULL COMMENT '商户生成签名字符串所使用的签名算法类型,目前支持 RSA2 和 RSA推荐使用 RSA2',
`sign` varchar(256) DEFAULT NULL COMMENT '签名',
`trade_no` varchar(64) DEFAULT NULL COMMENT '支付宝交易凭证号',
`out_trade_no` varchar(64) DEFAULT NULL COMMENT '原支付请求的商户订单号',
`trade_status` varchar(32) DEFAULT NULL COMMENT '交易目前所处的状态:WAIT_BUYER_PAY-交易创建,等待买家付款,TRADE_CLOSED-未付款交易超时关闭,或支付完成后全额退款,3-交易支付成功,4-交易结束,不可退款',
`total_amount` decimal(9,2) DEFAULT NULL COMMENT '本次交易支付的订单金额,单位为人民币(元)',
`receipt_amount` decimal(9,2) DEFAULT NULL COMMENT '商家在交易中实际收到的款项,单位为人民币(元)',
`refund_fee` decimal(9,2) DEFAULT NULL COMMENT '退款通知中,返回总退款金额,单位为人民币(元),支持两位小数',
`subject` varchar(256) DEFAULT NULL COMMENT '商品的标题/交易标题/订单标题/订单关键字等,是请求时对应的参数,原样通知回来',
`body` varchar(400) DEFAULT NULL COMMENT '该订单的备注、描述、明细等。对应请求时的 body 参数,原样通知回来',
`passback_params` varchar(512) DEFAULT NULL COMMENT '公共回传参数如果请求时传递了该参数则返回给商户时会在异步通知时将该参数原样返回。本参数必须进行UrlEncode之后才可以发送给支付宝。',
`notify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '通知的发送时间。格式为 yyyy-MM-dd HH:mm:ss',
`add_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `out_trade_no` (`out_trade_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='支付宝回调表';
-- ----------------------------
-- Table structure for eb_ali_pay_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_ali_pay_info`;
CREATE TABLE `eb_ali_pay_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` varchar(50) DEFAULT NULL COMMENT '支付宝分配给开发者的应用ID',
`timestamp` varchar(20) DEFAULT NULL COMMENT '发送请求的时间,格式"yyyy-MM-dd HH:mm:ss"',
`body` varchar(128) DEFAULT NULL COMMENT '订单描述',
`subject` varchar(256) DEFAULT NULL COMMENT '订单标题',
`out_trade_no` varchar(64) DEFAULT NULL COMMENT '商户订单号',
`timeout_express` varchar(6) DEFAULT NULL COMMENT '订单相对超时时间',
`time_expire` varchar(32) DEFAULT NULL COMMENT '订单绝对超时时间',
`total_amount` varchar(9) DEFAULT NULL COMMENT '订单总金额。单位为元,精确到小数点后两位',
`passback_params` varchar(512) DEFAULT NULL COMMENT '公用回传参数,本参数必须进行UrlEncode之后才可以发送给支付宝',
`code` varchar(32) DEFAULT NULL COMMENT '网关返回码',
`msg` varchar(256) DEFAULT NULL COMMENT '网关返回码描述',
`sub_code` varchar(50) DEFAULT NULL COMMENT '业务返回码',
`sub_msg` varchar(100) DEFAULT NULL COMMENT '业务返回码描述',
`sign` varchar(500) DEFAULT NULL COMMENT '签名',
`trade_no` varchar(64) DEFAULT NULL COMMENT '该交易在支付宝系统中的交易流水号',
`seller_id` varchar(20) DEFAULT NULL COMMENT '收款支付宝账号对应的支付宝唯一用户号',
`notify_url` varchar(256) DEFAULT NULL COMMENT '支付宝服务器主动通知商户服务器里指定的页面http/https路径',
PRIMARY KEY (`id`) USING BTREE,
KEY `out_trade_no` (`out_trade_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信订单表';
-- ----------------------------
-- Table structure for eb_article
-- ----------------------------
DROP TABLE IF EXISTS `eb_article`;
CREATE TABLE `eb_article` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章管理ID',
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT '分类id',
`title` varchar(255) NOT NULL COMMENT '文章标题',
`author` varchar(255) DEFAULT '' COMMENT '文章作者',
`image_input` varchar(255) NOT NULL COMMENT '文章图片',
`synopsis` varchar(255) DEFAULT '' COMMENT '文章简介',
`share_title` varchar(255) DEFAULT '' COMMENT '文章分享标题',
`share_synopsis` varchar(255) DEFAULT '' COMMENT '文章分享简介',
`visit` varchar(255) DEFAULT '' COMMENT '浏览次数',
`sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`url` varchar(255) DEFAULT '' COMMENT '原文链接',
`media_id` varchar(100) DEFAULT NULL COMMENT '微信素材id',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态',
`hide` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否隐藏',
`admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id',
`mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户id',
`product_id` int(10) NOT NULL DEFAULT '0' COMMENT '商品关联id',
`is_hot` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否热门(小程序)',
`is_banner` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否轮播图(小程序)',
`content` text NOT NULL COMMENT '文章内容',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`uid` varchar(255) DEFAULT NULL COMMENT '用户Id',
`image2` varchar(255) DEFAULT NULL COMMENT '图片2',
`image3` varchar(255) DEFAULT NULL COMMENT '图片3',
`status_task` int(11) DEFAULT NULL COMMENT '状态任务',
`tags` varchar(255) DEFAULT NULL COMMENT '标签',
`original_title` varchar(255) DEFAULT NULL COMMENT '原标题',
`original_url` varchar(255) DEFAULT NULL COMMENT '原文地址',
`browser_id` varchar(255) DEFAULT NULL COMMENT 'bit浏览器窗口id',
`video_url` text COMMENT '视频地址',
`image_urls` text COMMENT '逗号分隔的图片组',
`task_id` varchar(255) DEFAULT NULL COMMENT '任务id',
`prompt` text COMMENT '提示词',
`aspect_ratio` varchar(255) DEFAULT NULL COMMENT '横竖屏',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `original_title_unique` (`original_title`) USING BTREE,
KEY `idx_eb_article_create_time` (`create_time`),
KEY `idx_eb_article_update_time` (`update_time`),
KEY `idx_eb_article_status` (`status`),
KEY `idx_eb_article_task_id` (`task_id`),
KEY `idx_eb_article_status_create_time` (`status`,`create_time`),
KEY `idx_eb_article_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4365 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='文章管理表';
-- ----------------------------
-- Table structure for eb_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_category`;
CREATE TABLE `eb_category` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`path` varchar(255) NOT NULL DEFAULT '/0/' COMMENT '路径',
`name` varchar(50) NOT NULL COMMENT '分类名称',
`type` smallint(2) DEFAULT '1' COMMENT '类型1 产品分类2 附件分类3 文章分类, 4 设置分类, 5 菜单分类6 配置分类, 7 秒杀配置',
`url` varchar(255) DEFAULT '' COMMENT '地址',
`extra` text COMMENT '扩展字段 Jsos格式',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态, 1正常0失效',
`sort` int(5) NOT NULL DEFAULT '99999' COMMENT '排序',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `status+pid` (`pid`,`status`) USING BTREE,
KEY `id+status+url` (`path`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=755 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='分类表';
-- ----------------------------
-- Table structure for eb_exception_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_exception_log`;
CREATE TABLE `eb_exception_log` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '异常日志ID',
`exp_url` varchar(255) DEFAULT NULL COMMENT '异常的url',
`exp_params` mediumtext COMMENT '异常的参数',
`exp_type` varchar(255) DEFAULT NULL COMMENT '异常的类型',
`exp_controller` varchar(255) DEFAULT NULL COMMENT '异常的类名',
`exp_method` varchar(255) DEFAULT NULL COMMENT '异常的方法名',
`exp_detail` longtext COMMENT '异常详细信息',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=558 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='异常信息表';
-- ----------------------------
-- Table structure for eb_express
-- ----------------------------
DROP TABLE IF EXISTS `eb_express`;
CREATE TABLE `eb_express` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '快递公司id',
`code` varchar(50) NOT NULL DEFAULT '' COMMENT '快递公司简称',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '快递公司全称',
`partner_id` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否需要月结账号',
`partner_key` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否需要月结密码',
`net` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否需要取件网店',
`account` varchar(100) NOT NULL DEFAULT '' COMMENT '账号',
`password` varchar(100) NOT NULL DEFAULT '' COMMENT '密码',
`net_name` varchar(100) NOT NULL DEFAULT '' COMMENT '网点名称',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
`is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `code` (`code`) USING BTREE,
KEY `is_show` (`is_show`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1639 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='快递公司表';
-- ----------------------------
-- Table structure for eb_page_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_page_category`;
CREATE TABLE `eb_page_category` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`pid` int(10) NOT NULL DEFAULT '0' COMMENT '父类id',
`type` varchar(50) NOT NULL DEFAULT 'link' COMMENT '类型:link、special、product、product_category、custom',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名称',
`sort` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`level` tinyint(1) NOT NULL DEFAULT '0' COMMENT '层级',
`is_mer` int(10) NOT NULL DEFAULT '0' COMMENT '是否商户 0平台商户id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='页面链接分类';
-- ----------------------------
-- Table structure for eb_page_diy
-- ----------------------------
DROP TABLE IF EXISTS `eb_page_diy`;
CREATE TABLE `eb_page_diy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`version` varchar(255) NOT NULL DEFAULT '' COMMENT '版本号',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '页面名称',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '网站标题',
`cover_image` varchar(255) NOT NULL DEFAULT '' COMMENT '封面图',
`template_name` varchar(255) NOT NULL DEFAULT '' COMMENT '模板名称',
`value` longtext COMMENT '页面数据',
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '是否使用',
`type` int(1) NOT NULL DEFAULT '0' COMMENT '页面类型',
`is_show` int(1) NOT NULL DEFAULT '0' COMMENT '显示首页',
`is_bg_color` int(1) NOT NULL DEFAULT '0' COMMENT '颜色是否选中',
`is_bg_pic` int(1) NOT NULL DEFAULT '0' COMMENT '背景图是否选中',
`is_diy` int(1) NOT NULL DEFAULT '0' COMMENT '是否是diy数据',
`color_picker` varchar(50) NOT NULL DEFAULT '' COMMENT '背景颜色',
`bg_pic` varchar(256) NOT NULL DEFAULT '' COMMENT '背景图',
`bg_tab_val` int(1) NOT NULL DEFAULT '0' COMMENT '背景图图片样式',
`is_del` int(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
`return_address` varchar(255) NOT NULL DEFAULT '0' COMMENT '返回地址',
`title_bg_color` varchar(255) NOT NULL DEFAULT '1' COMMENT '标题背景色',
`title_color` varchar(255) NOT NULL DEFAULT '1' COMMENT '标题颜色',
`service_status` int(1) NOT NULL DEFAULT '1' COMMENT '商家样式',
`mer_id` int(11) NOT NULL DEFAULT '0' COMMENT '商户ID',
`is_default` int(1) NOT NULL DEFAULT '0' COMMENT '默认模板(1.平台默认 2.商户默认)',
`text_position` int(1) NOT NULL DEFAULT '0' COMMENT '标题文本位置',
PRIMARY KEY (`id`),
KEY `template_name` (`template_name`,`type`) USING BTREE,
KEY `status_type` (`status`,`type`) USING BTREE,
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=224 DEFAULT CHARSET=utf8 COMMENT='DIY数据表';
-- ----------------------------
-- Table structure for eb_page_link
-- ----------------------------
DROP TABLE IF EXISTS `eb_page_link`;
CREATE TABLE `eb_page_link` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`cate_id` int(10) NOT NULL DEFAULT '0' COMMENT '分类id',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '分组1:基础2:分销3:个人中心',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '页面名称',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '页面链接',
`param` varchar(255) NOT NULL DEFAULT '' COMMENT '参数',
`example` varchar(255) NOT NULL DEFAULT '' COMMENT '事例',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态',
`sort` smallint(5) NOT NULL DEFAULT '0' COMMENT '排序',
`add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`is_mer` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1是商户的链接',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='页面链接';
-- ----------------------------
-- Table structure for eb_pay_component_brand
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_brand`;
CREATE TABLE `eb_pay_component_brand` (
`brand_id` int(11) unsigned NOT NULL COMMENT '品牌ID',
`brand_wording` varchar(255) NOT NULL DEFAULT '' COMMENT '品牌名称',
KEY `brand_id` (`brand_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件品牌表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_cat
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_cat`;
CREATE TABLE `eb_pay_component_cat` (
`third_cat_id` int(11) unsigned NOT NULL COMMENT '类目ID',
`third_cat_name` varchar(255) NOT NULL DEFAULT '' COMMENT '类目名称',
`qualification` varchar(500) NOT NULL DEFAULT '' COMMENT '类目资质',
`qualification_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '类目资质类型,0:不需要,1:必填,2:选填',
`product_qualification` varchar(500) NOT NULL DEFAULT '' COMMENT '商品资质',
`product_qualification_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '商品资质类型,0:不需要,1:必填,2:选填',
`second_cat_id` int(11) unsigned NOT NULL COMMENT '二级类目ID',
`second_cat_name` varchar(255) DEFAULT '' COMMENT '二级类目名称',
`first_cat_id` int(11) unsigned NOT NULL COMMENT '一级类目ID',
`first_cat_name` varchar(255) DEFAULT '' COMMENT '一级类目名称',
KEY `third_cat_id` (`third_cat_id`) USING BTREE,
KEY `second_cat_id` (`second_cat_id`) USING BTREE,
KEY `first_cat_id` (`first_cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件类目表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_delivery_company
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_delivery_company`;
CREATE TABLE `eb_pay_component_delivery_company` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`delivery_id` varchar(20) NOT NULL COMMENT '快递公司id',
`delivery_name` varchar(50) NOT NULL COMMENT '快递公司名称',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=600 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件快递公司表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_draft_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_draft_product`;
CREATE TABLE `eb_pay_component_draft_product` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`product_id` int(11) unsigned NOT NULL COMMENT '商品ID商家自定义商品ID',
`primary_product_id` int(11) unsigned NOT NULL COMMENT '主商品ID',
`component_product_id` int(11) unsigned DEFAULT NULL COMMENT '交易组件平台内部商品ID',
`title` varchar(255) NOT NULL COMMENT '标题',
`path` varchar(255) NOT NULL COMMENT '绑定的小程序商品路径',
`head_img` text NOT NULL COMMENT '轮播图,多张',
`qualification_pics` text COMMENT '商品资质图片,多张',
`third_cat_id` int(11) unsigned NOT NULL COMMENT '第三级类目ID',
`brand_id` int(11) unsigned NOT NULL COMMENT '品牌id',
`info_version` varchar(255) NOT NULL DEFAULT '' COMMENT '预留字段,用于版本控制',
`status` int(11) unsigned NOT NULL COMMENT '线上状态0-初始值5-上架11-自主下架13-违规下架/风控系统下架',
`edit_status` int(11) unsigned NOT NULL COMMENT '商品草稿状态:1-未审核2-审核中3-审核失败4-审核成功',
`create_time` varchar(30) DEFAULT NULL COMMENT '创建时间',
`update_time` varchar(30) DEFAULT NULL COMMENT '更新时间',
`temp_id` int(11) NOT NULL COMMENT '运费模板ID',
`stock` int(11) unsigned NOT NULL COMMENT '库存',
`sales` int(11) unsigned NOT NULL COMMENT '销量',
`unit_name` varchar(16) NOT NULL COMMENT '单位名称',
`give_integral` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '反多少积分',
`spec_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '规格 0单 1多',
`ficti` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '虚拟销量',
`desc_info` text COMMENT 'desc详情',
`sku` text COMMENT 'sku',
`attr` text COMMENT 'attr(前端用)',
`attr_value` text COMMENT 'attrValue(前端用)',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
`add_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商品草稿表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_order`;
CREATE TABLE `eb_pay_component_order` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_no` varchar(32) NOT NULL COMMENT '订单号,商家自定义订单ID',
`component_order_id` bigint(64) unsigned DEFAULT NULL COMMENT '微信侧订单id ',
`openid` varchar(255) NOT NULL COMMENT '用户的openid',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '商家小程序该订单的页面path用于微信侧订单中心跳转',
`scene` int(20) unsigned NOT NULL COMMENT '下单时小程序的场景值',
`out_user_id` int(11) unsigned NOT NULL COMMENT '用户id',
`pay_method` varchar(255) NOT NULL COMMENT '支付方式,包括:微信支付,货到付款,其他',
`pay_method_type` int(3) unsigned NOT NULL COMMENT '支付方式0微信支付1: 货到付款99: 其他默认0',
`prepay_id` varchar(255) NOT NULL COMMENT '预支付ID',
`prepay_time` varchar(255) NOT NULL COMMENT '预付款时间拿到prepay_id的时间',
`order_price` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '该订单最终的金额(单位:分)',
`freight` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '运费(单位:分)',
`discounted_price` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '优惠金额(单位:分)',
`additional_price` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '附加金额(单位:分)',
`additional_remarks` varchar(255) DEFAULT NULL COMMENT '附加金额备注',
`delivery_type` int(2) unsigned NOT NULL COMMENT '发货类型:1: 正常快递, 2: 无需快递, 3: 线下配送, 4: 用户自提 默认1',
`receiver_name` varchar(50) NOT NULL COMMENT '收件人姓名',
`detailed_address` varchar(255) NOT NULL COMMENT '详细收货地址信息',
`tel_number` varchar(20) NOT NULL COMMENT '收件人手机号码',
`country` varchar(20) DEFAULT NULL COMMENT '国家',
`province` varchar(20) DEFAULT NULL COMMENT '省份',
`city` varchar(20) DEFAULT NULL COMMENT '城市',
`town` varchar(20) DEFAULT NULL COMMENT '乡镇',
`ticket` varchar(100) NOT NULL COMMENT '拉起收银台的ticket',
`ticket_expire_time` varchar(20) NOT NULL COMMENT 'ticket有效截止时间',
`final_price` bigint(20) unsigned NOT NULL COMMENT '订单最终价格(单位:分)',
`status` int(4) unsigned NOT NULL DEFAULT '10' COMMENT '订单状态10-待付款11-收银台支付完成自动流转对商家来说和10同等对待即可20-待发货30-待收货100-完成200-全部商品售后之后订单取消250-用户主动取消/待付款超时取消/商家取消',
`finish_all_delivery` int(4) unsigned DEFAULT NULL COMMENT '是否发货完成',
`delivery_list` text COMMENT '快递数组',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`transaction_id` varchar(32) DEFAULT NULL COMMENT '微信支付订单号',
`time_end` varchar(14) DEFAULT NULL COMMENT '订单支付时间格式为yyyyMMddHHmmss',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件订单表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_order_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_order_product`;
CREATE TABLE `eb_pay_component_order_product` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_no` varchar(32) NOT NULL COMMENT '订单号,商家自定义订单ID',
`component_order_id` bigint(64) unsigned DEFAULT NULL COMMENT '微信侧订单id ',
`product_id` int(20) unsigned DEFAULT NULL COMMENT '交易组件平台内部商品ID',
`out_product_id` varchar(20) NOT NULL COMMENT '商家自定义商品ID',
`sku_id` int(20) unsigned NOT NULL DEFAULT '0' COMMENT '交易组件平台内部skuID可填0如果这个product_id下没有sku',
`out_sku_id` varchar(20) NOT NULL COMMENT '商家自定义商品skuID可填空字符串如果这个product_id下没有sku',
`product_cnt` int(11) unsigned NOT NULL COMMENT '购买的数量',
`sale_price` bigint(20) unsigned NOT NULL COMMENT '生成这次订单时商品的售卖价(单位:分),可以跟上传商品接口的价格不一致',
`head_img` varchar(255) NOT NULL COMMENT '生成订单时商品的头图',
`title` varchar(255) NOT NULL COMMENT '生成订单时商品的标题',
`path` varchar(255) NOT NULL COMMENT '绑定的小程序商品路径',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件订单详情表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_product`;
CREATE TABLE `eb_pay_component_product` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID商家自定义商品ID',
`primary_product_id` int(11) unsigned NOT NULL COMMENT '主商品ID',
`component_product_id` int(11) unsigned DEFAULT NULL COMMENT '交易组件平台内部商品ID',
`title` varchar(255) NOT NULL COMMENT '标题',
`path` varchar(255) DEFAULT NULL COMMENT '绑定的小程序商品路径',
`head_img` text NOT NULL COMMENT '轮播图,多张',
`qualification_pics` text COMMENT '商品资质图片,多张',
`third_cat_id` int(11) unsigned NOT NULL COMMENT '第三级类目ID',
`brand_id` int(11) unsigned NOT NULL COMMENT '品牌id',
`info_version` varchar(255) NOT NULL DEFAULT '' COMMENT '预留字段,用于版本控制',
`status` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '线上状态0-初始值5-上架11-自主下架13-违规下架/风控系统下架',
`edit_status` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '商品草稿状态:1-未审核2-审核中3-审核失败4-审核成功',
`create_time` varchar(30) DEFAULT NULL COMMENT '创建时间',
`update_time` varchar(30) DEFAULT NULL COMMENT '更新时间',
`temp_id` int(11) DEFAULT NULL COMMENT '运费模板ID',
`stock` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存',
`sales` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '销量',
`unit_name` varchar(16) NOT NULL COMMENT '单位名称',
`give_integral` int(11) NOT NULL DEFAULT '0' COMMENT '反多少积分',
`spec_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '规格 0单 1多',
`ficti` int(11) NOT NULL DEFAULT '0' COMMENT '虚拟销量',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
`is_sub` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否单独分佣',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商品表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_product_audit_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_product_audit_info`;
CREATE TABLE `eb_pay_component_product_audit_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`product_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`component_product_id` int(11) unsigned DEFAULT NULL COMMENT '交易组件平台内部商品ID',
`submit_time` varchar(50) DEFAULT NULL COMMENT '上一次提交时间, yyyy-MM-dd HH:mm:ss',
`audit_time` varchar(50) DEFAULT NULL COMMENT '上一次审核时间, yyyy-MM-dd HH:mm:ss',
`reject_reason` varchar(255) DEFAULT NULL COMMENT '拒绝理由只有edit_status为3时出现',
`audit_id` varchar(50) DEFAULT NULL COMMENT '审核单id',
PRIMARY KEY (`id`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商品审核信息表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_product_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_product_info`;
CREATE TABLE `eb_pay_component_product_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`product_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`component_product_id` int(11) unsigned DEFAULT NULL COMMENT '交易组件平台内部商品ID',
`desc` text NOT NULL COMMENT '商品详情',
`imgs` text COMMENT '商品详情图片',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商品详情表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_product_sku
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_product_sku`;
CREATE TABLE `eb_pay_component_product_sku` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID商家自定义skuID',
`product_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`component_product_id` int(11) unsigned DEFAULT NULL COMMENT '交易组件平台内部商品ID',
`sku_id` varchar(20) DEFAULT NULL COMMENT '交易组件平台自定义skuID',
`thumb_img` varchar(500) NOT NULL COMMENT 'sku小图',
`sale_price` bigint(20) unsigned NOT NULL COMMENT '售卖价格,以分为单位',
`market_price` bigint(20) unsigned NOT NULL COMMENT '市场价格,以分为单位',
`stock_num` int(11) unsigned NOT NULL COMMENT '库存',
`barcode` varchar(255) DEFAULT NULL COMMENT '条形码',
`sku_code` varchar(255) DEFAULT NULL COMMENT '商品编码',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
`sku` varchar(128) DEFAULT NULL COMMENT '商品属性索引值 (attr_value|attr_value[|....])',
`attr_value_id` int(11) unsigned DEFAULT NULL COMMENT '商品规格属性id',
`version` int(11) NOT NULL DEFAULT '0' COMMENT '并发版本控制',
PRIMARY KEY (`id`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商品sku表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_product_sku_attr
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_product_sku_attr`;
CREATE TABLE `eb_pay_component_product_sku_attr` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID商家自定义skuID',
`sku_id` int(11) unsigned NOT NULL COMMENT 'skuID',
`component_sku_id` varchar(20) DEFAULT NULL COMMENT '交易组件平台自定义skuID',
`attr_key` varchar(255) NOT NULL COMMENT '销售属性key自定义',
`attr_value` varchar(255) NOT NULL COMMENT '销售属性value自定义',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
PRIMARY KEY (`id`) USING BTREE,
KEY `sku_id` (`sku_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商品sku属性表(视频号)';
-- ----------------------------
-- Table structure for eb_pay_component_shop_brand
-- ----------------------------
DROP TABLE IF EXISTS `eb_pay_component_shop_brand`;
CREATE TABLE `eb_pay_component_shop_brand` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`brand_id` int(11) unsigned DEFAULT NULL COMMENT '品牌ID',
`audit_id` varchar(255) DEFAULT NULL COMMENT '审核单id',
`license` text COMMENT '营业执照或组织机构代码证图片url/media_id,逗号分隔',
`brand_audit_type` int(32) unsigned DEFAULT NULL COMMENT '认证审核类型1国内品牌申请-R标2国内品牌申请-TM标3海外品牌申请-R标4海外品牌申请-TM标',
`trademark_type` varchar(3) DEFAULT NULL COMMENT '商标分类共有45个分类',
`brand_management_type` int(32) unsigned DEFAULT NULL COMMENT '选择品牌经营类型1-自有品牌2-代理品牌3-无品牌',
`commodity_origin_type` int(32) unsigned DEFAULT NULL COMMENT '商品产地是否进口1-是2-否',
`brand_wording` varchar(255) DEFAULT NULL COMMENT '商标/品牌词',
`sale_authorization` text COMMENT '销售授权书(如商持人为自然人,还需提供有其签名的身份证正反面扫描件)图片url/media_id,逗号分隔',
`trademark_registration_certificate` text COMMENT '商标注册证书图片url/media_id,逗号分隔',
`trademark_change_certificate` text COMMENT '商标变更证明图片url/media_id,逗号分隔',
`trademark_registrant` varchar(50) DEFAULT NULL COMMENT '商标注册人姓名',
`trademark_registrant_nu` varchar(255) DEFAULT NULL COMMENT '商标注册号/申请号',
`trademark_authorization_period` varchar(30) DEFAULT NULL COMMENT '商标有效期yyyy-MM-dd HH:mm:ss',
`trademark_registration_application` text COMMENT '商标注册申请受理通知书图片url/media_id,逗号分隔',
`trademark_applicant` varchar(50) DEFAULT NULL COMMENT '商标申请人姓名',
`trademark_application_time` varchar(30) DEFAULT NULL COMMENT '商标申请时间, yyyy-MM-dd HH:mm:ss',
`imported_goods_form` text COMMENT '中华人民共和国海关进口货物报关单图片url/media_id,逗号分隔',
`status` int(3) unsigned DEFAULT NULL COMMENT '审核状态, 0审核中1审核成功9审核拒绝',
`reject_reason` varchar(255) DEFAULT NULL COMMENT '如果审核拒绝,返回拒绝原因',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组件商户品牌表(视频号)';
-- ----------------------------
-- Table structure for eb_product_day_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_product_day_record`;
CREATE TABLE `eb_product_day_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(20) DEFAULT NULL COMMENT '日期',
`product_id` int(11) DEFAULT NULL COMMENT '商品id',
`page_view` int(11) DEFAULT NULL COMMENT '浏览量',
`collect_num` int(11) DEFAULT NULL COMMENT '收藏量',
`add_cart_num` int(11) DEFAULT NULL COMMENT '加购件数',
`order_product_num` int(11) DEFAULT NULL COMMENT '下单商品数(销售件数)',
`order_success_product_fee` decimal(8,2) DEFAULT NULL COMMENT '销售额',
PRIMARY KEY (`id`) USING BTREE,
KEY `date` (`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1944 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品日记录表';
-- ----------------------------
-- Table structure for eb_schedule_job
-- ----------------------------
DROP TABLE IF EXISTS `eb_schedule_job`;
CREATE TABLE `eb_schedule_job` (
`job_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务id',
`bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
`method_name` varchar(100) DEFAULT NULL COMMENT '方法名',
`params` varchar(2000) DEFAULT NULL COMMENT '参数',
`cron_expression` varchar(100) DEFAULT NULL COMMENT 'cron表达式',
`status` tinyint(4) DEFAULT NULL COMMENT '任务状态 0正常 1暂停',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`is_delte` tinyint(1) unsigned DEFAULT '0' COMMENT '是否删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`job_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='定时任务';
-- ----------------------------
-- Table structure for eb_schedule_job_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_schedule_job_log`;
CREATE TABLE `eb_schedule_job_log` (
`log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '任务日志id',
`job_id` int(11) NOT NULL COMMENT '任务id',
`bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称',
`method_name` varchar(100) DEFAULT NULL COMMENT '方法名',
`params` varchar(2000) DEFAULT NULL COMMENT '参数',
`status` tinyint(4) NOT NULL COMMENT '任务状态 0成功 1失败',
`error` varchar(2000) DEFAULT NULL COMMENT '失败信息',
`times` int(11) NOT NULL COMMENT '耗时(单位:毫秒)',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`log_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2275112 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='定时任务日志';
-- ----------------------------
-- Table structure for eb_sensitive_method_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_sensitive_method_log`;
CREATE TABLE `eb_sensitive_method_log` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`admin_id` int(11) NOT NULL COMMENT '管理员id',
`admin_account` varchar(32) DEFAULT '' COMMENT '管理员账号',
`description` varchar(50) DEFAULT '' COMMENT '接口描述',
`method_type` varchar(30) DEFAULT '' COMMENT '业务类型',
`method` varchar(100) DEFAULT '' COMMENT '方法名称',
`request_method` varchar(10) DEFAULT '' COMMENT '请求方式',
`url` varchar(255) DEFAULT '' COMMENT '请求URL',
`ip` varchar(50) DEFAULT '' COMMENT '主机地址',
`request_param` varchar(2000) DEFAULT '' COMMENT '请求参数',
`result` varchar(2000) DEFAULT '' COMMENT '返回参数',
`status` int(1) DEFAULT '0' COMMENT '操作状态0正常 1异常',
`error_msg` varchar(2000) DEFAULT '' COMMENT '错误消息',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=411 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='敏感操作日志表';
-- ----------------------------
-- Table structure for eb_shipping_templates
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_templates`;
CREATE TABLE `eb_shipping_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(255) NOT NULL COMMENT '模板名称',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '计费方式',
`appoint` tinyint(1) NOT NULL DEFAULT '0' COMMENT '包邮类型0-全国包邮1-部分包邮2-不包邮',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='运费模板';
-- ----------------------------
-- Table structure for eb_shipping_templates_free
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_templates_free`;
CREATE TABLE `eb_shipping_templates_free` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`temp_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板ID',
`city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市ID',
`title` text COMMENT '描述',
`number` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '包邮件数',
`price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '包邮金额',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '计费方式',
`uniqid` varchar(32) NOT NULL DEFAULT '' COMMENT '分组唯一值',
`status` tinyint(1) DEFAULT '0' COMMENT '是否无效',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='运费模板包邮';
-- ----------------------------
-- Table structure for eb_shipping_templates_region
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_templates_region`;
CREATE TABLE `eb_shipping_templates_region` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
`temp_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板ID',
`city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市ID',
`title` text COMMENT '描述',
`first` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '首件',
`first_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '首件运费',
`renewal` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '续件',
`renewal_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '续件运费',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '计费方式 1按件数 2按重量 3按体积',
`uniqid` varchar(32) NOT NULL DEFAULT '' COMMENT '分组唯一值',
`status` tinyint(1) DEFAULT '0' COMMENT '是否无效',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='运费模板指定区域费用';
-- ----------------------------
-- Table structure for eb_shopping_product_day_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_shopping_product_day_record`;
CREATE TABLE `eb_shopping_product_day_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(20) DEFAULT NULL COMMENT '日期',
`add_product_num` int(11) DEFAULT NULL COMMENT '新增商品数量',
`page_view` int(11) DEFAULT NULL COMMENT '浏览量',
`collect_num` int(11) DEFAULT NULL COMMENT '收藏量',
`add_cart_num` int(11) DEFAULT NULL COMMENT '加购件数',
`order_product_num` int(11) DEFAULT NULL COMMENT '下单商品数',
`order_success_product_num` int(11) DEFAULT NULL COMMENT '交易成功商品数',
PRIMARY KEY (`id`) USING BTREE,
KEY `date` (`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商城商品日记录表';
-- ----------------------------
-- Table structure for eb_sms_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_sms_record`;
CREATE TABLE `eb_sms_record` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '短信发送记录编号',
`uid` varchar(255) NOT NULL COMMENT '短信平台账号',
`phone` char(11) NOT NULL COMMENT '接受短信的手机号',
`content` text COMMENT '短信内容',
`add_ip` varchar(30) DEFAULT NULL COMMENT '添加记录ip',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`template` varchar(255) DEFAULT '' COMMENT '短信模板ID',
`resultcode` int(6) unsigned DEFAULT NULL COMMENT '状态码 100=成功,130=失败,131=空号,132=停机,133=关机,134=无状态',
`record_id` int(11) unsigned DEFAULT NULL COMMENT '发送记录id',
`memo` text COMMENT '短信平台返回信息',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='短信发送记录表';
-- ----------------------------
-- Table structure for eb_sms_template
-- ----------------------------
DROP TABLE IF EXISTS `eb_sms_template`;
CREATE TABLE `eb_sms_template` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`temp_id` varchar(20) NOT NULL DEFAULT '0' COMMENT '短信模板id',
`temp_type` tinyint(2) NOT NULL DEFAULT '1' COMMENT '模板类型',
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '模板说明',
`type` varchar(20) NOT NULL DEFAULT '' COMMENT '类型',
`temp_key` varchar(50) NOT NULL DEFAULT '' COMMENT '模板编号',
`status` tinyint(2) NOT NULL DEFAULT '1' COMMENT '状态',
`content` varchar(500) NOT NULL COMMENT '短息内容',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=573 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='短信模板表';
-- ----------------------------
-- Table structure for eb_store_bargain
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_bargain`;
CREATE TABLE `eb_store_bargain` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '砍价商品ID',
`product_id` int(11) unsigned NOT NULL COMMENT '关联商品ID',
`title` varchar(255) NOT NULL COMMENT '砍价活动名称',
`image` varchar(150) NOT NULL COMMENT '砍价活动图片',
`unit_name` varchar(16) DEFAULT NULL COMMENT '单位名称',
`stock` int(11) unsigned DEFAULT NULL COMMENT '库存',
`sales` int(11) unsigned DEFAULT NULL COMMENT '销量',
`images` varchar(2000) NOT NULL COMMENT '砍价商品轮播图',
`start_time` bigint(14) unsigned NOT NULL COMMENT '砍价开启时间',
`stop_time` bigint(14) unsigned NOT NULL COMMENT '砍价结束时间',
`store_name` varchar(255) DEFAULT NULL COMMENT '砍价商品名称',
`price` decimal(8,2) unsigned DEFAULT NULL COMMENT '砍价金额',
`min_price` decimal(8,2) unsigned DEFAULT NULL COMMENT '砍价商品最低价',
`num` int(11) unsigned DEFAULT NULL COMMENT '购买数量限制——单个活动每个用户发起砍价次数限制',
`bargain_max_price` decimal(8,2) unsigned DEFAULT NULL COMMENT '用户每次砍价的最大金额',
`bargain_min_price` decimal(8,2) unsigned DEFAULT NULL COMMENT '用户每次砍价的最小金额',
`bargain_num` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '帮砍次数——单个商品用户可以帮砍的次数',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)',
`give_integral` int(11) DEFAULT '0' COMMENT '反多少积分',
`info` varchar(255) DEFAULT NULL COMMENT '砍价活动简介',
`cost` decimal(8,2) unsigned DEFAULT NULL COMMENT '成本价',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`is_hot` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否推荐0不推荐1推荐',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除',
`add_time` bigint(14) unsigned DEFAULT NULL COMMENT '添加时间',
`is_postage` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否包邮 0不包邮 1包邮',
`postage` decimal(10,2) unsigned DEFAULT NULL COMMENT '邮费',
`rule` text COMMENT '砍价规则',
`look` int(11) unsigned DEFAULT '0' COMMENT '砍价商品浏览量',
`share` int(11) unsigned DEFAULT '0' COMMENT '砍价商品分享量',
`temp_id` int(11) DEFAULT NULL COMMENT '运费模板ID',
`weight` decimal(8,2) DEFAULT '0.00' COMMENT '重量',
`volume` decimal(8,2) DEFAULT '0.00' COMMENT '体积',
`quota` int(10) NOT NULL DEFAULT '0' COMMENT '限购总数',
`quota_show` int(10) NOT NULL DEFAULT '0' COMMENT '限量总数显示',
`people_num` int(11) DEFAULT NULL COMMENT '砍价人数——需要多少人砍价成功',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='砍价表';
-- ----------------------------
-- Table structure for eb_store_bargain_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_bargain_user`;
CREATE TABLE `eb_store_bargain_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户参与砍价表ID',
`uid` int(11) unsigned DEFAULT NULL COMMENT '用户ID',
`bargain_id` int(11) unsigned DEFAULT NULL COMMENT '砍价商品id',
`bargain_price_min` decimal(8,2) unsigned DEFAULT NULL COMMENT '砍价的最低价',
`bargain_price` decimal(8,2) DEFAULT NULL COMMENT '砍价金额',
`price` decimal(8,2) unsigned DEFAULT NULL COMMENT '砍掉的价格',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态 1参与中 2 活动结束参与失败 3活动结束参与成功',
`add_time` bigint(14) unsigned DEFAULT NULL COMMENT '参与时间',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否取消',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户参与砍价表';
-- ----------------------------
-- Table structure for eb_store_bargain_user_help
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_bargain_user_help`;
CREATE TABLE `eb_store_bargain_user_help` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '砍价用户帮助表ID',
`uid` int(11) unsigned DEFAULT NULL COMMENT '帮助的用户id',
`bargain_id` int(11) unsigned DEFAULT NULL COMMENT '砍价商品ID',
`bargain_user_id` int(11) unsigned DEFAULT NULL COMMENT '用户参与砍价表id',
`price` decimal(8,2) unsigned DEFAULT NULL COMMENT '帮助砍价多少金额',
`add_time` bigint(14) unsigned DEFAULT NULL COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='砍价用户帮助表';
-- ----------------------------
-- Table structure for eb_store_cart
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_cart`;
CREATE TABLE `eb_store_cart` (
`id` bigint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '购物车表ID',
`uid` int(10) unsigned NOT NULL COMMENT '用户ID',
`type` varchar(32) NOT NULL COMMENT '类型',
`product_id` int(10) unsigned NOT NULL COMMENT '商品ID',
`product_attr_unique` varchar(16) NOT NULL DEFAULT '' COMMENT '商品属性',
`cart_num` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
`is_new` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为立即购买',
`combination_id` int(11) unsigned DEFAULT '0' COMMENT '拼团id',
`seckill_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀商品ID',
`bargain_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '砍价id',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT 'g',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '购物车状态',
PRIMARY KEY (`id`) USING BTREE,
KEY `user_id` (`uid`) USING BTREE,
KEY `goods_id` (`product_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `uid_2` (`uid`) USING BTREE,
KEY `uid_3` (`uid`,`is_new`) USING BTREE,
KEY `type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='购物车表';
-- ----------------------------
-- Table structure for eb_store_combination
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_combination`;
CREATE TABLE `eb_store_combination` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '拼团商品ID',
`product_id` int(10) unsigned NOT NULL COMMENT '商品id',
`mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户id',
`image` varchar(255) NOT NULL COMMENT '推荐图',
`images` varchar(2000) NOT NULL COMMENT '轮播图',
`title` varchar(255) NOT NULL COMMENT '活动标题',
`attr` varchar(255) DEFAULT NULL COMMENT '活动属性',
`people` int(2) unsigned NOT NULL COMMENT '参团人数',
`info` varchar(255) NOT NULL COMMENT '简介',
`price` decimal(10,2) unsigned NOT NULL COMMENT '价格',
`sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`sales` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '销量',
`stock` int(10) unsigned NOT NULL COMMENT '库存',
`add_time` bigint(14) NOT NULL COMMENT '添加时间',
`is_host` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '推荐',
`is_show` tinyint(1) unsigned NOT NULL COMMENT '商品状态',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0',
`combination` tinyint(1) unsigned DEFAULT '1',
`mer_use` tinyint(1) unsigned DEFAULT NULL COMMENT '商户是否可用1可用0不可用',
`is_postage` tinyint(1) unsigned DEFAULT NULL COMMENT '是否包邮1是0否',
`postage` decimal(10,2) unsigned DEFAULT NULL COMMENT '邮费',
`start_time` bigint(14) unsigned NOT NULL COMMENT '拼团开始时间',
`stop_time` bigint(14) unsigned NOT NULL COMMENT '拼团结束时间',
`effective_time` int(11) NOT NULL DEFAULT '0' COMMENT '拼团订单有效时间(小时)',
`cost` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '拼图商品成本',
`browse` int(11) DEFAULT '0' COMMENT '浏览量',
`unit_name` varchar(32) NOT NULL DEFAULT '' COMMENT '单位名',
`temp_id` int(11) NOT NULL COMMENT '运费模板ID',
`weight` decimal(8,2) DEFAULT '0.00' COMMENT '重量',
`volume` decimal(8,2) DEFAULT '0.00' COMMENT '体积',
`num` int(11) DEFAULT NULL COMMENT '单次购买数量',
`quota` int(10) NOT NULL DEFAULT '0' COMMENT '限购总数',
`quota_show` int(10) NOT NULL DEFAULT '0' COMMENT '限量总数显示',
`ot_price` decimal(10,2) NOT NULL COMMENT '原价',
`once_num` int(11) NOT NULL DEFAULT '0' COMMENT '每个订单可购买数量',
`virtual_ration` int(11) NOT NULL DEFAULT '100' COMMENT '虚拟成团百分比',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='拼团商品表';
-- ----------------------------
-- Table structure for eb_store_coupon
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon`;
CREATE TABLE `eb_store_coupon` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券表ID',
`name` varchar(64) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`money` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '兑换的优惠券面值',
`is_limited` tinyint(1) DEFAULT '0' COMMENT '是否限量, 默认0 不限量, 1限量',
`total` int(11) NOT NULL DEFAULT '0' COMMENT '发放总数',
`last_total` int(11) DEFAULT '0' COMMENT '剩余数量',
`use_type` tinyint(2) NOT NULL DEFAULT '1' COMMENT '使用类型 1 全场通用, 2 商品券, 3 品类券',
`primary_key` varchar(255) NOT NULL DEFAULT '' COMMENT '所属商品id / 分类id',
`min_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费0代表不限制',
`receive_start_time` timestamp NOT NULL COMMENT '可领取开始时间',
`receive_end_time` timestamp NULL DEFAULT NULL COMMENT '可领取结束时间',
`is_fixed_time` tinyint(1) DEFAULT '0' COMMENT '是否固定使用时间, 默认0 否, 1是',
`use_start_time` timestamp NULL DEFAULT NULL COMMENT '可使用时间范围 开始时间',
`use_end_time` timestamp NULL DEFAULT NULL COMMENT '可使用时间范围 结束时间',
`day` int(4) DEFAULT '0' COMMENT '天数',
`type` tinyint(2) NOT NULL DEFAULT '1' COMMENT '优惠券类型 1 手动领取, 2 新人券, 3 赠送券',
`sort` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '排序',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态0关闭1开启',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 状态01',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `state` (`status`) USING BTREE,
KEY `is_del` (`is_del`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='优惠券表';
-- ----------------------------
-- Table structure for eb_store_coupon_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon_user`;
CREATE TABLE `eb_store_coupon_user` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`coupon_id` int(10) NOT NULL COMMENT '优惠券发布id',
`cid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '兑换的项目id',
`uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '领取人id',
`name` varchar(32) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`money` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券的面值',
`min_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费多少金额可用优惠券',
`type` varchar(32) NOT NULL DEFAULT 'send' COMMENT '获取方式send后台发放, 用户领取 get',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态0未使用1已使用, 2:已失效)',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`start_time` timestamp NULL DEFAULT NULL COMMENT '开始使用时间',
`end_time` timestamp NULL DEFAULT NULL COMMENT '过期时间',
`use_time` timestamp NULL DEFAULT NULL COMMENT '使用时间',
`use_type` tinyint(1) DEFAULT '1' COMMENT '使用类型 1 全场通用, 2 商品券, 3 品类券',
`primary_key` varchar(255) DEFAULT NULL COMMENT '所属商品id / 分类id',
PRIMARY KEY (`id`) USING BTREE,
KEY `cid` (`cid`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `end_time` (`end_time`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='优惠券记录表';
-- ----------------------------
-- Table structure for eb_store_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order`;
CREATE TABLE `eb_store_order` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`order_id` varchar(32) NOT NULL COMMENT '订单号',
`uid` int(11) unsigned NOT NULL COMMENT '用户id',
`real_name` varchar(32) NOT NULL COMMENT '用户姓名',
`user_phone` varchar(18) NOT NULL COMMENT '用户电话',
`user_address` varchar(100) NOT NULL COMMENT '详细地址',
`freight_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '运费金额',
`total_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单商品总数',
`total_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总价',
`total_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费',
`pay_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际支付金额',
`pay_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付邮费',
`deduction_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '抵扣金额',
`coupon_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券id',
`coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券金额',
`paid` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态',
`pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` varchar(32) NOT NULL DEFAULT '' COMMENT '支付方式',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态0待发货1待收货2已收货待评价3已完成',
`refund_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 未退款 1 申请中 2 已退款 3 退款中',
`refund_reason_wap_img` varchar(5000) DEFAULT NULL COMMENT '退款图片',
`refund_reason_wap_explain` varchar(255) DEFAULT NULL COMMENT '退款用户说明',
`refund_reason_wap` varchar(255) DEFAULT NULL COMMENT '前台退款原因',
`refund_reason` varchar(255) DEFAULT NULL COMMENT '不退款的理由',
`refund_reason_time` timestamp NULL DEFAULT NULL COMMENT '退款时间',
`refund_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`delivery_name` varchar(64) DEFAULT NULL COMMENT '快递名称/送货人姓名',
`delivery_type` varchar(32) DEFAULT NULL COMMENT '发货类型',
`delivery_id` varchar(64) DEFAULT NULL COMMENT '快递单号/手机号',
`gain_integral` int(11) DEFAULT '0' COMMENT '消费赚取积分',
`use_integral` int(11) DEFAULT '0' COMMENT '使用积分',
`back_integral` int(11) DEFAULT '0' COMMENT '给用户退了多少积分',
`mark` varchar(512) NOT NULL COMMENT '备注',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`remark` varchar(512) DEFAULT NULL COMMENT '管理员备注',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户ID',
`is_mer_check` tinyint(3) unsigned NOT NULL DEFAULT '0',
`combination_id` int(11) unsigned DEFAULT '0' COMMENT '拼团商品id0一般商品',
`pink_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '拼团id 0没有拼团',
`cost` decimal(8,2) unsigned NOT NULL COMMENT '成本价',
`seckill_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀商品ID',
`bargain_id` int(11) unsigned DEFAULT '0' COMMENT '砍价id',
`verify_code` varchar(12) NOT NULL DEFAULT '' COMMENT '核销码',
`store_id` int(11) NOT NULL DEFAULT '0' COMMENT '门店id',
`shipping_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '配送方式 1=快递 2=门店自提',
`clerk_id` int(11) NOT NULL DEFAULT '0' COMMENT '店员id/核销员id',
`is_channel` tinyint(1) unsigned DEFAULT '0' COMMENT '支付渠道(0微信公众号1微信小程序2余额)',
`is_remind` tinyint(1) unsigned DEFAULT '0' COMMENT '消息提醒',
`is_system_del` tinyint(1) DEFAULT '0' COMMENT '后台是否删除',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`delivery_code` varchar(50) DEFAULT NULL COMMENT '快递公司简称',
`bargain_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户拼团活动id 0没有',
`type` int(3) NOT NULL DEFAULT '0' COMMENT '订单类型:0-普通订单1-视频号订单',
`pro_total_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总价',
`before_pay_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '改价前支付金额',
`is_alter_price` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否改价,0-否1-是',
`out_trade_no` varchar(32) DEFAULT NULL COMMENT '商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号',
`shipment_pic` varchar(255) DEFAULT NULL COMMENT '商家寄件单号图片',
`shipment_task_id` varchar(64) DEFAULT NULL COMMENT '商家寄件订单任务id',
`shipment_order_id` varchar(64) DEFAULT NULL COMMENT '商家寄件订单单号',
`shipment_num` varchar(64) DEFAULT NULL COMMENT '商家寄件快递单号',
`express_record_type` int(11) DEFAULT NULL COMMENT '发货记录类型1快递、2送货, 3虚拟发货',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `order_id_2` (`order_id`,`uid`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `add_time` (`create_time`) USING BTREE,
KEY `pay_price` (`pay_price`) USING BTREE,
KEY `paid` (`paid`) USING BTREE,
KEY `pay_time` (`pay_time`) USING BTREE,
KEY `pay_type` (`pay_type`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `is_del` (`is_del`) USING BTREE,
KEY `coupon_id` (`coupon_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=144 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单表';
-- ----------------------------
-- Table structure for eb_store_order_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_info`;
CREATE TABLE `eb_store_order_info` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`order_id` int(11) unsigned NOT NULL COMMENT '订单id',
`product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`info` text NOT NULL COMMENT '购买东西的详细信息',
`unique` char(32) NOT NULL COMMENT '唯一id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
`order_no` varchar(32) NOT NULL COMMENT '订单号',
`product_name` varchar(128) NOT NULL COMMENT '商品名称',
`attr_value_id` int(11) unsigned DEFAULT NULL COMMENT '规格属性值id',
`image` varchar(256) NOT NULL COMMENT '商品图片',
`sku` varchar(128) NOT NULL COMMENT '商品sku',
`price` decimal(8,2) unsigned NOT NULL COMMENT '商品价格',
`pay_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '购买数量',
`weight` decimal(8,2) unsigned NOT NULL COMMENT '重量',
`volume` decimal(8,2) unsigned NOT NULL COMMENT '体积',
`give_integral` int(11) unsigned NOT NULL COMMENT '赠送积分',
`is_reply` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否评价0-未评价1-已评价',
`is_sub` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否单独分佣,0-否1-是',
`vip_price` decimal(8,2) unsigned NOT NULL COMMENT '会员价',
`product_type` int(2) NOT NULL DEFAULT '0' COMMENT '商品类型:0-普通1-秒杀2-砍价3-拼团4-视频号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `oid` (`order_id`,`unique`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=196 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单购物详情表';
-- ----------------------------
-- Table structure for eb_store_order_status
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_status`;
CREATE TABLE `eb_store_order_status` (
`oid` int(10) unsigned NOT NULL COMMENT '订单id',
`change_type` varchar(32) NOT NULL COMMENT '操作类型',
`change_message` varchar(256) NOT NULL COMMENT '操作备注',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
KEY `oid` (`oid`) USING BTREE,
KEY `change_type` (`change_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='订单操作记录表';
-- ----------------------------
-- Table structure for eb_store_pink
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_pink`;
CREATE TABLE `eb_store_pink` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '拼团ID',
`uid` int(10) unsigned NOT NULL COMMENT '用户id',
`order_id` varchar(32) NOT NULL COMMENT '订单id 生成',
`order_id_key` int(10) unsigned NOT NULL COMMENT '订单id 数据库',
`total_num` int(10) unsigned NOT NULL COMMENT '购买商品个数',
`total_price` decimal(10,2) unsigned NOT NULL COMMENT '购买总金额',
`cid` int(10) unsigned NOT NULL COMMENT '拼团商品id',
`pid` int(10) unsigned NOT NULL COMMENT '商品id',
`people` int(10) unsigned NOT NULL COMMENT '拼图总人数',
`price` decimal(10,2) unsigned NOT NULL COMMENT '拼团商品单价',
`add_time` bigint(14) NOT NULL COMMENT '开始时间',
`stop_time` bigint(14) NOT NULL COMMENT '结束时间',
`k_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '团长id 0为团长',
`is_tpl` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否发送模板消息0未发送1已发送',
`is_refund` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否退款 0未退款 1已退款',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态1进行中2已完成3未完成',
`is_virtual` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否虚拟拼团',
`nickname` varchar(64) NOT NULL DEFAULT '' COMMENT '用户昵称',
`avatar` varchar(256) NOT NULL DEFAULT '' COMMENT '用户头像',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='拼团表';
-- ----------------------------
-- Table structure for eb_store_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product`;
CREATE TABLE `eb_store_product` (
`id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品id',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)',
`image` varchar(256) NOT NULL COMMENT '商品图片',
`slider_image` varchar(2000) NOT NULL COMMENT '轮播图',
`store_name` varchar(128) NOT NULL COMMENT '商品名称',
`store_info` varchar(256) NOT NULL COMMENT '商品简介',
`keyword` varchar(256) NOT NULL COMMENT '关键字',
`bar_code` varchar(15) NOT NULL DEFAULT '' COMMENT '商品条码(一维码)',
`cate_id` varchar(64) NOT NULL COMMENT '分类id',
`price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格',
`vip_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '会员价格',
`ot_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '市场价',
`postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费',
`unit_name` varchar(32) NOT NULL COMMENT '单位名',
`sort` smallint(11) NOT NULL DEFAULT '0' COMMENT '排序',
`sales` mediumint(11) unsigned NOT NULL DEFAULT '0' COMMENT '销量',
`stock` mediumint(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态0未上架1上架',
`is_hot` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否热卖',
`is_benefit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否优惠',
`is_best` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否精品',
`is_new` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否新品',
`add_time` int(11) unsigned NOT NULL COMMENT '添加时间',
`is_postage` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否包邮',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`mer_use` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '商户是否代理 0不可代理1可代理',
`give_integral` int(11) DEFAULT '0' COMMENT '获得积分',
`cost` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '成本价',
`is_seckill` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '秒杀状态 0 未开启 1已开启',
`is_bargain` tinyint(1) unsigned DEFAULT NULL COMMENT '砍价状态 0未开启 1开启',
`is_good` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否优品推荐',
`is_sub` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否单独分佣',
`ficti` mediumint(11) DEFAULT '100' COMMENT '虚拟销量',
`browse` int(11) DEFAULT '0' COMMENT '浏览量',
`code_path` varchar(64) NOT NULL DEFAULT '' COMMENT '商品二维码地址(用户小程序海报)',
`soure_link` varchar(255) DEFAULT '' COMMENT '淘宝京东1688类型',
`video_link` varchar(200) NOT NULL DEFAULT '' COMMENT '主图视频链接',
`temp_id` int(11) NOT NULL DEFAULT '1' COMMENT '运费模板ID',
`spec_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '规格 0单 1多',
`activity` varchar(255) NOT NULL DEFAULT '' COMMENT '活动显示排序0=默认, 1=秒杀2=砍价3=拼团',
`flat_pattern` varchar(1000) NOT NULL DEFAULT '' COMMENT '展示图',
`is_recycle` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否回收站',
`version` int(11) NOT NULL DEFAULT '0' COMMENT '并发版本控制',
PRIMARY KEY (`id`) USING BTREE,
KEY `cate_id` (`cate_id`) USING BTREE,
KEY `is_hot` (`is_hot`) USING BTREE,
KEY `is_benefit` (`is_benefit`) USING BTREE,
KEY `is_best` (`is_best`) USING BTREE,
KEY `is_new` (`is_new`) USING BTREE,
KEY `toggle_on_sale, is_del` (`is_del`) USING BTREE,
KEY `price` (`price`) USING BTREE,
KEY `is_show` (`is_show`) USING BTREE,
KEY `sort` (`sort`) USING BTREE,
KEY `sales` (`sales`) USING BTREE,
KEY `add_time` (`add_time`) USING BTREE,
KEY `is_postage` (`is_postage`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品表';
-- ----------------------------
-- Table structure for eb_store_product_attr
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr`;
CREATE TABLE `eb_store_product_attr` (
`id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`attr_name` varchar(32) NOT NULL COMMENT '属性名',
`attr_values` varchar(1000) NOT NULL COMMENT '属性值',
`type` tinyint(1) DEFAULT '0' COMMENT '活动类型 0=商品1=秒杀2=砍价3=拼团',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除,0-否1-是',
PRIMARY KEY (`id`) USING BTREE,
KEY `store_id` (`product_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品属性表';
-- ----------------------------
-- Table structure for eb_store_product_attr_result
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr_result`;
CREATE TABLE `eb_store_product_attr_result` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`product_id` int(10) unsigned NOT NULL COMMENT '商品ID',
`result` longtext NOT NULL COMMENT '商品属性参数',
`change_time` int(10) unsigned NOT NULL COMMENT '上次修改时间',
`type` tinyint(1) DEFAULT '0' COMMENT '活动类型 0=商品1=秒杀2=砍价3=拼团',
PRIMARY KEY (`id`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品属性详情表';
-- ----------------------------
-- Table structure for eb_store_product_attr_value
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr_value`;
CREATE TABLE `eb_store_product_attr_value` (
`id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`product_id` int(10) unsigned NOT NULL COMMENT '商品ID',
`suk` varchar(128) NOT NULL COMMENT '商品属性索引值 (attr_value|attr_value[|....])',
`stock` int(10) unsigned NOT NULL COMMENT '属性对应的库存',
`sales` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '销量',
`price` decimal(8,2) unsigned NOT NULL COMMENT '属性金额',
`image` varchar(1000) DEFAULT NULL COMMENT '图片',
`unique` char(8) NOT NULL DEFAULT '' COMMENT '唯一值',
`cost` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '成本价',
`bar_code` varchar(50) NOT NULL DEFAULT '' COMMENT '商品条码',
`ot_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '原价',
`weight` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '重量',
`volume` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '体积',
`brokerage` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '一级返佣',
`brokerage_two` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '二级返佣',
`type` tinyint(1) DEFAULT '0' COMMENT '活动类型 0=商品1=秒杀2=砍价3=拼团',
`quota` int(11) DEFAULT NULL COMMENT '活动限购数量',
`quota_show` int(11) DEFAULT NULL COMMENT '活动限购数量显示',
`attr_value` text COMMENT 'attr_values 创建更新时的属性对应',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除,0-否1-是',
`version` int(11) NOT NULL DEFAULT '0' COMMENT '并发版本控制',
PRIMARY KEY (`id`) USING BTREE,
KEY `unique` (`unique`,`suk`) USING BTREE,
KEY `store_id` (`product_id`,`suk`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品属性值表';
-- ----------------------------
-- Table structure for eb_store_product_cate
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_cate`;
CREATE TABLE `eb_store_product_cate` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`product_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品id',
`cate_id` int(11) NOT NULL DEFAULT '0' COMMENT '分类id',
`add_time` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品分类辅助表';
-- ----------------------------
-- Table structure for eb_store_product_coupon
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_coupon`;
CREATE TABLE `eb_store_product_coupon` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`product_id` int(10) NOT NULL DEFAULT '0' COMMENT '商品id',
`issue_coupon_id` int(10) NOT NULL DEFAULT '0' COMMENT '优惠劵id',
`add_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品优惠券表';
-- ----------------------------
-- Table structure for eb_store_product_description
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_description`;
CREATE TABLE `eb_store_product_description` (
`product_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
`description` text NOT NULL COMMENT '商品详情',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '商品类型',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`) USING BTREE,
KEY `product_id` (`product_id`,`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品描述表';
-- ----------------------------
-- Table structure for eb_store_product_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_log`;
CREATE TABLE `eb_store_product_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '统计ID',
`type` varchar(10) NOT NULL COMMENT '类型visit,cart,order,pay,collect,refund',
`product_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`visit_num` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否浏览',
`cart_num` int(11) NOT NULL DEFAULT '0' COMMENT '加入购物车数量',
`order_num` int(11) NOT NULL DEFAULT '0' COMMENT '下单数量',
`pay_num` int(11) NOT NULL DEFAULT '0' COMMENT '支付数量',
`pay_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '支付金额',
`cost_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '商品成本价',
`pay_uid` int(11) NOT NULL DEFAULT '0' COMMENT '支付用户ID',
`refund_num` int(11) NOT NULL DEFAULT '0' COMMENT '退款数量',
`refund_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`collect_num` tinyint(1) NOT NULL DEFAULT '0' COMMENT '收藏',
`add_time` bigint(14) NOT NULL DEFAULT '0' COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品日志表';
-- ----------------------------
-- Table structure for eb_store_product_relation
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_relation`;
CREATE TABLE `eb_store_product_relation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`uid` int(10) unsigned NOT NULL COMMENT '用户ID',
`product_id` int(10) unsigned NOT NULL COMMENT '商品ID',
`type` varchar(32) NOT NULL COMMENT '类型(收藏(collect、点赞(like))',
`category` varchar(32) NOT NULL COMMENT '某种类型的商品(普通商品、秒杀商品)',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `uid` (`uid`,`product_id`,`type`,`category`) USING BTREE,
KEY `type` (`type`) USING BTREE,
KEY `category` (`category`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品点赞和收藏表';
-- ----------------------------
-- Table structure for eb_store_product_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_reply`;
CREATE TABLE `eb_store_product_reply` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '评论ID',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`oid` int(11) NOT NULL DEFAULT '0' COMMENT '订单ID',
`unique` varchar(32) NOT NULL COMMENT '商品唯一id',
`product_id` int(11) NOT NULL COMMENT '商品id',
`reply_type` varchar(32) NOT NULL DEFAULT 'product' COMMENT '某种商品类型(普通商品、秒杀商品)',
`product_score` tinyint(1) NOT NULL COMMENT '商品分数',
`service_score` tinyint(1) NOT NULL COMMENT '服务分数',
`comment` varchar(512) NOT NULL COMMENT '评论内容',
`pics` text NOT NULL COMMENT '评论图片',
`merchant_reply_content` varchar(300) DEFAULT NULL COMMENT '管理员回复内容',
`merchant_reply_time` int(11) DEFAULT NULL COMMENT '管理员回复时间',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未删除1已删除',
`is_reply` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未回复1已回复',
`nickname` varchar(64) NOT NULL COMMENT '用户名称',
`avatar` varchar(255) NOT NULL COMMENT '用户头像',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`sku` varchar(128) NOT NULL DEFAULT '' COMMENT '商品规格属性值,多个,号隔开',
PRIMARY KEY (`id`) USING BTREE,
KEY `parent_id` (`reply_type`) USING BTREE,
KEY `is_del` (`is_del`) USING BTREE,
KEY `product_score` (`product_score`) USING BTREE,
KEY `service_score` (`service_score`) USING BTREE,
KEY `uid+oid` (`uid`,`oid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='评论表';
-- ----------------------------
-- Table structure for eb_store_product_rule
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_rule`;
CREATE TABLE `eb_store_product_rule` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`rule_name` varchar(32) NOT NULL COMMENT '规格名称',
`rule_value` text NOT NULL COMMENT '规格值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='商品规则值(规格)表';
-- ----------------------------
-- Table structure for eb_store_seckill
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_seckill`;
CREATE TABLE `eb_store_seckill` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品秒杀产品表id',
`product_id` int(10) unsigned NOT NULL COMMENT '商品id',
`image` varchar(255) NOT NULL COMMENT '推荐图',
`images` varchar(2000) NOT NULL COMMENT '轮播图',
`title` varchar(255) NOT NULL COMMENT '活动标题',
`info` varchar(255) NOT NULL COMMENT '简介',
`price` decimal(10,2) unsigned NOT NULL COMMENT '价格',
`cost` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '成本',
`ot_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '原价',
`give_integral` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '返多少积分',
`sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`stock` int(10) unsigned NOT NULL COMMENT '库存',
`sales` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '销量',
`unit_name` varchar(16) NOT NULL COMMENT '单位名',
`postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费',
`description` text COMMENT '内容',
`start_time` datetime NOT NULL COMMENT '开始时间',
`stop_time` datetime NOT NULL COMMENT '结束时间',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`status` tinyint(3) unsigned NOT NULL COMMENT '秒杀状态 0=关闭 1=开启',
`is_postage` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否包邮',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '删除 0未删除1已删除',
`num` int(11) unsigned NOT NULL COMMENT '当天参与活动次数',
`is_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '显示',
`time_id` int(11) DEFAULT NULL COMMENT '时间段ID',
`temp_id` int(11) NOT NULL DEFAULT '0' COMMENT '运费模板ID',
`weight` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '重量',
`volume` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '体积',
`quota` int(10) NOT NULL DEFAULT '0' COMMENT '限购总数,随减',
`quota_show` int(10) NOT NULL DEFAULT '0' COMMENT '限购总数显示.不变',
`spec_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '规格 0=单 1=多',
PRIMARY KEY (`id`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE,
KEY `start_time` (`start_time`,`stop_time`) USING BTREE,
KEY `is_del` (`is_del`) USING BTREE,
KEY `is_show` (`status`) USING BTREE,
KEY `add_time` (`create_time`) USING BTREE,
KEY `sort` (`sort`) USING BTREE,
KEY `is_postage` (`is_postage`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商品秒杀产品表';
-- ----------------------------
-- Table structure for eb_store_seckill_manger
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_seckill_manger`;
CREATE TABLE `eb_store_seckill_manger` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL COMMENT '秒杀名称',
`start_time` int(11) DEFAULT NULL COMMENT '秒杀开始时间段',
`end_time` int(11) DEFAULT NULL COMMENT '秒杀结束时间段',
`img` text COMMENT '主图',
`silder_imgs` text COMMENT '轮播图',
`sort` int(11) DEFAULT NULL COMMENT '排序',
`status` int(11) DEFAULT NULL COMMENT '状态 0=关闭 1=开启',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_del` int(11) NOT NULL DEFAULT '0' COMMENT '删除标记 0=为删除 1=删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Table structure for eb_system_admin
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_admin`;
CREATE TABLE `eb_system_admin` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '后台管理员表ID',
`account` varchar(32) NOT NULL COMMENT '后台管理员账号',
`pwd` char(32) NOT NULL COMMENT '后台管理员密码',
`real_name` varchar(16) NOT NULL COMMENT '后台管理员姓名',
`roles` varchar(128) NOT NULL COMMENT '后台管理员权限(menus_id)',
`last_ip` varchar(16) DEFAULT NULL COMMENT '后台管理员最后一次登录ip',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '后台管理员最后一次登录时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '后台管理员添加时间',
`login_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数',
`level` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '后台管理员级别',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '后台管理员状态 1有效0无效',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0',
`phone` varchar(15) DEFAULT NULL COMMENT '手机号码',
`is_sms` tinyint(1) unsigned DEFAULT '0' COMMENT '是否接收短信',
PRIMARY KEY (`id`) USING BTREE,
KEY `account` (`account`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='后台管理员表';
-- ----------------------------
-- Table structure for eb_system_attachment
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_attachment`;
CREATE TABLE `eb_system_attachment` (
`att_id` int(10) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '附件名称',
`att_dir` varchar(200) NOT NULL DEFAULT '' COMMENT '附件路径',
`satt_dir` varchar(200) DEFAULT NULL COMMENT '压缩图片路径',
`att_size` char(30) NOT NULL DEFAULT '' COMMENT '附件大小',
`att_type` char(30) NOT NULL DEFAULT '' COMMENT '附件类型',
`pid` int(10) NOT NULL DEFAULT '0' COMMENT '分类ID0编辑器,1商品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图 7前台用户',
`image_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '图片上传类型 1本地 2七牛云 3OSS 4COS ',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`att_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1446 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='附件管理表';
-- ----------------------------
-- Table structure for eb_system_city
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_city`;
CREATE TABLE `eb_system_city` (
`id` int(11) NOT NULL,
`city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市id',
`level` int(11) NOT NULL DEFAULT '0' COMMENT '省市级别',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
`area_code` varchar(30) NOT NULL DEFAULT '' COMMENT '区号',
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
`merger_name` varchar(255) NOT NULL DEFAULT '' COMMENT '合并名称',
`lng` varchar(50) NOT NULL DEFAULT '' COMMENT '经度',
`lat` varchar(50) NOT NULL DEFAULT '' COMMENT '纬度',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否展示',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='城市表';
-- ----------------------------
-- Table structure for eb_system_config
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_config`;
CREATE TABLE `eb_system_config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置id',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '字段名称',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '字段提示文字',
`form_id` int(10) DEFAULT '0' COMMENT '表单id',
`value` varchar(5000) DEFAULT '' COMMENT '',
`status` tinyint(1) DEFAULT '0' COMMENT '是否隐藏',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `status+name` (`name`) USING BTREE,
KEY `name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8327 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='配置表';
-- ----------------------------
-- Table structure for eb_system_form_temp
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_form_temp`;
CREATE TABLE `eb_system_form_temp` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '表单模板id',
`name` varchar(500) NOT NULL DEFAULT '' COMMENT '表单名称',
`info` varchar(500) NOT NULL DEFAULT '' COMMENT '表单简介',
`content` text NOT NULL COMMENT '表单内容',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=147 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='表单模板';
-- ----------------------------
-- Table structure for eb_system_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_group`;
CREATE TABLE `eb_system_group` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组合数据ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '数据组名称',
`info` varchar(256) NOT NULL DEFAULT '' COMMENT '简介',
`form_id` int(11) NOT NULL DEFAULT '0' COMMENT 'form 表单 id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组合数据表';
-- ----------------------------
-- Table structure for eb_system_group_data
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_group_data`;
CREATE TABLE `eb_system_group_data` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组合数据详情ID',
`gid` int(11) NOT NULL DEFAULT '0' COMMENT '对应的数据组id',
`value` text NOT NULL COMMENT '数据组对应的数据值json数据',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '数据排序',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1开启2关闭',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2250 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='组合数据详情表';
-- ----------------------------
-- Table structure for eb_system_menu
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_menu`;
CREATE TABLE `eb_system_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`name` varchar(100) DEFAULT NULL COMMENT '名称',
`icon` varchar(255) DEFAULT NULL COMMENT 'icon',
`perms` varchar(200) DEFAULT NULL COMMENT '权限标识',
`component` varchar(200) DEFAULT NULL COMMENT '组件路径',
`menu_type` varchar(2) DEFAULT 'M' COMMENT '类型M-目录C-菜单A-按钮',
`sort` int(5) NOT NULL DEFAULT '99999' COMMENT '排序',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '显示状态',
`is_delte` tinyint(1) unsigned DEFAULT '0' COMMENT '是否删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=505 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='系统菜单表';
-- ----------------------------
-- Table structure for eb_system_notification
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_notification`;
CREATE TABLE `eb_system_notification` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`mark` varchar(50) NOT NULL DEFAULT '' COMMENT '标识',
`type` varchar(50) NOT NULL DEFAULT '' COMMENT '通知类型',
`description` varchar(100) NOT NULL DEFAULT '' COMMENT '通知场景说明',
`is_wechat` tinyint(2) NOT NULL DEFAULT '0' COMMENT '公众号模板消息0不存在1开启2关闭',
`wechat_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板消息id',
`is_routine` tinyint(2) NOT NULL DEFAULT '0' COMMENT '小程序订阅消息0不存在1开启2关闭',
`routine_id` int(11) NOT NULL DEFAULT '0' COMMENT '订阅消息id',
`is_sms` tinyint(2) NOT NULL DEFAULT '0' COMMENT '发送短信0不存在1开启2关闭',
`sms_id` int(11) NOT NULL DEFAULT '0' COMMENT '短信id',
`send_type` tinyint(2) NOT NULL DEFAULT '1' COMMENT '发送类型1用户2管理员',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `mark` (`mark`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='通知设置表';
-- ----------------------------
-- Table structure for eb_system_role
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_role`;
CREATE TABLE `eb_system_role` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '身份管理id',
`role_name` varchar(32) NOT NULL COMMENT '身份管理名称',
`rules` text NOT NULL COMMENT '身份管理权限(menus_id)',
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='身份管理表';
-- ----------------------------
-- Table structure for eb_system_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_role_menu`;
CREATE TABLE `eb_system_role_menu` (
`rid` int(11) NOT NULL COMMENT '角色id',
`menu_id` int(11) NOT NULL COMMENT '权限id',
PRIMARY KEY (`rid`,`menu_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='角色菜单关联表';
-- ----------------------------
-- Table structure for eb_system_store
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_store`;
CREATE TABLE `eb_system_store` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '门店名称',
`introduction` varchar(1000) NOT NULL DEFAULT '' COMMENT '简介',
`phone` char(25) NOT NULL DEFAULT '' COMMENT '手机号码',
`address` varchar(255) NOT NULL DEFAULT '' COMMENT '省市区',
`detailed_address` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`image` varchar(255) NOT NULL DEFAULT '' COMMENT '门店logo',
`latitude` char(25) NOT NULL DEFAULT '' COMMENT '纬度',
`longitude` char(25) NOT NULL DEFAULT '' COMMENT '经度',
`valid_time` varchar(100) NOT NULL DEFAULT '' COMMENT '核销有效日期',
`day_time` varchar(100) NOT NULL DEFAULT '' COMMENT '每日营业开关时间',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `phone` (`phone`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='门店自提';
-- ----------------------------
-- Table structure for eb_system_store_staff
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_store_staff`;
CREATE TABLE `eb_system_store_staff` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL COMMENT '管理员id',
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '店员头像',
`store_id` int(11) NOT NULL COMMENT '门店id',
`staff_name` varchar(64) DEFAULT '' COMMENT '店员名称',
`phone` char(15) DEFAULT NULL COMMENT '手机号码',
`verify_status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '核销开关',
`status` tinyint(2) DEFAULT '1' COMMENT '状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='门店店员表';
-- ----------------------------
-- Table structure for eb_system_user_level
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_user_level`;
CREATE TABLE `eb_system_user_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '会员名称',
`experience` int(11) NOT NULL DEFAULT '0' COMMENT '达到多少升级经验',
`is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示 1=显示,0=隐藏',
`grade` int(11) NOT NULL DEFAULT '0' COMMENT '会员等级',
`discount` int(4) NOT NULL DEFAULT '100' COMMENT '享受折扣',
`icon` varchar(255) NOT NULL DEFAULT '' COMMENT '会员图标',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除.1=删除,0=未删除',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='普通会员等级';
-- ----------------------------
-- Table structure for eb_template_message
-- ----------------------------
DROP TABLE IF EXISTS `eb_template_message`;
CREATE TABLE `eb_template_message` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '模板id',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=订阅消息,1=微信模板消息',
`temp_key` char(50) NOT NULL DEFAULT '' COMMENT '模板编号',
`name` char(100) NOT NULL COMMENT '模板名',
`content` varchar(1000) NOT NULL COMMENT '回复内容',
`temp_id` char(100) DEFAULT NULL COMMENT '模板ID',
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='微信模板';
-- ----------------------------
-- Table structure for eb_trading_day_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_trading_day_record`;
CREATE TABLE `eb_trading_day_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(20) DEFAULT NULL COMMENT '日期',
`product_order_num` int(11) DEFAULT NULL COMMENT '订单数量',
`product_order_pay_num` int(11) DEFAULT NULL COMMENT '订单支付数量',
`product_order_pay_fee` decimal(8,2) DEFAULT NULL COMMENT '订单支付金额',
`product_order_refund_num` int(11) DEFAULT NULL COMMENT '订单退款数量',
`product_order_refund_fee` decimal(8,2) DEFAULT NULL COMMENT '订单退款金额',
`recharge_order_num` int(11) DEFAULT NULL COMMENT '充值订单数量',
`recharge_order_fee` decimal(8,2) DEFAULT NULL COMMENT '充值订单金额',
`balance_pay_fee` decimal(8,2) DEFAULT NULL COMMENT '余额支付金额',
`brokerage_fee` decimal(8,2) DEFAULT NULL COMMENT '支付佣金金额(用户确认到账佣金)',
PRIMARY KEY (`id`) USING BTREE,
KEY `date` (`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=127 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='商城交易日记录表';
-- ----------------------------
-- Table structure for eb_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_user`;
CREATE TABLE `eb_user` (
`uid` int(10) unsigned NOT NULL COMMENT '用户id',
`account` varchar(32) NOT NULL DEFAULT '' COMMENT '用户账号',
`pwd` varchar(32) DEFAULT '' COMMENT '用户密码',
`real_name` varchar(25) DEFAULT '' COMMENT '真实姓名',
`birthday` varchar(32) DEFAULT '' COMMENT '生日',
`card_id` varchar(20) DEFAULT '' COMMENT '身份证号码',
`mark` varchar(255) DEFAULT '' COMMENT '用户备注',
`partner_id` int(11) DEFAULT NULL COMMENT '合伙人id',
`group_id` varchar(255) DEFAULT '' COMMENT '用户分组id',
`tag_id` varchar(255) DEFAULT '' COMMENT '标签id',
`nickname` varchar(255) DEFAULT '' COMMENT '用户昵称',
`avatar` varchar(256) DEFAULT '' COMMENT '用户头像',
`phone` char(15) DEFAULT NULL COMMENT '手机号码',
`add_ip` varchar(16) DEFAULT '' COMMENT '添加ip',
`last_ip` varchar(16) DEFAULT '' COMMENT '最后一次登录ip',
`now_money` decimal(16,2) unsigned DEFAULT '0.00' COMMENT '用户余额',
`brokerage_price` decimal(8,2) DEFAULT '0.00' COMMENT '佣金金额',
`integral` decimal(10,3) DEFAULT '0.000' COMMENT '用户剩余积分',
`experience` int(11) unsigned DEFAULT '0' COMMENT '用户剩余经验',
`sign_num` int(11) DEFAULT '0' COMMENT '连续签到天数',
`status` tinyint(1) DEFAULT '1' COMMENT '1为正常0为禁止',
`level` tinyint(2) unsigned DEFAULT '0' COMMENT '等级',
`spread_uid` int(10) unsigned DEFAULT '0' COMMENT '推广员id',
`spread_time` timestamp NULL DEFAULT NULL COMMENT '推广员关联时间',
`user_type` varchar(32) NOT NULL DEFAULT '' COMMENT '用户类型',
`is_promoter` tinyint(1) unsigned DEFAULT '1' COMMENT '是否为推广员',
`pay_count` int(11) unsigned DEFAULT '0' COMMENT '用户购买次数',
`spread_count` int(11) DEFAULT '0' COMMENT '下级人数',
`addres` varchar(255) DEFAULT '' COMMENT '详细地址',
`adminid` int(11) unsigned DEFAULT '0' COMMENT '管理员编号 ',
`login_type` varchar(36) NOT NULL DEFAULT '' COMMENT '用户登陆类型h5,wechat,routine',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`last_login_time` timestamp NULL DEFAULT NULL COMMENT '最后一次登录时间',
`clean_time` timestamp NULL DEFAULT NULL COMMENT '清除时间',
`path` varchar(255) NOT NULL DEFAULT '/0/' COMMENT '推广等级记录',
`subscribe` tinyint(3) DEFAULT '0' COMMENT '是否关注公众号',
`subscribe_time` timestamp NULL DEFAULT NULL COMMENT '关注公众号时间',
`sex` tinyint(1) DEFAULT '1' COMMENT '性别0未知1男2女3保密',
`country` varchar(20) DEFAULT 'CN' COMMENT '国家中国CN其他OTHER',
`promoter_time` timestamp NULL DEFAULT NULL COMMENT '成为分销员时间',
PRIMARY KEY (`uid`) USING BTREE,
UNIQUE KEY `account` (`account`) USING BTREE,
KEY `spreaduid` (`spread_uid`) USING BTREE,
KEY `level` (`level`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `is_promoter` (`is_promoter`) USING BTREE,
KEY `idx_user_uid_integral` (`uid`,`integral`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户表';
-- ----------------------------
-- Table structure for eb_user_address
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_address`;
CREATE TABLE `eb_user_address` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户地址id',
`uid` int(10) unsigned NOT NULL COMMENT '用户id',
`real_name` varchar(32) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(16) NOT NULL DEFAULT '' COMMENT '收货人电话',
`province` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在省',
`city` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在市',
`city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市id',
`district` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在区',
`detail` varchar(256) NOT NULL DEFAULT '' COMMENT '收货人详细地址',
`post_code` int(10) NOT NULL DEFAULT '0' COMMENT '邮编',
`longitude` varchar(16) NOT NULL DEFAULT '0' COMMENT '经度',
`latitude` varchar(16) NOT NULL DEFAULT '0' COMMENT '纬度',
`is_default` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `is_default` (`is_default`) USING BTREE,
KEY `is_del` (`is_del`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1107 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户地址表';
-- ----------------------------
-- Table structure for eb_user_bill
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_bill`;
CREATE TABLE `eb_user_bill` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户账单id',
`uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户uid',
`link_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '关联id',
`pm` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 = 支出 1 = 获得',
`title` varchar(64) NOT NULL DEFAULT '' COMMENT '账单标题',
`category` varchar(64) NOT NULL DEFAULT '' COMMENT '明细种类',
`type` varchar(64) NOT NULL DEFAULT '' COMMENT '明细类型',
`number` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '明细数字',
`balance` decimal(16,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '剩余',
`mark` varchar(512) NOT NULL DEFAULT '' COMMENT '备注',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 = 带确定 1 = 有效 -1 = 无效',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `openid` (`uid`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `add_time` (`create_time`) USING BTREE,
KEY `pm` (`pm`) USING BTREE,
KEY `type` (`category`,`type`,`link_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户账单表';
-- ----------------------------
-- Table structure for eb_user_brokerage_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_brokerage_record`;
CREATE TABLE `eb_user_brokerage_record` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '记录id',
`uid` int(10) NOT NULL DEFAULT '0' COMMENT '用户uid',
`link_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '关联idorderNo,提现id',
`link_type` varchar(32) NOT NULL DEFAULT '0' COMMENT '关联类型order,extractyue',
`type` int(1) NOT NULL DEFAULT '1' COMMENT '类型1-增加2-扣减(提现)',
`title` varchar(64) NOT NULL DEFAULT '' COMMENT '标题',
`price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
`balance` decimal(16,2) NOT NULL DEFAULT '0.00' COMMENT '剩余',
`mark` varchar(512) NOT NULL DEFAULT '' COMMENT '备注',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1-订单创建2-冻结期3-完成4-失效订单退款5-提现申请',
`frozen_time` int(3) NOT NULL DEFAULT '0' COMMENT '冻结期时间(天)',
`thaw_time` bigint(14) NOT NULL DEFAULT '0' COMMENT '解冻时间',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`brokerage_level` int(2) DEFAULT NULL COMMENT '分销等级',
PRIMARY KEY (`id`) USING BTREE,
KEY `openid` (`uid`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `add_time` (`create_time`) USING BTREE,
KEY `type` (`type`) USING BTREE,
KEY `type_link` (`type`,`link_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户佣金记录表';
-- ----------------------------
-- Table structure for eb_user_experience_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_experience_record`;
CREATE TABLE `eb_user_experience_record` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '记录id',
`uid` int(10) NOT NULL DEFAULT '0' COMMENT '用户uid',
`link_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '关联id-orderNo,(sign,system默认为0',
`link_type` varchar(32) NOT NULL DEFAULT 'order' COMMENT '关联类型order,sign,system',
`type` int(1) NOT NULL DEFAULT '1' COMMENT '类型1-增加2-扣减',
`title` varchar(64) NOT NULL DEFAULT '' COMMENT '标题',
`experience` int(11) NOT NULL DEFAULT '0' COMMENT '经验',
`balance` int(11) NOT NULL DEFAULT '0' COMMENT '剩余',
`mark` varchar(512) NOT NULL DEFAULT '' COMMENT '备注',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1-成功(保留字段)',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `openid` (`uid`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `add_time` (`create_time`) USING BTREE,
KEY `type` (`type`) USING BTREE,
KEY `type_link` (`type`,`link_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户经验记录表';
-- ----------------------------
-- Table structure for eb_user_extract
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_extract`;
CREATE TABLE `eb_user_extract` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned DEFAULT NULL,
`real_name` varchar(64) DEFAULT NULL COMMENT '名称',
`extract_type` varchar(32) DEFAULT 'bank' COMMENT 'bank = 银行卡 alipay = 支付宝 weixin=微信',
`bank_code` varchar(32) DEFAULT '0' COMMENT '银行卡',
`bank_address` varchar(256) DEFAULT '' COMMENT '开户地址',
`alipay_code` varchar(64) DEFAULT '' COMMENT '支付宝账号',
`extract_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '提现金额',
`mark` varchar(512) DEFAULT NULL,
`balance` decimal(8,2) unsigned DEFAULT '0.00',
`fail_msg` varchar(128) DEFAULT NULL COMMENT '无效原因',
`status` tinyint(2) DEFAULT '0' COMMENT '-1 未通过 0 审核中 1 已提现',
`wechat` varchar(15) DEFAULT NULL COMMENT '微信号',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`fail_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '失败时间',
`bank_name` varchar(512) DEFAULT NULL COMMENT '银行名称',
`qrcode_url` varchar(512) DEFAULT NULL COMMENT '微信收款二维码',
PRIMARY KEY (`id`) USING BTREE,
KEY `extract_type` (`extract_type`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `openid` (`uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户提现表';
-- ----------------------------
-- Table structure for eb_user_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_group`;
CREATE TABLE `eb_user_group` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`group_name` varchar(64) DEFAULT NULL COMMENT '用户分组名称',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户分组表';
-- ----------------------------
-- Table structure for eb_user_integral_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_integral_record`;
CREATE TABLE `eb_user_integral_record` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '记录id',
`uid` int(10) NOT NULL DEFAULT '0' COMMENT '用户uid',
`link_id` varchar(32) NOT NULL DEFAULT '0' COMMENT '关联id-orderNo,(sign,system默认为0',
`link_type` varchar(32) NOT NULL DEFAULT 'order' COMMENT '关联类型order,sign,system',
`type` int(1) NOT NULL DEFAULT '1' COMMENT '类型1-增加2-扣减',
`title` varchar(64) NOT NULL DEFAULT '' COMMENT '标题',
`integral` decimal(10,3) NOT NULL DEFAULT '0.000' COMMENT '积分',
`balance` int(11) NOT NULL DEFAULT '0' COMMENT '剩余',
`mark` varchar(512) NOT NULL DEFAULT '' COMMENT '备注',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态1-订单创建2-冻结期3-完成4-失效(订单退款)',
`frozen_time` int(3) NOT NULL DEFAULT '0' COMMENT '冻结期时间(天)',
`thaw_time` bigint(14) NOT NULL DEFAULT '0' COMMENT '解冻时间',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`wa_selfbonus_logid` int(11) DEFAULT NULL COMMENT '关联个人奖金记录',
PRIMARY KEY (`id`) USING BTREE,
KEY `openid` (`uid`) USING BTREE,
KEY `status` (`status`) USING BTREE,
KEY `add_time` (`create_time`) USING BTREE,
KEY `type` (`type`) USING BTREE,
KEY `type_link` (`type`,`link_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2744 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户积分记录表';
-- ----------------------------
-- Table structure for eb_user_level
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_level`;
CREATE TABLE `eb_user_level` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户uid',
`level_id` int(11) NOT NULL DEFAULT '0' COMMENT '等级vip',
`grade` int(11) NOT NULL DEFAULT '0' COMMENT '会员等级',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:禁止,1:正常',
`mark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`remind` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已通知',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除,0=未删除,1=删除',
`discount` int(4) NOT NULL DEFAULT '100' COMMENT '享受折扣',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`expired_time` timestamp NULL DEFAULT NULL COMMENT '过期时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `id` (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户等级记录表';
-- ----------------------------
-- Table structure for eb_user_recharge
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_recharge`;
CREATE TABLE `eb_user_recharge` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) DEFAULT NULL COMMENT '充值用户UID',
`order_id` varchar(32) DEFAULT NULL COMMENT '订单号',
`price` decimal(8,2) DEFAULT NULL COMMENT '充值金额',
`give_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '购买赠送金额',
`recharge_type` varchar(32) DEFAULT NULL COMMENT '充值类型',
`paid` tinyint(1) DEFAULT '0' COMMENT '是否充值',
`pay_time` timestamp NULL DEFAULT NULL COMMENT '充值支付时间',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '充值时间',
`refund_price` decimal(10,2) DEFAULT '0.00' COMMENT '退款金额',
`is_wechat_shipping` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否上传微信发货管理',
`out_trade_no` varchar(32) NOT NULL DEFAULT '' COMMENT '支付服务方订单号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `order_id` (`order_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `recharge_type` (`recharge_type`) USING BTREE,
KEY `paid` (`paid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户充值表';
-- ----------------------------
-- Table structure for eb_user_sign
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_sign`;
CREATE TABLE `eb_user_sign` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户uid',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '签到说明',
`number` int(11) NOT NULL DEFAULT '0' COMMENT '获得',
`balance` int(11) NOT NULL DEFAULT '0' COMMENT '剩余',
`type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型1积分2经验',
`create_day` date NOT NULL COMMENT '签到日期',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `uid` (`uid`,`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='签到记录表';
-- ----------------------------
-- Table structure for eb_user_tag
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_tag`;
CREATE TABLE `eb_user_tag` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) DEFAULT NULL COMMENT '标签名称',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='标签管理';
-- ----------------------------
-- Table structure for eb_user_token
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_token`;
CREATE TABLE `eb_user_token` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL COMMENT '用户 id',
`token` varchar(255) NOT NULL DEFAULT '' COMMENT 'token',
`type` tinyint(1) DEFAULT '1' COMMENT '类型1 公众号, 2 小程序, 3 unionid, 5AppIos,6AppAndroid,7ios',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`expires_time` datetime DEFAULT NULL COMMENT '到期时间',
`login_ip` varchar(32) DEFAULT NULL COMMENT '登录ip',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `type+token` (`type`,`token`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Table structure for eb_user_visit_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_visit_record`;
CREATE TABLE `eb_user_visit_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` varchar(20) DEFAULT NULL COMMENT '日期',
`uid` int(11) DEFAULT NULL COMMENT '用户uid',
`visit_type` int(2) DEFAULT NULL COMMENT '访问类型',
PRIMARY KEY (`id`) USING BTREE,
KEY `date` (`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11784 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='用户访问记录表';
-- ----------------------------
-- Table structure for eb_wechat_callback
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_callback`;
CREATE TABLE `eb_wechat_callback` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`to_user_name` varchar(255) DEFAULT NULL COMMENT '商家小程序名称',
`from_user_name` varchar(255) DEFAULT NULL COMMENT '微信团队的 OpenID(固定值)',
`create_time` bigint(50) unsigned DEFAULT NULL COMMENT '事件时间,Unix时间戳',
`msg_type` varchar(255) DEFAULT NULL COMMENT '消息类型',
`event` varchar(255) DEFAULT NULL COMMENT '事件类型',
`content` text COMMENT '内容',
`add_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信回调表';
-- ----------------------------
-- Table structure for eb_wechat_exceptions
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_exceptions`;
CREATE TABLE `eb_wechat_exceptions` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id',
`errcode` varchar(64) DEFAULT '' COMMENT '错误码',
`errmsg` varchar(255) DEFAULT '' COMMENT '错误信息',
`data` text COMMENT '回复数据',
`remark` text COMMENT '备注',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=284 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信异常表';
-- ----------------------------
-- Table structure for eb_wechat_pay_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_pay_info`;
CREATE TABLE `eb_wechat_pay_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_id` varchar(50) DEFAULT NULL COMMENT '公众号唯一标识',
`mch_id` varchar(50) DEFAULT NULL COMMENT '商户号',
`device_info` varchar(50) DEFAULT NULL COMMENT '设备号,PC网页或公众号内支付可以传-WEB',
`open_id` varchar(50) DEFAULT NULL COMMENT '用户的唯一标识',
`nonce_str` varchar(50) DEFAULT NULL COMMENT '随机字符串',
`sign` varchar(70) DEFAULT NULL COMMENT '签名',
`sign_type` varchar(20) DEFAULT 'MD5' COMMENT '签名类型默认为MD5支持HMAC-SHA256和MD5',
`body` varchar(500) DEFAULT NULL COMMENT '商品描述',
`detail` text COMMENT '商品详细描述,对于使用单品优惠的商户,该字段必须按照规范上传',
`attach` varchar(255) DEFAULT NULL COMMENT '附加数据在查询API和支付通知中原样返回可作为自定义参数使用',
`out_trade_no` varchar(50) DEFAULT NULL COMMENT '商户订单号,要求32个字符内',
`fee_type` varchar(50) DEFAULT NULL COMMENT '标价币种CNY人民币 GBP英镑 HKD港币 USD美元 JPY日元 CAD加拿大元 AUD澳大利亚元 EUR欧元 NZD新西兰元 KRW韩元 THB泰铢',
`total_fee` int(11) DEFAULT NULL COMMENT '标价金额',
`spbill_create_ip` varchar(64) DEFAULT NULL COMMENT '终端IP',
`time_start` varchar(20) DEFAULT NULL COMMENT '交易起始时间',
`time_expire` varchar(20) DEFAULT NULL COMMENT '交易结束时间',
`notify_url` varchar(300) DEFAULT NULL COMMENT '通知地址',
`trade_type` varchar(20) DEFAULT NULL COMMENT '交易类型,取值为JSAPINATIVEAPP等',
`product_id` varchar(32) DEFAULT NULL COMMENT '商品ID',
`scene_info` varchar(256) DEFAULT NULL COMMENT '场景信息',
`err_code` varchar(50) DEFAULT NULL COMMENT '错误代码',
`prepay_id` varchar(100) DEFAULT NULL COMMENT '预支付交易会话标识',
`code_url` varchar(64) DEFAULT NULL COMMENT '二维码链接',
`is_subscribe` varchar(2) DEFAULT NULL COMMENT '是否关注公众账号',
`trade_state` varchar(32) DEFAULT NULL COMMENT '交易状态',
`bank_type` varchar(20) DEFAULT NULL COMMENT '付款银行',
`cash_fee` int(11) DEFAULT NULL COMMENT '现金支付金额',
`coupon_fee` int(11) DEFAULT NULL COMMENT '代金券金额',
`transaction_id` varchar(50) DEFAULT NULL COMMENT '微信支付订单号',
`time_end` varchar(20) DEFAULT NULL COMMENT '支付完成时间',
`trade_state_desc` varchar(256) DEFAULT NULL COMMENT '交易状态描述',
PRIMARY KEY (`id`) USING BTREE,
KEY `out_trade_no` (`out_trade_no`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信订单表';
-- ----------------------------
-- Table structure for eb_wechat_program_my_temp
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_program_my_temp`;
CREATE TABLE `eb_wechat_program_my_temp` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`tid` int(11) NOT NULL COMMENT '微信模板id',
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '模版标题',
`kid` varchar(200) NOT NULL DEFAULT '' COMMENT '模板关键字id多个逗号分割',
`scene_desc` varchar(500) NOT NULL DEFAULT '' COMMENT '场景描述',
`temp_id` varchar(50) DEFAULT NULL COMMENT '微信模板id',
`extra` text COMMENT '扩展字段',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 0禁用1启用',
`type` varchar(100) DEFAULT NULL COMMENT '应用场景',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='小程序我的模板';
-- ----------------------------
-- Table structure for eb_wechat_program_public_temp
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_program_public_temp`;
CREATE TABLE `eb_wechat_program_public_temp` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`tid` int(11) NOT NULL COMMENT '微信模板id',
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '模版标题',
`type` tinyint(1) NOT NULL COMMENT '模版类型2 为一次性订阅3 为长期订阅',
`category_id` int(11) NOT NULL COMMENT '模版所属类目 id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `tid` (`tid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=359 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='小程序微信公共模板库';
-- ----------------------------
-- Table structure for eb_wechat_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_reply`;
CREATE TABLE `eb_wechat_reply` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信关键字回复id',
`keywords` varchar(64) NOT NULL DEFAULT '' COMMENT '关键字',
`type` varchar(32) NOT NULL DEFAULT '' COMMENT '回复类型',
`data` text NOT NULL COMMENT '回复数据',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '回复状态 0=不可用 1 =可用',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `key` (`keywords`) USING BTREE,
KEY `type` (`type`) USING BTREE,
KEY `status` (`status`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='微信关键字回复表';
SET FOREIGN_KEY_CHECKS = 1;