~~~[sql]
CREATE TABLE `eb_article` (
`article_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章管理ID',
`cid` int(11) unsigned DEFAULT '0' COMMENT '分类id',
`title` varchar(64) NOT NULL COMMENT '文章标题',
`author` varchar(32) DEFAULT NULL COMMENT '文章作者',
`image_input` varchar(128) NOT NULL COMMENT '文章图片',
`synopsis` varchar(128) DEFAULT NULL COMMENT '文章简介',
`visit` varchar(255) DEFAULT NULL COMMENT '浏览次数',
`sort` int(10) unsigned DEFAULT '0' COMMENT '排序',
`url` varchar(128) DEFAULT NULL COMMENT '原文链接',
`admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id',
`mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户id',
`is_hot` tinyint(1) unsigned DEFAULT '0' COMMENT '是否热门(小程序)',
`is_banner` tinyint(1) unsigned DEFAULT '0' COMMENT '是否轮播图(小程序)',
`status` tinyint(1) unsigned DEFAULT NULL COMMENT '状态',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`wechat_news_id` int(11) DEFAULT '0' COMMENT '微信图文id',
PRIMARY KEY (`article_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8 COMMENT='文章管理表';
-- ----------------------------
-- Table structure for eb_article_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_article_category`;
CREATE TABLE `eb_article_category` (
`article_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章分类id',
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '父级ID',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`title` varchar(32) NOT NULL COMMENT '文章分类标题',
`info` varchar(255) DEFAULT NULL COMMENT '文章分类简介',
`image` varchar(128) NOT NULL COMMENT '文章分类图片',
`status` tinyint(1) unsigned NOT NULL COMMENT '状态',
`sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`article_category_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='文章分类表';
-- ----------------------------
-- Table structure for eb_article_content
-- ----------------------------
DROP TABLE IF EXISTS `eb_article_content`;
CREATE TABLE `eb_article_content` (
`article_content_id` int(10) unsigned NOT NULL COMMENT '文章id',
`content` text NOT NULL COMMENT '文章内容',
UNIQUE KEY `article_content_id` (`article_content_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章内容表';
-- ----------------------------
-- Table structure for eb_broadcast_goods
-- ----------------------------
DROP TABLE IF EXISTS `eb_broadcast_goods`;
CREATE TABLE `eb_broadcast_goods` (
`broadcast_goods_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`goods_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '微信商品ID',
`audit_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '审核单 id',
`cover_img` varchar(255) NOT NULL COMMENT '图片',
`name` varchar(64) NOT NULL COMMENT '商品名称',
`price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '价格',
`product_type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '商品类型',
`product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品 id',
`error_msg` varchar(255) DEFAULT NULL COMMENT '未通过原因',
`audit_status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0:未审核,1:审核中,2:审核通过,3审核失败',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态0=未审核1=微信审核2=审核通过-1=审核未通过',
`is_show` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否显示',
`is_mer_show` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '商户是否显示',
`mark` varchar(512) DEFAULT NULL COMMENT '备注',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0',
`is_mer_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '商户是否删除',
PRIMARY KEY (`broadcast_goods_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE,
KEY `goods_id` (`goods_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='直播商品表';
-- ----------------------------
-- Table structure for eb_broadcast_room
-- ----------------------------
DROP TABLE IF EXISTS `eb_broadcast_room`;
CREATE TABLE `eb_broadcast_room` (
`broadcast_room_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`room_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '直播间 id',
`name` varchar(32) NOT NULL COMMENT '直播间名字',
`cover_img` varchar(255) NOT NULL COMMENT '背景图',
`share_img` varchar(255) NOT NULL COMMENT '分享图',
`start_time` timestamp NULL DEFAULT NULL COMMENT '直播计划开始时间',
`end_time` timestamp NULL DEFAULT NULL COMMENT '直播计划结束时间',
`anchor_name` varchar(32) NOT NULL COMMENT '主播昵称',
`anchor_wechat` varchar(32) NOT NULL COMMENT '主播微信号',
`phone` varchar(32) NOT NULL COMMENT '主播手机号',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '直播间类型 【1: 推流,0:手机直播】',
`screen_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '横屏、竖屏 【1:横屏,0:竖屏】',
`close_like` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭点赞',
`close_goods` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭货架',
`close_comment` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭评论',
`close_share` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭分享',
`close_kf` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭客服',
`error_msg` varchar(255) DEFAULT NULL COMMENT '未通过原因',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '审核状态0=未审核1=微信审核2=审核通过-1=审核未通过',
`live_status` smallint(5) unsigned NOT NULL DEFAULT '102' COMMENT '直播状态101:直播中,102:未开始,103已结束,104禁播,105:暂停,106:异常,107:已过期',
`mark` varchar(512) DEFAULT NULL COMMENT '备注',
`replay_status` tinyint(1) unsigned DEFAULT '0' COMMENT '回放状态',
`is_mer_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '商户是否显示',
`is_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否显示',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`is_mer_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '商户是否删除',
PRIMARY KEY (`broadcast_room_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='直播间表';
-- ----------------------------
-- Table structure for eb_broadcast_room_goods
-- ----------------------------
DROP TABLE IF EXISTS `eb_broadcast_room_goods`;
CREATE TABLE `eb_broadcast_room_goods` (
`broadcast_room_id` int(10) unsigned NOT NULL,
`broadcast_goods_id` int(10) unsigned NOT NULL,
KEY `broadcast_room_id` (`broadcast_room_id`,`broadcast_goods_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='直播间导入商品表';
-- ----------------------------
-- Table structure for eb_cache
-- ----------------------------
DROP TABLE IF EXISTS `eb_cache`;
CREATE TABLE `eb_cache` (
`key` varchar(32) NOT NULL,
`expire_time` int(11) NOT NULL DEFAULT '0' COMMENT '0=永久',
`result` text NOT NULL COMMENT '缓存数据',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '缓存时间',
PRIMARY KEY (`key`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信缓存表';
-- ----------------------------
-- Table structure for eb_excel
-- ----------------------------
DROP TABLE IF EXISTS `eb_excel`;
CREATE TABLE `eb_excel` (
`excel_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`name` varchar(255) DEFAULT NULL COMMENT '文件名',
`status` int(255) DEFAULT '0' COMMENT '0.默认,1.完成,2.失败',
`type` varchar(255) DEFAULT NULL COMMENT '类型',
`path` varchar(255) DEFAULT NULL COMMENT '文件路径',
`mer_id` int(11) DEFAULT '0' COMMENT '商户id',
`admin_id` int(11) DEFAULT NULL COMMENT '操作者id',
`is_del` int(11) DEFAULT '0' COMMENT '是否删除',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`excel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='导出文件记录表';
-- ----------------------------
-- Table structure for eb_express
-- ----------------------------
DROP TABLE IF EXISTS `eb_express`;
CREATE TABLE `eb_express` (
`id` mediumint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '快递公司id',
`code` varchar(50) NOT NULL COMMENT '快递公司简称',
`name` varchar(50) NOT NULL COMMENT '快递公司全称',
`sort` int(11) NOT NULL COMMENT '排序',
`is_show` tinyint(1) NOT NULL COMMENT '是否显示',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `code` (`code`) USING BTREE,
KEY `is_show` (`is_show`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=430 DEFAULT CHARSET=utf8 COMMENT='快递公司表';
-- ----------------------------
-- Table structure for eb_feedback
-- ----------------------------
DROP TABLE IF EXISTS `eb_feedback`;
CREATE TABLE `eb_feedback` (
`feedback_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`type` varchar(255) NOT NULL,
`content` varchar(512) NOT NULL,
`images` text COMMENT '反馈图片',
`realname` varchar(24) NOT NULL COMMENT '姓名',
`contact` varchar(32) NOT NULL COMMENT '联系方式',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` tinyint(1) DEFAULT '0' COMMENT '状态',
`reply` varchar(255) DEFAULT NULL COMMENT '回复,最终给用户的回复内容',
`remake` varchar(255) DEFAULT NULL COMMENT '备注,后台人员自己查看用',
`is_del` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`feedback_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户反馈表';
-- ----------------------------
-- Table structure for eb_feedback_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_feedback_category`;
CREATE TABLE `eb_feedback_category` (
`feedback_category_id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品分类表ID',
`pid` mediumint(11) NOT NULL COMMENT '父id',
`cate_name` varchar(100) NOT NULL COMMENT '分类名称',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
`sort` mediumint(11) NOT NULL COMMENT '排序',
`pic` varchar(128) NOT NULL DEFAULT '' COMMENT '图标',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
`level` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
`mer_id` int(11) unsigned DEFAULT '0' COMMENT '商户id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`feedback_category_id`) USING BTREE,
KEY `pid` (`pid`) USING BTREE,
KEY `sort` (`sort`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8 COMMENT='用户反馈分类表';
-- ----------------------------
-- Table structure for eb_financial_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_financial_record`;
CREATE TABLE `eb_financial_record` (
`financial_record_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`financial_record_sn` varchar(32) NOT NULL COMMENT '流水号',
`order_id` int(10) unsigned NOT NULL COMMENT '订单号',
`order_sn` varchar(32) NOT NULL COMMENT '订单编号',
`user_info` varchar(32) NOT NULL COMMENT '用户名',
`user_id` int(10) unsigned NOT NULL COMMENT '用户 id',
`financial_type` varchar(32) NOT NULL COMMENT '流水类型',
`financial_pm` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0 = 支出 1 = 获得',
`number` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`financial_record_id`),
KEY `mer_id` (`mer_id`),
KEY `financial_type` (`financial_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户财务流水';
-- ----------------------------
-- Table structure for eb_label_rule
-- ----------------------------
DROP TABLE IF EXISTS `eb_label_rule`;
CREATE TABLE `eb_label_rule` (
`label_rule_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`label_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '标签 id',
`type` tinyint(1) unsigned DEFAULT '0' COMMENT '0=订单数 1=订单金额',
`min` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最小值',
`max` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT ' 最大值',
`user_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户数',
`update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`label_rule_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='自定标签规则';
-- ----------------------------
-- Table structure for eb_merchant
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant`;
CREATE TABLE `eb_merchant` (
`mer_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商户id',
`category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户分类 id',
`mer_name` varchar(32) NOT NULL COMMENT '商户名称',
`real_name` varchar(32) NOT NULL COMMENT '商户姓名',
`mer_phone` varchar(13) NOT NULL COMMENT '商户手机号',
`mer_address` varchar(64) NOT NULL COMMENT '商户地址',
`mer_keyword` varchar(64) NOT NULL COMMENT '商户关键字',
`mer_avatar` varchar(128) DEFAULT NULL COMMENT '商户头像',
`mer_banner` varchar(128) DEFAULT NULL COMMENT '商户banner图片',
`sales` int(11) unsigned DEFAULT '0' COMMENT '销量',
`product_score` decimal(11,1) DEFAULT '5.0' COMMENT '商品描述评分',
`service_score` decimal(11,1) DEFAULT '5.0' COMMENT '服务评分',
`postage_score` decimal(11,1) DEFAULT '5.0' COMMENT '物流评分',
`mark` varchar(256) NOT NULL COMMENT '商户备注',
`reg_admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总后台管理员ID',
`sort` int(10) unsigned NOT NULL DEFAULT '0',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '商户是否禁用0锁定,1正常',
`commission_rate` decimal(11,4) DEFAULT NULL COMMENT '提成比例',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未删除1删除',
`is_audit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '添加的产品是否审核0不审核1审核',
`is_bro_room` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否审核直播间0不审核1审核',
`is_bro_goods` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否审核直播商品0不审核1审核',
`is_best` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否推荐',
`is_trader` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否自营',
`mer_state` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '商户是否1开启0关闭',
`mer_info` varchar(256) NOT NULL DEFAULT '' COMMENT '店铺简介',
`service_phone` varchar(13) NOT NULL DEFAULT '' COMMENT '店铺电话',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`care_count` int(11) unsigned DEFAULT '0' COMMENT '关注总数',
`copy_product_num` int(11) DEFAULT '0' COMMENT '剩余复制商品次数',
PRIMARY KEY (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8 COMMENT='商户表';
-- ----------------------------
-- Table structure for eb_merchant_admin
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_admin`;
CREATE TABLE `eb_merchant_admin` (
`merchant_admin_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '商户管理员表ID',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户ID(属于哪一个商户)',
`account` varchar(32) NOT NULL COMMENT '商户管理员账号',
`pwd` char(64) NOT NULL COMMENT '商户管理员密码',
`real_name` varchar(16) NOT NULL COMMENT '商户管理员姓名',
`phone` varchar(13) DEFAULT NULL COMMENT '商户管理员手机号',
`last_ip` varchar(16) DEFAULT NULL COMMENT '商户管理员最后一次登录IP地址',
`last_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '商户管理员最后一次登录时间',
`roles` varchar(128) DEFAULT '',
`login_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户管理员登录次数',
`level` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '商户管理员等级(管理员添加的为0, 商户添加的为1)',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否有效 1有效 0无效 ',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '商户管理员添加时间',
PRIMARY KEY (`merchant_admin_id`) USING BTREE,
KEY `account` (`account`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8 COMMENT='商户管理员表';
-- ----------------------------
-- Table structure for eb_merchant_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_category`;
CREATE TABLE `eb_merchant_category` (
`merchant_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商户分类 id',
`commission_rate` decimal(6,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '手续费',
`category_name` varchar(32) NOT NULL COMMENT '商户分类名称',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`merchant_category_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COMMENT='商户分类表';
-- ----------------------------
-- Table structure for eb_merchant_intention
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_intention`;
CREATE TABLE `eb_merchant_intention` (
`mer_intention_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`uid` int(11) DEFAULT NULL COMMENT '用户ID',
`phone` varchar(11) DEFAULT NULL COMMENT '手机号',
`mer_name` varchar(30) DEFAULT NULL COMMENT '商户名称',
`name` varchar(30) DEFAULT NULL COMMENT '客户姓名',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP,
`status` tinyint(2) DEFAULT '0' COMMENT '处理状态 1通过 ,2拒绝',
`is_del` tinyint(2) DEFAULT '0' COMMENT '删除状态 1删除 ,0未删除',
`mark` varchar(255) DEFAULT NULL,
`mer_id` int(11) DEFAULT NULL COMMENT '关联商户',
`images` varchar(2000) DEFAULT NULL COMMENT '多图',
`merchant_category_id` int(11) DEFAULT NULL COMMENT '商户分类',
PRIMARY KEY (`mer_intention_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户申请表';
-- ----------------------------
-- Table structure for eb_merchant_reconciliation
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_reconciliation`;
CREATE TABLE `eb_merchant_reconciliation` (
`reconciliation_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '对账id',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户id',
`admin_id` int(10) unsigned NOT NULL COMMENT '后台管理员id',
`mer_admin_id` int(10) unsigned NOT NULL COMMENT '商户管理员id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '对账时间',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '对账状态0等待对账1取消对账2确定对账',
`price` decimal(10,2) NOT NULL COMMENT '对账总金额',
`order_price` decimal(10,2) unsigned DEFAULT NULL COMMENT '订单金额',
`order_extension` decimal(10,2) NOT NULL COMMENT '订单佣金',
`order_rate` decimal(10,2) DEFAULT NULL COMMENT '订单手续费',
`refund_price` decimal(10,2) NOT NULL COMMENT '退款单金额',
`refund_extension` decimal(10,2) NOT NULL COMMENT '退款单佣金',
`refund_rate` decimal(10,2) DEFAULT NULL,
`bank` varchar(128) DEFAULT NULL COMMENT '银行卡开户行',
`bank_number` varchar(20) DEFAULT NULL COMMENT '银行卡卡号',
`bank_name` varchar(64) DEFAULT NULL COMMENT '银行卡持卡人姓名',
`bank_address` varchar(256) DEFAULT NULL COMMENT '银行卡开户行地址',
`mark` varchar(255) DEFAULT NULL COMMENT '备注',
`admin_mark` varchar(255) DEFAULT NULL COMMENT '管理员备注',
`is_accounts` tinyint(1) unsigned NOT NULL COMMENT '转账状态0未转账1已转账',
`order_ids` varchar(255) DEFAULT NULL COMMENT '已对账的订单id',
`accounts_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`reconciliation_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商户对账记录表';
-- ----------------------------
-- Table structure for eb_merchant_reconciliation_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_reconciliation_order`;
CREATE TABLE `eb_merchant_reconciliation_order` (
`reconciliation_id` int(11) DEFAULT NULL COMMENT '对账单id',
`order_id` int(11) DEFAULT NULL COMMENT '订单id',
`type` tinyint(1) DEFAULT NULL COMMENT '0.订单 , 1 . 退款订单'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='对账单中间表';
-- ----------------------------
-- Table structure for eb_presell_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_presell_order`;
CREATE TABLE `eb_presell_order` (
`presell_order_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '预售尾款订单id',
`presell_order_sn` varchar(32) NOT NULL COMMENT '预售订单号',
`uid` int(10) unsigned NOT NULL COMMENT '用户 id',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`order_id` int(10) unsigned NOT NULL COMMENT '订单id',
`final_start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '支付开始时间',
`final_end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '尾款支付结时间',
`paid` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0:未支付 1:已支付',
`status` tinyint(1) unsigned DEFAULT '1' COMMENT '0:无效 1:有效',
`pay_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '支付方式 0余额 1微信 2小程序 3,4支付宝',
`pay_price` decimal(8,2) unsigned NOT NULL COMMENT '尾款',
`refun_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`presell_order_id`) USING BTREE,
UNIQUE KEY `order_id` (`order_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预售尾款订单表';
-- ----------------------------
-- Table structure for eb_routine_qrcode
-- ----------------------------
DROP TABLE IF EXISTS `eb_routine_qrcode`;
CREATE TABLE `eb_routine_qrcode` (
`routine_qrcode_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信二维码ID',
`third_type` varchar(32) NOT NULL COMMENT '二维码类型 spread(用户推广) product_spread(商品推广)',
`third_id` int(11) unsigned NOT NULL COMMENT '用户id',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态 0不可用 1可用',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`page` varchar(255) DEFAULT NULL COMMENT '小程序页面路径带参数',
`qrcode_url` varchar(255) DEFAULT NULL COMMENT '小程序二维码路径',
`url_time` timestamp NULL DEFAULT NULL COMMENT '二维码添加时间',
PRIMARY KEY (`routine_qrcode_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='小程序二维码管理表';
-- ----------------------------
-- Table structure for eb_shipping_template
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_template`;
CREATE TABLE `eb_shipping_template` (
`shipping_template_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` varchar(255) NOT NULL COMMENT '模板名称',
`type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '计费方式 0=数量 1=重量 2=体积',
`appoint` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '开启指定包邮',
`undelivery` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '开启指定区域不配送',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`is_default` tinyint(1) unsigned DEFAULT '0' COMMENT '默认模板',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`shipping_template_id`) USING BTREE,
KEY `mer_id` (`mer_id`,`sort`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=106 DEFAULT CHARSET=utf8 COMMENT='运费表';
-- ----------------------------
-- Table structure for eb_shipping_template_free
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_template_free`;
CREATE TABLE `eb_shipping_template_free` (
`shipping_template_free_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`temp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '模板ID',
`city_id` text NOT NULL COMMENT '城市ID /id/id/id/id/',
`number` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '包邮件数',
`price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '包邮金额',
PRIMARY KEY (`shipping_template_free_id`) USING BTREE,
KEY `temp_id` (`temp_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8 COMMENT='指定包邮信息表';
-- ----------------------------
-- Table structure for eb_shipping_template_region
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_template_region`;
CREATE TABLE `eb_shipping_template_region` (
`shipping_template_region_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`temp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '模板ID',
`city_id` text NOT NULL COMMENT '城市ID /id/id/id/',
`first` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '首件',
`first_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '首件运费',
`continue` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '续件',
`continue_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '续件运费',
PRIMARY KEY (`shipping_template_region_id`) USING BTREE,
KEY `temp_id` (`temp_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=403 DEFAULT CHARSET=utf8 COMMENT='配送区域表';
-- ----------------------------
-- Table structure for eb_shipping_template_undelivery
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_template_undelivery`;
CREATE TABLE `eb_shipping_template_undelivery` (
`shipping_template_undelivery_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '编号',
`temp_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '模板ID',
`city_id` text NOT NULL COMMENT '城市ID /id/id/id/',
PRIMARY KEY (`shipping_template_undelivery_id`) USING BTREE,
KEY `temp_id` (`temp_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COMMENT='指定不配送区域表';
-- ----------------------------
-- Table structure for eb_sms_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_sms_record`;
CREATE TABLE `eb_sms_record` (
`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 NOT NULL COMMENT '短信内容',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发送短信时间',
`ip` varchar(16) NOT NULL DEFAULT '' COMMENT '添加记录ip',
`template` varchar(255) NOT NULL COMMENT '短信模板ID',
`resultcode` int(6) unsigned DEFAULT NULL COMMENT '状态码 100=成功,130=失败,131=空号,132=停机,133=关机,134=无状态',
`record_id` int(11) unsigned NOT NULL COMMENT '发送记录id',
PRIMARY KEY (`sms_record_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短信发送记录表';
-- ----------------------------
-- Table structure for eb_store_attr_template
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_attr_template`;
CREATE TABLE `eb_store_attr_template` (
`attr_template_id` int(10) NOT NULL AUTO_INCREMENT,
`template_name` varchar(32) NOT NULL COMMENT '规格名称',
`template_value` text NOT NULL COMMENT '规格值',
`mer_id` int(11) NOT NULL COMMENT '商户 id',
PRIMARY KEY (`attr_template_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='商品规则模板表';
-- ----------------------------
-- Table structure for eb_store_brand
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_brand`;
CREATE TABLE `eb_store_brand` (
`brand_id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品品牌表ID',
`brand_category_id` mediumint(11) NOT NULL COMMENT '父id',
`brand_name` varchar(100) NOT NULL COMMENT '品牌名称',
`sort` mediumint(11) NOT NULL COMMENT '排序',
`pic` varchar(128) NOT NULL DEFAULT '' COMMENT '图标',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`brand_id`) USING BTREE,
KEY `pid` (`brand_category_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=utf8 COMMENT='商品品牌表';
-- ----------------------------
-- Table structure for eb_store_brand_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_brand_category`;
CREATE TABLE `eb_store_brand_category` (
`store_brand_category_id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '品牌分类表ID',
`pid` mediumint(11) NOT NULL COMMENT '父id',
`cate_name` varchar(100) NOT NULL COMMENT '分类名称',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
`sort` mediumint(11) NOT NULL COMMENT '排序',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
`level` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`store_brand_category_id`) USING BTREE,
KEY `pid` (`pid`) USING BTREE,
KEY `sort` (`sort`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=158 DEFAULT CHARSET=utf8 COMMENT='品牌分类表';
-- ----------------------------
-- Table structure for eb_store_cart
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_cart`;
CREATE TABLE `eb_store_cart` (
`cart_id` bigint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '购物车表ID',
`uid` int(10) unsigned NOT NULL COMMENT '用户ID',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`product_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '类型 0=普通产品,2.预售商品',
`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 '商品数量',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`source` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '来源 1.直播间,2.预售商品,3.助力商品',
`source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '来源关联 id',
`is_pay` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = 未购买 1 = 已购买',
`is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除',
`is_new` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为立即购买',
`is_fail` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否失效',
PRIMARY KEY (`cart_id`) USING BTREE,
KEY `user_id` (`uid`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='购物车表';
-- ----------------------------
-- Table structure for eb_store_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_category`;
CREATE TABLE `eb_store_category` (
`store_category_id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品分类表ID',
`pid` mediumint(11) NOT NULL COMMENT '父id',
`cate_name` varchar(100) NOT NULL COMMENT '分类名称',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径',
`sort` mediumint(11) NOT NULL COMMENT '排序',
`pic` varchar(128) NOT NULL DEFAULT '' COMMENT '图标',
`is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示',
`level` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '等级',
`mer_id` int(11) unsigned DEFAULT '0' COMMENT '商户id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`store_category_id`) USING BTREE,
KEY `pid` (`pid`) USING BTREE,
KEY `sort` (`sort`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=301 DEFAULT CHARSET=utf8 COMMENT='商品分类表';
-- ----------------------------
-- Table structure for eb_store_coupon
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon`;
CREATE TABLE `eb_store_coupon` (
`coupon_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券表ID',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`is_timeout` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否限时',
`start_time` timestamp NULL DEFAULT NULL COMMENT '优惠券领取开启时间',
`end_time` timestamp NULL DEFAULT NULL COMMENT '优惠券领取结束时间',
`is_limited` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否限量',
`total_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券领取数量',
`remain_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券剩余领取数量',
`send_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0=领取 1=消费满赠 2=新人 3=买增',
`full_reduction` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '消费满多少赠送优惠券',
`title` varchar(64) NOT NULL COMMENT '优惠券名称',
`coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券面值',
`use_min_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费多少金额可用优惠券',
`coupon_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券类型 0=有效天数 1=固定时间段',
`coupon_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券有效期限(单位:天)',
`use_start_time` timestamp NULL DEFAULT NULL COMMENT '开始时间',
`use_end_time` timestamp NULL DEFAULT NULL COMMENT '到期时间',
`sort` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '排序',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态(0:关闭,1:开启 -1: 失效)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '优惠券类型 0-店铺 1-商品券',
PRIMARY KEY (`coupon_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='优惠券表';
-- ----------------------------
-- Table structure for eb_store_coupon_issue_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon_issue_user`;
CREATE TABLE `eb_store_coupon_issue_user` (
`uid` int(10) NOT NULL DEFAULT '0' COMMENT '领取优惠券用户ID',
`coupon_id` int(10) NOT NULL DEFAULT '0' COMMENT '优惠券ID',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '领取时间',
KEY `uid` (`uid`,`coupon_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券前台用户领取记录表';
-- ----------------------------
-- Table structure for eb_store_coupon_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon_product`;
CREATE TABLE `eb_store_coupon_product` (
`product_id` int(11) NOT NULL DEFAULT '0' COMMENT '产品id',
`coupon_id` int(11) NOT NULL DEFAULT '0' COMMENT '优惠卷id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠卷关联商品辅助表';
-- ----------------------------
-- Table structure for eb_store_coupon_send
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon_send`;
CREATE TABLE `eb_store_coupon_send` (
`coupon_send_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`coupon_id` int(10) unsigned NOT NULL COMMENT '优惠券 id',
`coupon_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发送数量',
`mark` varchar(512) NOT NULL COMMENT '发送群体',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:发送中 1:全部发送',
PRIMARY KEY (`coupon_send_id`),
KEY `mer_id` (`mer_id`),
KEY `coupon_id` (`coupon_id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='优惠券发送记录';
-- ----------------------------
-- Table structure for eb_store_coupon_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon_user`;
CREATE TABLE `eb_store_coupon_user` (
`coupon_user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '优惠券发放记录id',
`coupon_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '兑换的项目id',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`uid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券所属用户',
`coupon_title` varchar(32) NOT NULL COMMENT '优惠券名称',
`coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券的面值',
`use_min_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费多少金额可用优惠券',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '优惠券创建时间',
`start_time` timestamp NULL DEFAULT NULL COMMENT '优惠券开启时间',
`end_time` timestamp NULL DEFAULT NULL COMMENT '优惠券结束时间',
`use_time` timestamp NULL DEFAULT NULL COMMENT '使用时间',
`type` varchar(16) NOT NULL DEFAULT 'send' COMMENT '获取方式(receive:自己领取 send:后台发送 give:满赠 new:新人 buy:买赠送)',
`send_id` int(10) unsigned DEFAULT '0' COMMENT '批量发送 id',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态(0:未使用,1:已使用, 2:已过期)',
`is_fail` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否有效',
PRIMARY KEY (`coupon_user_id`) USING BTREE,
KEY `coupon_id` (`coupon_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `type` (`type`,`send_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券发放记录表';
-- ----------------------------
-- Table structure for eb_store_group_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_group_order`;
CREATE TABLE `eb_store_group_order` (
`group_order_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`group_order_sn` varchar(32) NOT NULL COMMENT '订单号',
`uid` int(10) unsigned NOT NULL COMMENT '用户 ID',
`total_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费',
`total_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总额',
`total_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品数',
`coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠金额',
`real_name` varchar(32) NOT NULL COMMENT '联系人',
`user_phone` varchar(18) NOT NULL COMMENT '联系电话',
`user_address` varchar(128) NOT NULL COMMENT '收货地址',
`pay_price` decimal(8,2) unsigned NOT NULL COMMENT '支付金额',
`pay_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付邮费',
`cost` decimal(8,2) unsigned NOT NULL COMMENT '成本价',
`give_coupon_ids` varchar(500) DEFAULT '' COMMENT '赠送优惠券',
`paid` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否支付',
`pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint(1) NOT NULL COMMENT '支付方式 0=余额 1=微信 2=小程序 3=h5',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`is_remind` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否提醒',
`is_del` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`group_order_id`) USING BTREE,
UNIQUE KEY `group_order_id` (`group_order_sn`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `paid` (`paid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户订单表';
-- ----------------------------
-- Table structure for eb_store_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order`;
CREATE TABLE `eb_store_order` (
`order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`group_order_id` int(11) DEFAULT NULL COMMENT '订单组 id',
`order_sn` 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(128) NOT NULL COMMENT '详细地址',
`cart_id` varchar(256) NOT NULL COMMENT '购物车id',
`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 '支付邮费',
`extension_one` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金',
`extension_two` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金',
`commission_rate` decimal(6,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '平台手续费',
`coupon_id` varchar(128) NOT NULL DEFAULT '' COMMENT '优惠券id',
`coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券金额',
`order_type` tinyint(1) unsigned DEFAULT '0' COMMENT '0普通1自提',
`paid` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态',
`pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
`pay_type` tinyint(1) NOT NULL COMMENT '支付方式 0余额 1微信 2小程序',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态(0:待发货;1:待收货;2:待评价;3:已完成;-1:已退款)',
`delivery_type` varchar(32) DEFAULT NULL COMMENT '发货类型(1:发货 2: 送货 3: 虚拟)',
`delivery_name` varchar(64) DEFAULT NULL COMMENT '快递名称/送货人姓名',
`delivery_id` varchar(64) DEFAULT NULL COMMENT '快递单号/手机号',
`mark` varchar(512) NOT NULL COMMENT '备注',
`remark` varchar(512) DEFAULT NULL COMMENT '管理员备注',
`admin_mark` varchar(512) DEFAULT NULL COMMENT '总后台备注',
`verify_code` char(16) DEFAULT NULL COMMENT '核销码',
`verify_time` timestamp NULL DEFAULT NULL COMMENT '核销时间',
`verify_service_id` int(10) unsigned DEFAULT '0' COMMENT '核销客服 id',
`activity_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1:秒杀 2:预售 3:助力',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户ID',
`reconciliation_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '对账id',
`cost` decimal(8,2) unsigned NOT NULL COMMENT '成本价',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`is_system_del` tinyint(1) DEFAULT '0' COMMENT '后台是否删除',
PRIMARY KEY (`order_id`) USING BTREE,
UNIQUE KEY `order_id_2` (`order_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE,
KEY `verify_code` (`verify_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单表';
-- ----------------------------
-- Table structure for eb_store_order_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_product`;
CREATE TABLE `eb_store_order_product` (
`order_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单产品 id',
`order_id` int(11) unsigned NOT NULL COMMENT '订单id',
`uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户 id',
`cart_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '购物车id',
`product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`extension_one` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金',
`extension_two` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金',
`product_sku` char(12) NOT NULL COMMENT '商品 sku',
`is_refund` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否退款 0:未退款 1:退款中 2:部分退款 3=全退',
`product_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '购买数量',
`product_type` int(11) NOT NULL DEFAULT '0' COMMENT '0.普通商品 1.秒杀商品,2.预售商品',
`activity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '活动关联 id',
`refund_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '可申请退货数量',
`is_reply` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否评价',
`product_price` decimal(10,2) unsigned NOT NULL COMMENT '商品金额',
`cart_info` text NOT NULL COMMENT '购买东西的详细信息',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`order_product_id`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE,
KEY `oid` (`order_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单购物详情表';
-- ----------------------------
-- Table structure for eb_store_order_receipt
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_receipt`;
CREATE TABLE `eb_store_order_receipt` (
`order_receipt_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`order_id` varchar(255) NOT NULL DEFAULT '0' COMMENT '订单ID',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`receipt_info` varchar(500) DEFAULT '' COMMENT '发票类型:1.普通发票,2.增值税发票',
`status` tinyint(2) DEFAULT '0' COMMENT '开票状态:1.已出票,10.已寄出',
`receipt_sn` varchar(255) DEFAULT '' COMMENT '发票单号',
`receipt_no` varchar(255) DEFAULT NULL COMMENT '发票编号',
`delivery_info` varchar(255) DEFAULT NULL COMMENT '收票联系信息',
`mark` varchar(255) DEFAULT NULL COMMENT '用户备注',
`receipt_price` decimal(10,2) DEFAULT NULL COMMENT '开票金额',
`order_price` decimal(10,2) DEFAULT NULL COMMENT '订单金额',
`status_time` datetime NOT NULL COMMENT '状态变更时间',
`is_del` tinyint(1) DEFAULT '0',
`create_time` timestamp NULL DEFAULT NULL,
`mer_id` int(11) DEFAULT '0',
`mer_mark` varchar(255) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`order_receipt_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单发票信息';
-- ----------------------------
-- Table structure for eb_store_order_status
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_status`;
CREATE TABLE `eb_store_order_status` (
`order_id` int(10) unsigned NOT NULL COMMENT '订单id',
`change_type` varchar(32) NOT NULL COMMENT '操作类型',
`change_message` varchar(256) NOT NULL COMMENT '操作备注',
`change_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
KEY `order_id` (`order_id`) USING BTREE,
KEY `change_type` (`change_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单操作记录表';
-- ----------------------------
-- Table structure for eb_store_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product`;
CREATE TABLE `eb_store_product` (
`product_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品id',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户Id',
`store_name` varchar(128) NOT NULL COMMENT '商品名称',
`store_info` varchar(256) NOT NULL COMMENT '商品简介',
`keyword` varchar(128) NOT NULL COMMENT '关键字',
`bar_code` varchar(15) NOT NULL DEFAULT '' COMMENT '产品条码(一维码)',
`brand_id` int(11) DEFAULT NULL COMMENT '品牌 id',
`is_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '商户 状态(0:未上架,1:上架)',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '管理员 状态(0:审核中,1:审核通过 -1: 未通过 -2: 下架)',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`mer_status` tinyint(1) DEFAULT '1' COMMENT '商铺状态是否 1.正常 0. 非正常',
`cate_id` int(11) NOT NULL COMMENT '分类id',
`unit_name` varchar(16) NOT NULL COMMENT '单位名',
`sort` smallint(11) NOT NULL DEFAULT '0' COMMENT '排序',
`rank` smallint(11) NOT NULL DEFAULT '0' COMMENT '总后台排序',
`sales` mediumint(11) unsigned NOT NULL DEFAULT '0' COMMENT '销量',
`price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '最低价格',
`cost` decimal(10,2) DEFAULT '0.00' COMMENT '成本价',
`ot_price` decimal(10,2) DEFAULT '0.00' COMMENT '原价',
`stock` int(11) unsigned DEFAULT '0' COMMENT '总库存',
`is_hot` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否热卖',
`is_benefit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '促销单品',
`is_best` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否精品',
`is_new` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否新品',
`is_good` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否优品推荐',
`product_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0.普通商品 1.秒杀商品,2.预售商品,3.助力商品',
`ficti` mediumint(11) DEFAULT '0' COMMENT '虚拟销量',
`browse` int(11) DEFAULT '0' COMMENT '浏览量',
`code_path` varchar(64) NOT NULL DEFAULT '' COMMENT '产品二维码地址(用户小程序海报)',
`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多',
`extension_type` tinyint(1) DEFAULT '0' COMMENT '佣金比例 0.系统,1.自定义',
`refusal` varchar(255) DEFAULT NULL COMMENT '审核拒绝理由',
`rate` decimal(2,1) DEFAULT '5.0' COMMENT '评价分数',
`reply_count` int(11) unsigned DEFAULT '0' COMMENT '评论数',
`give_coupon_ids` varchar(500) DEFAULT NULL COMMENT '赠送优惠券',
`is_gift_bag` tinyint(1) DEFAULT '0' COMMENT '是否为礼包',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`care_count` int(11) NOT NULL DEFAULT '0' COMMENT '收藏数',
`is_used` int(1) DEFAULT '1' COMMENT '显示/隐藏',
`old_product_id` int(11) DEFAULT '0' COMMENT '原商品ID',
`image` varchar(256) NOT NULL COMMENT '商品图片',
`slider_image` varchar(2000) NOT NULL COMMENT '轮播图',
PRIMARY KEY (`product_id`) USING BTREE,
KEY `cate_id` (`cate_id`) USING BTREE,
KEY `sort` (`sort`) USING BTREE,
KEY `sales` (`sales`) USING BTREE,
KEY `create_time` (`create_time`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=203 DEFAULT CHARSET=utf8 COMMENT='商品表';
-- ----------------------------
-- Table structure for eb_store_product_assist
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_assist`;
CREATE TABLE `eb_store_product_assist` (
`product_assist_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '开始时间',
`end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '结束时间',
`status` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '平台控制状态:1开启,0.结束',
`pay_count` int(11) unsigned DEFAULT '0' COMMENT '限购数量,0为不限制',
`assist_count` int(11) unsigned DEFAULT '0' COMMENT '助力总需人数',
`assist_user_count` int(11) unsigned DEFAULT '0' COMMENT '单人可助力次数',
`product_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`is_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '商户控制状态 0.下架;1.上架',
`store_name` varchar(128) NOT NULL COMMENT '商品活动标题',
`mer_id` int(11) unsigned NOT NULL DEFAULT '0',
`store_info` varchar(255) DEFAULT NULL COMMENT '商品简介',
`is_del` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refusal` varchar(255) DEFAULT NULL,
`action_status` int(11) DEFAULT '1' COMMENT '活动状态1开启,-1 结束',
`product_status` int(11) DEFAULT '0',
PRIMARY KEY (`product_assist_id`) USING BTREE,
KEY `start_time` (`start_time`,`end_time`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品助力活动表';
-- ----------------------------
-- Table structure for eb_store_product_assist_set
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_assist_set`;
CREATE TABLE `eb_store_product_assist_set` (
`product_assist_set_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`product_assist_id` int(11) unsigned NOT NULL DEFAULT '0',
`product_id` int(11) unsigned NOT NULL,
`uid` int(11) unsigned NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1' COMMENT '状态:-1 未完成 ,1 进行中, 10 已完成,20.已支付',
`assist_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '需助力总人数',
`assist_user_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '单人可助力次数',
`yet_assist_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '已助力人数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '时间',
`mer_id` int(11) unsigned DEFAULT '0',
`share_num` int(11) unsigned DEFAULT '0',
`view_num` int(11) unsigned DEFAULT '0',
`is_del` int(11) unsigned DEFAULT '0',
PRIMARY KEY (`product_assist_set_id`) USING BTREE,
KEY `product_assist_id` (`product_assist_id`,`product_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='助力发起列表';
-- ----------------------------
-- Table structure for eb_store_product_assist_sku
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_assist_sku`;
CREATE TABLE `eb_store_product_assist_sku` (
`product_assist_id` int(11) unsigned NOT NULL DEFAULT '0',
`product_id` int(11) unsigned NOT NULL,
`unique` char(12) NOT NULL,
`assist_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '助力售价',
`stock` int(11) unsigned NOT NULL DEFAULT '0',
`stock_count` int(11) unsigned DEFAULT '0' COMMENT '总限购',
KEY `product_assist_id` (`product_assist_id`,`product_id`) USING BTREE,
KEY `unique` (`unique`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='助力商品 sku表';
-- ----------------------------
-- Table structure for eb_store_product_assist_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_assist_user`;
CREATE TABLE `eb_store_product_assist_user` (
`product_assist_user_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`product_assist_set_id` int(11) unsigned NOT NULL,
`product_assist_id` int(11) unsigned NOT NULL,
`uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'id',
`avatar_img` varchar(256) DEFAULT NULL COMMENT '头像',
`nickname` varchar(50) DEFAULT NULL COMMENT '昵称',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`product_assist_user_id`) USING BTREE,
KEY `uid` (`uid`,`product_assist_set_id`) USING BTREE,
KEY `product_assist_id` (`product_assist_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='助力记录表';
-- ----------------------------
-- Table structure for eb_store_product_attr
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr`;
CREATE TABLE `eb_store_product_attr` (
`product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`attr_name` varchar(32) NOT NULL COMMENT '属性名',
`attr_values` varchar(2000) NOT NULL COMMENT '属性值',
`type` tinyint(1) DEFAULT '0' COMMENT '活动类型 0=商品',
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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` (
`product_id` int(10) unsigned NOT NULL COMMENT '商品ID',
`detail` varchar(1000) NOT NULL DEFAULT '',
`sku` 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 '销量',
`image` varchar(128) DEFAULT NULL COMMENT '图片',
`bar_code` varchar(50) NOT NULL DEFAULT '' COMMENT '产品条码',
`cost` decimal(8,2) unsigned NOT NULL COMMENT '成本价',
`ot_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '原价',
`price` decimal(8,2) unsigned NOT NULL COMMENT '价格',
`volume` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '体积',
`weight` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '重量',
`type` tinyint(1) DEFAULT '0' COMMENT '活动类型 0=商品',
`extension_one` decimal(8,2) DEFAULT '0.00' COMMENT '一级佣金',
`extension_two` decimal(8,2) DEFAULT '0.00' COMMENT '二级佣金',
`unique` char(12) NOT NULL DEFAULT '' COMMENT '唯一值',
KEY `store_id` (`product_id`,`sku`) USING BTREE,
KEY `unique` (`unique`,`sku`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品属性值表';
-- ----------------------------
-- Table structure for eb_store_product_cate
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_cate`;
CREATE TABLE `eb_store_product_cate` (
`product_id` int(11) DEFAULT NULL,
`mer_cate_id` int(11) DEFAULT NULL,
`mer_id` int(11) DEFAULT NULL,
KEY `mer_id` (`mer_id`,`mer_cate_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品商户分类关联表';
-- ----------------------------
-- Table structure for eb_store_product_content
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_content`;
CREATE TABLE `eb_store_product_content` (
`product_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品id',
`content` longtext NOT NULL COMMENT '商品详情',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '商品类型 0=普通',
PRIMARY KEY (`product_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=203 DEFAULT CHARSET=utf8 COMMENT='商品详情表';
-- ----------------------------
-- Table structure for eb_store_product_copy
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_copy`;
CREATE TABLE `eb_store_product_copy` (
`store_product_copy_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(255) DEFAULT NULL COMMENT '''taobao'', ''tmall'', ''jd'', ''pinduoduo'', ''suning'', ''yangkeduo''\n',
`mer_id` int(11) DEFAULT NULL COMMENT '商户id',
`num` int(11) DEFAULT NULL COMMENT '数量',
`copy_product_num` int(11) DEFAULT NULL COMMENT '剩余次数',
`message` varchar(255) DEFAULT NULL,
`url` varchar(255) DEFAULT NULL COMMENT '复制链接',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`store_product_copy_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品复制记录表';
-- ----------------------------
-- Table structure for eb_store_product_presell
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_presell`;
CREATE TABLE `eb_store_product_presell` (
`product_presell_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`start_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '预售开始时间',
`end_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '预售结束时间',
`final_start_time` varchar(30) DEFAULT '' COMMENT '尾款支付开始时间',
`final_end_time` varchar(30) DEFAULT '' COMMENT '尾款支付结时间',
`status` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '平台控制状态:1开启,0.结束',
`presell_type` int(1) unsigned NOT NULL DEFAULT '0' COMMENT '预售类型:1.全款预售,2.定金预售',
`pay_count` int(11) unsigned DEFAULT '0' COMMENT '限购数量,0为不限制',
`delivery_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '发货类型:1.支付成功后 ; 2. 预售结束后',
`delivery_day` int(11) unsigned DEFAULT '0' COMMENT '发货时间',
`product_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '预售最低价',
`is_show` tinyint(1) unsigned DEFAULT NULL COMMENT '商户控制状态 0.下架;1.上架',
`store_name` varchar(128) NOT NULL COMMENT '商品活动标题',
`mer_id` int(11) unsigned NOT NULL DEFAULT '0',
`store_info` varchar(255) DEFAULT NULL COMMENT '商品简介',
`is_del` int(11) unsigned NOT NULL DEFAULT '0',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`refusal` varchar(255) DEFAULT NULL,
`action_status` int(11) DEFAULT '1' COMMENT '活动状态1开启,-1 结束',
`product_status` int(11) DEFAULT '0',
PRIMARY KEY (`product_presell_id`) USING BTREE,
KEY `start_time` (`start_time`,`end_time`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品预售活动表';
-- ----------------------------
-- Table structure for eb_store_product_presell_sku
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_presell_sku`;
CREATE TABLE `eb_store_product_presell_sku` (
`product_presell_id` int(11) unsigned NOT NULL DEFAULT '0',
`product_id` int(11) unsigned NOT NULL,
`unique` char(12) NOT NULL,
`presell_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '预售价',
`stock` int(11) unsigned NOT NULL DEFAULT '0',
`stock_count` int(11) NOT NULL DEFAULT '0' COMMENT '总限购',
`down_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '订金',
`final_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '尾款金额',
`one_take` int(11) unsigned DEFAULT '0' COMMENT '第一阶段参与人数',
`one_pay` int(11) unsigned DEFAULT '0' COMMENT '第一阶段支付人数',
`two_pay` int(11) unsigned DEFAULT '0' COMMENT '第二阶段支付人数',
`seles` int(11) unsigned DEFAULT '0' COMMENT '销量',
KEY `product_presell_id` (`product_presell_id`,`product_id`) USING BTREE,
KEY `unique` (`unique`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_store_product_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_reply`;
CREATE TABLE `eb_store_product_reply` (
`reply_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '评论ID',
`uid` int(11) NOT NULL COMMENT '用户ID',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`order_product_id` int(11) NOT NULL COMMENT '订单商品ID',
`unique` char(12) DEFAULT NULL COMMENT '商品 sku',
`product_id` int(11) NOT NULL COMMENT '商品id',
`product_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=普通商品',
`product_score` tinyint(1) NOT NULL COMMENT '商品分数',
`service_score` tinyint(1) NOT NULL COMMENT '服务分数',
`postage_score` tinyint(1) NOT NULL COMMENT '物流分数',
`rate` float(2,1) DEFAULT '5.0' COMMENT '平均值',
`comment` varchar(512) NOT NULL COMMENT '评论内容',
`pics` text NOT NULL COMMENT '评论图片',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '评论时间',
`merchant_reply_content` varchar(300) DEFAULT NULL COMMENT '管理员回复内容',
`merchant_reply_time` timestamp NULL 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已回复',
`is_virtual` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0不是虚拟评价1是虚拟评价',
`nickname` varchar(64) NOT NULL COMMENT '用户名称',
`avatar` varchar(255) NOT NULL COMMENT '用户头像',
PRIMARY KEY (`reply_id`) USING BTREE,
UNIQUE KEY `order_id` (`order_product_id`,`unique`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `product_id` (`product_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品评论表';
-- ----------------------------
-- Table structure for eb_store_refund_order
-- ----------------------------
DR
~~~
- 商品分类
- 分类说明
- 分类管理
- 品牌分类
- 商品管理
- 发布商品
- 商品规格
- 配置说明
- 文件上传
- 移动端展示说明
- 首页
- 分类页
- 个人中心
- 热门搜索
- 分销规则
- 分销配置
- 分销员管理
- 分销规则说明
- 分销礼包
- 用户管理
- 商户用户列表
- 平台用户管理
- 用户协议
- 用户搜索记录
- 秒杀
- 秒杀规则
- 开启秒杀活动
- 直播
- 主播实名认证
- 开启直播
- 添加直播商品
- 预售
- 开启全款预售
- 开启定金预售
- 预售协议
- 助力
- 开启助力
- 查看助力活动
- 拼团
- 虚拟拼团设置
- 开启拼团
- 查看拼团活动
- 提现
- 提现规则
- 提现步骤
- 新闻资讯
- 新闻页面
- 发布资讯
- 账户管理
- 账户信息
- 账户资金
- 优惠卷
- 添加优惠券
- 发布优惠券
- 领取及使用
- 发放优惠券
- 订单管理
- 后台订单处理
- 前端订单处理
- 订单退款
- 打印订单
- 客服管理
- 添加客服
- 客服权限
- 门店自提
- 开启门店自提
- 设置核销权限
- 后台订单核销
- 商户管理
- 商户分类
- 商户入驻
- 商户列表
- 商户菜单管理
- 店铺类型
- 财务
- 财务对账
- 开启发票
- 邮费说明
- 运费设置
- 邮费组成
- 运费模板
- 物流配置
- 短信设置
- 短信账户
- 短信配置
- 短信模板
- 公告管理
- 店铺管理
- 店铺定位设置
- 店铺街入口
- 店铺活动
- 店铺基本信息设置
- 小票打印
- 小票打印机配置
- 小票打印机设置
- 付费采集商品配置
- 技术文档
- 开发规范
- 数据字典
- 目录结构
- 移动端路由
- 系统配置
- 后台表单说明
- PC端展示说明
- PC端开启
- PC端平台页面配置
- PC端店铺页面配置
- 保障服务
