```[sql]
-- ----------------------------
-- Table structure for eb_article
-- ----------------------------
DROP TABLE IF EXISTS `eb_article`;
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=257 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=53 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_assistant
-- ----------------------------
DROP TABLE IF EXISTS `eb_broadcast_assistant`;
CREATE TABLE `eb_broadcast_assistant` (
`assistant_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL COMMENT '微信号',
`nickname` varchar(100) DEFAULT NULL COMMENT '微信昵称',
`mer_id` int(11) DEFAULT NULL COMMENT '商户ID',
`mark` varchar(255) DEFAULT NULL COMMENT '备注',
`is_del` tinyint(1) DEFAULT '0',
UNIQUE KEY `id` (`assistant_id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 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 AUTO_INCREMENT=525 DEFAULT CHARSET=utf8 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 '添加时间',
`star` smallint(1) unsigned NOT NULL DEFAULT '1' 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 '商户是否删除',
`feeds_img` varchar(255) DEFAULT NULL COMMENT '封面图',
`push_url` varchar(255) DEFAULT NULL COMMENT '推流地址',
`assistant_id` varchar(255) DEFAULT NULL COMMENT '小助手ID',
`is_feeds_public` tinyint(1) unsigned DEFAULT '0' COMMENT '是否开启官方收录,1 开启,0 关闭',
PRIMARY KEY (`broadcast_room_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=392 DEFAULT CHARSET=utf8 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,
`on_sale` tinyint(2) DEFAULT '1' COMMENT '商品上下架',
KEY `broadcast_room_id` (`broadcast_room_id`,`broadcast_goods_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 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` longtext NOT NULL COMMENT '缓存数据',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '缓存时间',
PRIMARY KEY (`key`) USING BTREE,
KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信缓存表';
-- ----------------------------
-- Table structure for eb_city_area
-- ----------------------------
DROP TABLE IF EXISTS `eb_city_area`;
CREATE TABLE `eb_city_area` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`path` varchar(128) NOT NULL DEFAULT '/' COMMENT '省市级别',
`parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
`type` varchar(32) NOT NULL COMMENT '类型',
`level` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '级别',
`snum` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '子级个数',
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
KEY `parent_id` (`parent_id`) USING BTREE,
KEY `path` (`path`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=59046 DEFAULT CHARSET=utf8 COMMENT='省市区县数据';
-- ----------------------------
-- Table structure for eb_community
-- ----------------------------
DROP TABLE IF EXISTS `eb_community`;
CREATE TABLE `eb_community` (
`community_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL COMMENT '标题',
`image` varchar(1000) DEFAULT NULL COMMENT '图片',
`category_id` int(11) unsigned DEFAULT '0',
`topic_id` int(11) unsigned DEFAULT '0' COMMENT '话题',
`uid` int(11) unsigned DEFAULT '0' COMMENT '用户',
`count_start` int(11) unsigned DEFAULT '0' COMMENT '点赞数',
`count_reply` int(11) unsigned DEFAULT '0' COMMENT '评论数',
`count_share` int(11) unsigned DEFAULT '0' COMMENT '分享数',
`status` tinyint(2) DEFAULT '0' COMMENT '审核状态',
`is_show` tinyint(2) DEFAULT '0' COMMENT '显示状态',
`start` tinyint(1) DEFAULT '1' COMMENT '星级排序',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`is_del` tinyint(1) DEFAULT '0',
`content` varchar(1000) DEFAULT NULL,
`refusal` varchar(255) DEFAULT NULL COMMENT '拒绝理由',
`is_hot` tinyint(2) DEFAULT '0' COMMENT '是否推荐',
`order_id` int(11) unsigned DEFAULT '0' COMMENT '关联订单ID',
PRIMARY KEY (`community_id`)
) ENGINE=InnoDB AUTO_INCREMENT=144 DEFAULT CHARSET=utf8 COMMENT='社区图文表信息';
-- ----------------------------
-- Table structure for eb_community_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_community_category`;
CREATE TABLE `eb_community_category` (
`category_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`cate_name` varchar(50) DEFAULT NULL COMMENT '分类名',
`pid` int(11) DEFAULT NULL COMMENT '父级ID',
`path` varchar(255) DEFAULT '/' COMMENT '路径 ',
`is_show` tinyint(2) DEFAULT '1' COMMENT '状态',
`level` int(11) DEFAULT '0' COMMENT '等级',
`sort` int(11) DEFAULT NULL,
PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8 COMMENT='社区分类';
-- ----------------------------
-- Table structure for eb_community_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_community_reply`;
CREATE TABLE `eb_community_reply` (
`reply_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`content` varchar(255) DEFAULT NULL COMMENT '评论内容',
`pid` int(11) unsigned DEFAULT '0' COMMENT '回复id',
`uid` int(11) unsigned DEFAULT '0' COMMENT '发言人',
`re_uid` int(11) unsigned DEFAULT '0' COMMENT '回复人',
`count_start` int(11) unsigned DEFAULT '0' COMMENT '点赞数',
`count_reply` int(11) unsigned DEFAULT '0' COMMENT '评论数',
`status` tinyint(2) DEFAULT '1' COMMENT '状态 ',
`community_id` int(11) unsigned DEFAULT '0' COMMENT '文章id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`is_del` tinyint(2) DEFAULT '0',
`refusal` varchar(255) DEFAULT NULL COMMENT '拒绝原因',
PRIMARY KEY (`reply_id`),
UNIQUE KEY `id` (`reply_id`)
) ENGINE=InnoDB AUTO_INCREMENT=269 DEFAULT CHARSET=utf8 COMMENT='社区评论';
-- ----------------------------
-- Table structure for eb_community_topic
-- ----------------------------
DROP TABLE IF EXISTS `eb_community_topic`;
CREATE TABLE `eb_community_topic` (
`topic_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`topic_name` varchar(100) DEFAULT NULL COMMENT '话题',
`status` tinyint(2) DEFAULT '1' COMMENT '状态',
`is_hot` tinyint(11) DEFAULT '0' COMMENT '推荐',
`category_id` int(11) unsigned DEFAULT '0' COMMENT '分类id',
`is_del` tinyint(2) DEFAULT '0',
`pic` varchar(128) DEFAULT NULL COMMENT '图标',
`count_use` int(11) unsigned DEFAULT '0' COMMENT '使用次数',
`count_view` int(11) unsigned DEFAULT '0' COMMENT '浏览量',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`sort` int(11) unsigned DEFAULT '0',
PRIMARY KEY (`topic_id`),
UNIQUE KEY `id` (`topic_id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 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,
`message` varchar(255) DEFAULT NULL,
PRIMARY KEY (`excel_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=406 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 '快递公司全称',
`mark` varchar(255) DEFAULT '' COMMENT '备注',
`partner_id` int(11) DEFAULT '0' COMMENT '月结账号',
`partner_key` int(11) DEFAULT '0' COMMENT '月结密码',
`net` int(11) DEFAULT '0' COMMENT '取件网点',
`sort` int(11) NOT NULL COMMENT '排序',
`is_show` int(11) DEFAULT '1' COMMENT '是否显示',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `code` (`code`) USING BTREE,
KEY `is_show` (`is_show`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1641 DEFAULT CHARSET=utf8 COMMENT='快递公司表';
-- ----------------------------
-- Table structure for eb_express_partner
-- ----------------------------
DROP TABLE IF EXISTS `eb_express_partner`;
CREATE TABLE `eb_express_partner` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`express_id` int(11) NOT NULL COMMENT '快递公司id',
`account` varchar(20) DEFAULT NULL COMMENT '月结账号',
`key` varchar(50) DEFAULT NULL COMMENT '月结密码',
`net_name` varchar(50) DEFAULT NULL COMMENT '取件网点',
`mer_id` int(11) DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 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',
`update_time` timestamp NULL DEFAULT NULL COMMENT '回复时间',
PRIMARY KEY (`feedback_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=49 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=191 DEFAULT CHARSET=utf8 COMMENT='用户反馈分类表';
-- ----------------------------
-- Table structure for eb_financial
-- ----------------------------
DROP TABLE IF EXISTS `eb_financial`;
CREATE TABLE `eb_financial` (
`financial_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`financial_sn` varchar(32) NOT NULL COMMENT '单号',
`mer_money` decimal(12,2) unsigned NOT NULL COMMENT '余额',
`extract_money` decimal(12,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '提现金额',
`financial_type` int(11) unsigned DEFAULT '0' COMMENT '收款类型',
`financial_account` varchar(500) NOT NULL COMMENT '商户账户信息',
`financial_status` int(11) unsigned DEFAULT '0' COMMENT '转账状态',
`status` int(10) NOT NULL COMMENT '审核0待审核,1通过 ,-1 未通过',
`refusal` varchar(32) NOT NULL COMMENT '拒绝理由',
`mer_id` int(11) unsigned NOT NULL COMMENT '商户 id',
`image` varchar(1000) DEFAULT NULL COMMENT '凭证',
`admin_id` int(11) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`status_time` timestamp NULL DEFAULT NULL COMMENT '审核时间',
`update_time` timestamp NULL DEFAULT NULL COMMENT '修改拼凭证时间',
`is_del` int(11) unsigned DEFAULT '0',
`mark` varchar(255) DEFAULT NULL COMMENT '商户备注',
`admin_mark` varchar(255) DEFAULT NULL COMMENT '平台备注',
`mer_admin_id` int(11) DEFAULT NULL COMMENT '商户管理员',
PRIMARY KEY (`financial_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=464 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC 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 '金额',
`type` tinyint(1) NOT NULL DEFAULT '-1' COMMENT '0:商户 1:公共 2:平台',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`financial_record_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE,
KEY `financial_type` (`financial_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7745 DEFAULT CHARSET=utf8 COMMENT='商户财务流水';
-- ----------------------------
-- Table structure for eb_guarantee
-- ----------------------------
DROP TABLE IF EXISTS `eb_guarantee`;
CREATE TABLE `eb_guarantee` (
`guarantee_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`guarantee_name` varchar(255) DEFAULT NULL COMMENT '保障服务名称',
`guarantee_info` varchar(500) DEFAULT NULL COMMENT '保障服务简介',
`status` int(11) DEFAULT '1' COMMENT '0.关闭,1开启',
`image` varchar(255) DEFAULT NULL COMMENT '图标',
`sort` int(11) DEFAULT NULL COMMENT '排序',
`mer_count` int(11) DEFAULT '0' COMMENT '使用的商户数',
`product_cout` int(11) DEFAULT '0' COMMENT '使用的商品数',
`is_del` int(11) DEFAULT '0',
`create_time` timestamp NULL DEFAULT NULL,
`update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`guarantee_id`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COMMENT='保障服务选项';
-- ----------------------------
-- Table structure for eb_guarantee_template
-- ----------------------------
DROP TABLE IF EXISTS `eb_guarantee_template`;
CREATE TABLE `eb_guarantee_template` (
`guarantee_template_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`template_name` varchar(255) DEFAULT NULL,
`mer_id` int(11) DEFAULT NULL,
`status` int(11) unsigned DEFAULT '1',
`sort` int(11) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT NULL,
`is_del` int(11) unsigned DEFAULT '0',
PRIMARY KEY (`guarantee_template_id`)
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8 COMMENT='保障服务模板';
-- ----------------------------
-- Table structure for eb_guarantee_value
-- ----------------------------
DROP TABLE IF EXISTS `eb_guarantee_value`;
CREATE TABLE `eb_guarantee_value` (
`guarantee_value_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`guarantee_id` int(11) unsigned DEFAULT NULL,
`guarantee_template_id` int(11) unsigned DEFAULT NULL,
`mer_id` int(11) DEFAULT NULL,
`status` int(11) DEFAULT '1',
PRIMARY KEY (`guarantee_value_id`)
) ENGINE=InnoDB AUTO_INCREMENT=239 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`),
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 COMMENT='自定标签规则';
-- ----------------------------
-- Table structure for eb_member_interests
-- ----------------------------
DROP TABLE IF EXISTS `eb_member_interests`;
CREATE TABLE `eb_member_interests` (
`interests_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) DEFAULT NULL COMMENT '名称',
`info` varchar(200) DEFAULT NULL COMMENT '介绍',
`brokerage_level` tinyint(3) unsigned DEFAULT NULL COMMENT '关联等级',
`pic` varchar(128) DEFAULT NULL COMMENT '图标',
`type` tinyint(2) DEFAULT '0' COMMENT '类型1.免费会员',
PRIMARY KEY (`interests_id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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',
`type_id` int(10) unsigned 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图片',
`mini_banner` varchar(128) DEFAULT NULL COMMENT '商户店店铺街图片',
`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 '提成比例',
`long` varchar(16) DEFAULT NULL COMMENT '经度',
`lat` varchar(16) 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) unsigned DEFAULT '0' COMMENT '剩余复制商品次数',
`export_dump_num` int(11) unsigned DEFAULT '0' COMMENT '电子面单剩余次数',
`mer_money` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '商户余额',
`financial_bank` varchar(255) DEFAULT NULL COMMENT '银行卡转账信息',
`financial_wechat` varchar(255) DEFAULT NULL COMMENT '微信转账信息',
`financial_alipay` varchar(255) DEFAULT NULL COMMENT '支付宝转账信息',
`financial_type` tinyint(2) unsigned DEFAULT '1' COMMENT '默认使用类型',
`sub_mchid` varchar(16) NOT NULL DEFAULT '' COMMENT '微信支付分配的分账号',
`delivery_way` varchar(50) DEFAULT '' COMMENT '配送方式',
PRIMARY KEY (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=152 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=181 DEFAULT CHARSET=utf8 COMMENT='商户管理员表';
-- ----------------------------
-- Table structure for eb_merchant_applyments
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_applyments`;
CREATE TABLE `eb_merchant_applyments` (
`mer_applyments_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`out_request_no` varchar(128) DEFAULT NULL COMMENT '业务申请编号',
`applyment_id` varchar(100) DEFAULT NULL COMMENT '微信支付分配的申请单号',
`mer_id` int(11) DEFAULT '0' COMMENT '商户ID',
`sub_mchid` varchar(100) DEFAULT NULL COMMENT '二级商户号',
`mer_name` varchar(50) DEFAULT NULL COMMENT '商户名',
`info` text COMMENT '申请资料',
`status` int(11) DEFAULT '0' COMMENT '申请状态: 0.平台未提交,-1.平台驳回,10.平台提交审核中,11.需用户操作 ,20.已完成,30.已冻结,40.驳回',
`message` varchar(1000) DEFAULT NULL COMMENT '返回信息',
`mark` varchar(255) DEFAULT NULL COMMENT '备注',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`is_del` int(11) DEFAULT '0' COMMENT '删除',
PRIMARY KEY (`mer_applyments_id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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=46 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) unsigned DEFAULT '0' 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 COMMENT '提交时间',
`status` tinyint(2) DEFAULT '0' COMMENT '处理状态 1通过 ,2未通过',
`fail_msg` varchar(255) DEFAULT NULL COMMENT '未通过原因',
`is_del` tinyint(2) DEFAULT '0' COMMENT '删除状态 1删除 ,0未删除',
`mark` varchar(255) DEFAULT NULL COMMENT '备注',
`mer_id` int(11) unsigned DEFAULT '0' COMMENT '关联商户',
`images` varchar(2000) DEFAULT NULL COMMENT '多图',
`merchant_category_id` int(11) unsigned DEFAULT '0' COMMENT '商户分类',
`mer_type_id` int(10) unsigned DEFAULT '0' COMMENT '店铺类型',
PRIMARY KEY (`mer_intention_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=140 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 AUTO_INCREMENT=101 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_merchant_type
-- ----------------------------
DROP TABLE IF EXISTS `eb_merchant_type`;
CREATE TABLE `eb_merchant_type` (
`mer_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商户类型 id',
`type_name` varchar(16) NOT NULL COMMENT '类型名称',
`type_info` varchar(512) DEFAULT NULL COMMENT '类型要求',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`mer_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 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',
`transaction_id` varchar(60) DEFAULT NULL COMMENT '微信支付订单号(分账时有效)',
`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 '创建时间',
`is_combine` tinyint(1) unsigned DEFAULT '0' COMMENT '是否为合并支付',
PRIMARY KEY (`presell_order_id`),
UNIQUE KEY `order_id` (`order_id`),
KEY `uid` (`uid`),
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=236 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_relevance
-- ----------------------------
DROP TABLE IF EXISTS `eb_relevance`;
CREATE TABLE `eb_relevance` (
`relevance_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`left_id` int(11) unsigned NOT NULL,
`right_id` int(11) unsigned NOT NULL,
`type` varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (`relevance_id`) USING BTREE,
KEY `type` (`type`,`left_id`,`right_id`)
) ENGINE=InnoDB AUTO_INCREMENT=929 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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 AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COMMENT='小程序二维码管理表';
-- ----------------------------
-- Table structure for eb_serve_meal
-- ----------------------------
DROP TABLE IF EXISTS `eb_serve_meal`;
CREATE TABLE `eb_serve_meal` (
`meal_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) DEFAULT NULL COMMENT '套餐名称',
`type` int(11) DEFAULT '0' COMMENT '套餐类型,1复制商品,2电子面单',
`price` decimal(8,2) DEFAULT '0.00' COMMENT '价格',
`num` int(11) DEFAULT '1' COMMENT '数量',
`sort` int(11) DEFAULT NULL COMMENT '排序',
`status` int(11) DEFAULT '1' COMMENT '状态',
`is_del` int(11) DEFAULT '0',
`create_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`meal_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_serve_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_serve_order`;
CREATE TABLE `eb_serve_order` (
`order_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`meal_id` int(11) DEFAULT NULL COMMENT '套餐ID',
`pay_type` int(11) DEFAULT NULL COMMENT '支付方式:1微信,2支付宝',
`order_sn` varchar(50) DEFAULT NULL COMMENT '订单ID',
`pay_price` decimal(8,2) DEFAULT NULL COMMENT '价格',
`order_info` varchar(255) DEFAULT NULL COMMENT '套餐信息',
`type` int(11) DEFAULT NULL COMMENT '套餐类型',
`status` int(11) DEFAULT '0' COMMENT '状态:默认0,支付成功 10,支付失败 -1',
`mer_id` int(11) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT NULL,
`is_del` int(11) DEFAULT '0',
PRIMARY KEY (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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 '添加时间',
`info` varchar(1000) DEFAULT NULL COMMENT '运费说明',
PRIMARY KEY (`shipping_template_id`) USING BTREE,
KEY `mer_id` (`mer_id`,`sort`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=303 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=259 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=942 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=213 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 AUTO_INCREMENT=2272 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=167 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=179 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=202 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 '是否失效',
`spread_id` int(11) unsigned 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 AUTO_INCREMENT=8633 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=697 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=430 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=91 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 AUTO_INCREMENT=10407 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 '商品数',
`integral` int(8) unsigned DEFAULT '0' COMMENT '使用积分数量',
`integral_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '积分抵扣金额',
`give_integral` int(8) unsigned 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',
`is_combine` tinyint(1) unsigned DEFAULT '0' COMMENT '是否为合并支付 ',
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,
KEY `create_time` (`create_time`,`paid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4076 DEFAULT CHARSET=utf8 COMMENT='用户订单表';
-- ----------------------------
-- Table structure for eb_store_import
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_import`;
CREATE TABLE `eb_store_import` (
`import_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`import_type` varchar(20) DEFAULT NULL COMMENT 'delivery发货单',
`type` int(11) DEFAULT '1' COMMENT '类型:1发货,2送货,3虚拟,4电子面单',
`count` int(11) DEFAULT NULL COMMENT '总数',
`success` int(11) DEFAULT NULL COMMENT '成功数',
`status` int(2) DEFAULT '0' COMMENT '0.处理中,1成功,10部分完成,-1失败',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`mer_id` int(11) DEFAULT NULL,
PRIMARY KEY (`import_id`)
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8 COMMENT='导入批次记录';
-- ----------------------------
-- Table structure for eb_store_import_delivery
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_import_delivery`;
CREATE TABLE `eb_store_import_delivery` (
`import_delivery_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`import_id` int(10) unsigned NOT NULL,
`order_sn` varchar(32) DEFAULT NULL COMMENT '订单sn',
`delivery_type` int(11) DEFAULT '1' COMMENT '类型:1发货,2送货,3虚拟,4电子面单',
`delivery_name` varchar(64) DEFAULT NULL COMMENT '快递公司',
`delivery_id` varchar(64) DEFAULT NULL COMMENT '快递单号',
`status` tinyint(2) DEFAULT NULL COMMENT '状态',
`mark` varchar(255) DEFAULT NULL COMMENT '备注',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`mer_id` int(11) DEFAULT NULL,
PRIMARY KEY (`import_delivery_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=632 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',
`spread_uid` int(11) unsigned DEFAULT '0' COMMENT '推荐人id',
`top_uid` int(11) unsigned DEFAULT '0' 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 '支付邮费',
`is_selfbuy` tinyint(1) unsigned NOT NULL DEFAULT '0' 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 '平台手续费',
`integral` int(8) unsigned DEFAULT '0' COMMENT '使用积分数量',
`integral_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '积分抵扣金额',
`give_integral` int(8) unsigned DEFAULT '0' 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小程序 3 h5 4支付宝 5 支付宝扫码 6 微信扫码',
`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 NULL COMMENT '核销客服 id',
`transaction_id` varchar(60) DEFAULT NULL COMMENT '微信支付订单号(分账时有效)',
`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`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4165 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 '二级佣金',
`integral` int(8) unsigned DEFAULT '0' 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 AUTO_INCREMENT=4214 DEFAULT CHARSET=utf8 COMMENT='订单购物详情表';
-- ----------------------------
-- Table structure for eb_store_order_profitsharing
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_profitsharing`;
CREATE TABLE `eb_store_order_profitsharing` (
`profitsharing_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`profitsharing_sn` varchar(32) NOT NULL COMMENT '分账 id',
`order_id` int(10) unsigned NOT NULL COMMENT '订单 id',
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`transaction_id` varchar(60) NOT NULL COMMENT '微信支付订单号',
`profitsharing_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分账金额',
`profitsharing_refund` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`profitsharing_mer_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '分账给商户金额',
`type` varchar(32) NOT NULL COMMENT '分类',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:未分账 1:已分账 -1已退款 -2失败',
`error_msg` varchar(255) DEFAULT NULL COMMENT '失败原因',
`profitsharing_time` timestamp NULL DEFAULT NULL COMMENT '分账时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`profitsharing_id`),
KEY `order_id` (`order_id`),
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 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 AUTO_INCREMENT=188 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 '3.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 '轮播图',
`guarantee_template_id` int(11) DEFAULT '0' COMMENT '保障服务模板',
`once_count` int(11) DEFAULT '0' COMMENT '订单单次购买数量最大限制',
`integral_rate` int(11) NOT NULL DEFAULT '-1' COMMENT '积分抵扣比例',
`integral_total` int(10) unsigned DEFAULT '0' COMMENT '使用积分抵扣总数',
`integral_price_total` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '使用积分抵扣金额总数',
`labels` varchar(255) DEFAULT '' COMMENT '标签id',
`delivery_way` varchar(100) DEFAULT NULL COMMENT '1.仅到店自提2快递计价配送3全国包邮',
`delivery_free` int(11) DEFAULT '0' 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=1416 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,
`product_status` int(11) DEFAULT '0' COMMENT '审核状态;0.待审核,1审核通过,-1 审核失败,-2 强制下架',
`refusal` varchar(255) DEFAULT NULL,
`action_status` int(11) DEFAULT '1' COMMENT '活动状态1开启,-1 结束',
PRIMARY KEY (`product_assist_id`) USING BTREE,
KEY `start_time` (`start_time`,`end_time`),
KEY `product_id` (`product_id`),
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=187 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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,
`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 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 AUTO_INCREMENT=512 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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;
-- ----------------------------
-- 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`),
KEY `uid` (`uid`,`product_assist_set_id`) USING BTREE,
KEY `product_assist_id` (`product_assist_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=165 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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`) USING BTREE,
KEY `mer_cate_id` (`mer_cate_id`,`product_id`)
) 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 COMMENT '商品id',
`content` longtext NOT NULL COMMENT '商品详情',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '商品类型 0=普通',
KEY `product_id` (`product_id`,`type`)
) ENGINE=InnoDB 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 '数量',
`number` int(11) DEFAULT '1' COMMENT '剩余数量',
`message` varchar(255) DEFAULT NULL,
`info` varchar(500) DEFAULT '1' COMMENT '信息',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`store_product_copy_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=672 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_store_product_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_group`;
CREATE TABLE `eb_store_product_group` (
`product_group_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`product_id` int(11) unsigned DEFAULT '0' COMMENT '商品ID',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`time` int(10) unsigned DEFAULT '0' COMMENT '开团时长',
`buying_count_num` int(11) DEFAULT '0' COMMENT '拼团总人数',
`buying_num` int(11) DEFAULT '0' COMMENT '最少真实购买人数',
`pay_count` int(11) unsigned DEFAULT '0' COMMENT '活动购买总人数',
`once_pay_count` int(11) unsigned DEFAULT '0' COMMENT '单次购买数量',
`status` int(11) DEFAULT '0' COMMENT '平台控制状态',
`mer_id` int(11) unsigned DEFAULT '0' COMMENT '商户ID',
`ficti_status` int(11) DEFAULT '0' COMMENT '虚拟成团状态',
`ficti_num` int(11) DEFAULT '0' COMMENT '最多虚拟人数',
`is_show` int(11) DEFAULT '0' COMMENT '上下架',
`is_del` int(11) unsigned DEFAULT '0',
`success_num` int(11) unsigned DEFAULT '0' COMMENT '成功团数',
`product_status` int(11) DEFAULT '0',
`price` decimal(10,2) DEFAULT '0.00',
`action_status` int(11) DEFAULT '0' COMMENT '活动状态',
`create_time` datetime DEFAULT NULL,
`refusal` varchar(255) DEFAULT NULL,
PRIMARY KEY (`product_group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8 COMMENT='拼团商品信息表';
-- ----------------------------
-- Table structure for eb_store_product_group_buying
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_group_buying`;
CREATE TABLE `eb_store_product_group_buying` (
`group_buying_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`product_group_id` int(11) unsigned DEFAULT '0' COMMENT '活动商品ID',
`status` int(11) DEFAULT '0' COMMENT '状态:0。默认,进行中,10.已完成,-1 时间到未完成',
`ficti_status` int(11) DEFAULT '0' COMMENT '虚拟成团状态0.未开启,1开启',
`ficti_num` int(11) unsigned DEFAULT '0' COMMENT '虚拟成团人数',
`buying_count_num` int(11) unsigned DEFAULT '0' COMMENT '成团总人数',
`buying_num` int(11) unsigned DEFAULT '0' COMMENT '真实人数',
`yet_buying_num` int(11) unsigned DEFAULT '0' COMMENT '已参团人数',
`is_del` int(11) DEFAULT '0',
`mer_id` int(11) unsigned DEFAULT '0',
`end_time` int(11) DEFAULT NULL COMMENT '结束时间',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`group_buying_id`)
) ENGINE=InnoDB AUTO_INCREMENT=260 DEFAULT CHARSET=utf8 COMMENT='拼团活动表';
-- ----------------------------
-- Table structure for eb_store_product_group_sku
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_group_sku`;
CREATE TABLE `eb_store_product_group_sku` (
`product_group_id` int(11) unsigned NOT NULL DEFAULT '0',
`product_id` int(11) unsigned NOT NULL,
`unique` char(12) NOT NULL,
`active_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',
KEY `product_group_id` (`product_group_id`,`product_id`),
KEY `unique` (`unique`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_store_product_group_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_group_user`;
CREATE TABLE `eb_store_product_group_user` (
`group_buying_id` int(11) unsigned DEFAULT '0' COMMENT '团ID',
`product_group_id` int(11) unsigned DEFAULT '0' COMMENT '活动商品ID',
`status` int(11) DEFAULT '0' COMMENT '状态',
`is_initiator` int(11) unsigned DEFAULT '0' COMMENT '是否为 团长',
`order_id` int(11) unsigned DEFAULT '0' COMMENT '订单ID',
`uid` int(11) unsigned DEFAULT '0' COMMENT '用户ID ',
`nickname` varchar(255) DEFAULT NULL COMMENT '昵称',
`avatar` varchar(255) DEFAULT NULL COMMENT '头像',
`is_del` int(11) unsigned DEFAULT '0',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='拼团成员表';
-- ----------------------------
-- Table structure for eb_store_product_label
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_label`;
CREATE TABLE `eb_store_product_label` (
`product_label_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`label_name` varchar(50) DEFAULT NULL COMMENT '标签名',
`status` tinyint(1) DEFAULT NULL COMMENT '状态',
`info` varchar(255) DEFAULT NULL COMMENT '说明',
`sort` int(11) DEFAULT NULL COMMENT '排序',
`type` int(11) DEFAULT '0' COMMENT '类型 ',
`mer_id` int(11) DEFAULT '0' COMMENT '商户ID',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`is_del` tinyint(1) DEFAULT '0',
PRIMARY KEY (`product_label_id`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8;
-- ----------------------------
-- 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,
`product_status` int(11) DEFAULT '0' COMMENT '审核状态;0.待审核,1审核通过,-1 审核失败,-2 强制下架',
`refusal` varchar(255) DEFAULT NULL,
`action_status` int(11) DEFAULT '1' COMMENT '活动状态1开启,-1 结束',
PRIMARY KEY (`product_presell_id`),
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 AUTO_INCREMENT=316 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 '管理员回复时间',
`sort` smallint(5) unsigned NOT NULL DEFAULT '1' 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 AUTO_INCREMENT=860 DEFAULT CHARSET=utf8 COMMENT='商品评论表';
-- ----------------------------
-- Table structure for eb_store_product_take
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_take`;
CREATE TABLE `eb_store_product_take` (
`product_take_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`product_id` int(11) DEFAULT NULL,
`unique` char(12) DEFAULT NULL,
`status` int(2) unsigned DEFAULT '0' COMMENT '默认0,发送 1',
`uid` int(11) DEFAULT NULL COMMENT '用户',
`type` varchar(255) DEFAULT NULL COMMENT '1.PC,2.公众号,3.小程序',
`is_del` int(11) DEFAULT '0',
PRIMARY KEY (`product_take_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 COMMENT='用户到货通知记录';
-- ----------------------------
-- Table structure for eb_store_refund_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_refund_order`;
CREATE TABLE `eb_store_refund_order` (
`refund_order_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '退款单id',
`refund_order_sn` varchar(32) NOT NULL COMMENT '退款单号',
`order_id` int(11) unsigned NOT NULL COMMENT '订单id',
`uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户 id',
`mer_id` int(10) unsigned NOT NULL 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 '退还二级佣金',
`integral` int(8) unsigned DEFAULT '0' COMMENT '退还积分',
`delivery_type` varchar(32) DEFAULT NULL COMMENT '快递公司',
`delivery_id` varchar(32) DEFAULT NULL COMMENT '快递单号',
`delivery_mark` varchar(200) DEFAULT NULL COMMENT '快递备注',
`delivery_pics` varchar(255) DEFAULT NULL COMMENT '快递凭证',
`delivery_phone` varchar(18) DEFAULT NULL COMMENT '联系电话',
`mer_delivery_user` varchar(32) DEFAULT NULL COMMENT '收货人',
`mer_delivery_address` varchar(32) DEFAULT NULL COMMENT '收货地址',
`phone` varchar(18) DEFAULT NULL COMMENT '联系电话',
`mark` varchar(200) DEFAULT NULL COMMENT '备注',
`mer_mark` varchar(255) DEFAULT NULL COMMENT '商户备注',
`admin_mark` varchar(255) DEFAULT NULL COMMENT '平台备注',
`pics` varchar(255) DEFAULT NULL COMMENT '图片',
`refund_type` tinyint(1) NOT NULL COMMENT '退款类型 1:退款 2:退款退货',
`refund_message` varchar(128) NOT NULL COMMENT '退款原因',
`refund_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '退款金额',
`refund_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '退款数',
`fail_message` varchar(200) DEFAULT NULL COMMENT '未通过原因',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态 0:待审核 -1:审核未通过 1:待退货 2:待收货 3:已退款',
`status_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '状态改变时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`reconciliation_id` int(10) unsigned DEFAULT '0' COMMENT '对账id',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0',
`is_system_del` tinyint(1) DEFAULT '0' COMMENT '商户删除',
PRIMARY KEY (`refund_order_id`) USING BTREE,
UNIQUE KEY `refund_order_sn` (`refund_order_sn`) USING BTREE,
KEY `oid` (`order_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=856 DEFAULT CHARSET=utf8 COMMENT='订单退款表';
-- ----------------------------
-- Table structure for eb_store_refund_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_refund_product`;
CREATE TABLE `eb_store_refund_product` (
`refund_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单产品 id',
`refund_order_id` int(10) unsigned NOT NULL COMMENT '退款单',
`order_product_id` int(11) unsigned NOT NULL COMMENT '订单产品id',
`refund_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '退货数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`refund_product_id`) USING BTREE,
KEY `refund_order_id` (`refund_order_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=933 DEFAULT CHARSET=utf8 COMMENT='退款单产品表';
-- ----------------------------
-- Table structure for eb_store_refund_status
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_refund_status`;
CREATE TABLE `eb_store_refund_status` (
`refund_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 `refund_order_id` (`refund_order_id`) USING BTREE,
KEY `change_type` (`change_type`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单操作记录表';
-- ----------------------------
-- Table structure for eb_store_seckill_active
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_seckill_active`;
CREATE TABLE `eb_store_seckill_active` (
`seckill_active_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`start_day` datetime NOT NULL COMMENT '开始日期',
`end_day` datetime NOT NULL COMMENT '结束日期',
`start_time` int(10) unsigned NOT NULL COMMENT '开始时间',
`end_time` int(10) unsigned NOT NULL COMMENT '结束时间',
`mer_id` int(11) unsigned NOT NULL COMMENT '商户ID',
`product_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`once_pay_count` int(11) unsigned DEFAULT '0' COMMENT '活动期间每人每日购买数量,0不限制',
`all_pay_count` int(11) unsigned DEFAULT '0' COMMENT '全部活动期间,用户购买总数限制,0不限制',
`status` tinyint(1) unsigned DEFAULT '0' COMMENT '0.活动进行中,-1.活动过时',
PRIMARY KEY (`seckill_active_id`) USING BTREE,
KEY `start_day` (`start_day`,`end_day`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8 COMMENT='商户设置秒杀商品关联表';
-- ----------------------------
-- Table structure for eb_store_seckill_time
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_seckill_time`;
CREATE TABLE `eb_store_seckill_time` (
`seckill_time_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT '',
`start_time` int(11) unsigned NOT NULL COMMENT '开始时间',
`end_time` int(11) unsigned NOT NULL COMMENT '结束时间',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1,0状态',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`pic` varchar(255) DEFAULT NULL COMMENT '图片',
PRIMARY KEY (`seckill_time_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='秒杀时间段配置';
-- ----------------------------
-- Table structure for eb_store_service
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_service`;
CREATE TABLE `eb_store_service` (
`service_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '客服id',
`mer_id` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
`uid` int(11) NOT NULL COMMENT '客服uid',
`avatar` varchar(250) NOT NULL COMMENT '客服头像',
`nickname` varchar(50) NOT NULL COMMENT '代理名称',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0隐藏1显示',
`notify` int(2) DEFAULT '0' COMMENT '订单通知1开启0关闭',
`phone` varchar(18) DEFAULT '' COMMENT '电话',
`customer` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否展示统计管理',
`is_verify` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否有核销权限',
`sort` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
PRIMARY KEY (`service_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8 COMMENT='客服表';
-- ----------------------------
-- Table structure for eb_store_service_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_service_log`;
CREATE TABLE `eb_store_service_log` (
`service_log_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '客服用户对话记录表ID',
`mer_id` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
`msn` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_estonian_ci NOT NULL COMMENT '消息内容',
`uid` int(11) NOT NULL COMMENT '发送人uid',
`service_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '客服 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发送时间',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已读(0:否;1:是;)',
`service_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '客服是否已读(0:否;1:是;)',
`remind` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否提醒过(0:否;1:是;)',
`send_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0:用户发送 1:客服回复',
`msn_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '消息类型 1=文字 2=表情 3=图片 4=商品 5=订单 6=退款单',
PRIMARY KEY (`service_log_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `service_id` (`service_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2922 DEFAULT CHARSET=utf8 COMMENT='客服用户对话记录表';
-- ----------------------------
-- Table structure for eb_store_spu
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_spu`;
CREATE TABLE `eb_store_spu` (
`spu_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户ID',
`product_id` int(10) unsigned DEFAULT '0' COMMENT '商品ID',
`product_type` int(255) unsigned DEFAULT '0' COMMENT '活动类型0普通,1秒杀,2预售,3助力',
`activity_id` int(10) unsigned DEFAULT '0' COMMENT '活动ID',
`status` int(11) DEFAULT '0' COMMENT '0.下架,1.上架',
`store_name` varchar(128) DEFAULT NULL COMMENT '商品名称',
`keyword` varchar(255) DEFAULT NULL COMMENT '关键词',
`price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '最低价格',
`rank` int(11) DEFAULT NULL COMMENT '排序',
`create_time` datetime DEFAULT NULL,
`temp_id` int(11) unsigned DEFAULT '0' COMMENT '运费模板',
`sort` int(11) unsigned DEFAULT '0' COMMENT '商户排序',
`star` int(11) DEFAULT '1' COMMENT '星级',
`image` varchar(255) DEFAULT NULL COMMENT '主图',
`is_del` int(11) unsigned DEFAULT '0',
`mer_labels` varchar(255) DEFAULT '' COMMENT '标签id',
`sys_labels` varchar(255) DEFAULT '' COMMENT '标签id',
PRIMARY KEY (`spu_id`),
KEY `mer_id` (`mer_id`,`product_id`),
KEY `activity_id` (`activity_id`,`product_type`)
) ENGINE=InnoDB AUTO_INCREMENT=2833 DEFAULT CHARSET=utf8 COMMENT='商品搜索信息表';
-- ----------------------------
-- Table structure for eb_system_admin
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_admin`;
CREATE TABLE `eb_system_admin` (
`admin_id` int(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '后台管理员表ID',
`account` varchar(32) NOT NULL COMMENT '后台管理员账号',
`pwd` varchar(64) NOT NULL COMMENT '后台管理员密码',
`real_name` varchar(16) NOT NULL COMMENT '后台管理员姓名',
`phone` varchar(12) DEFAULT NULL COMMENT '联系电话',
`roles` varchar(128) NOT NULL COMMENT '后台管理员权限(role_id), 多个逗号分隔',
`last_ip` varchar(16) DEFAULT NULL COMMENT '后台管理员最后一次登录ip',
`last_time` timestamp NULL DEFAULT NULL COMMENT '后台管理员最后一次登录时间',
`login_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '后台管理员状态 1有效0无效',
`level` tinyint(3) unsigned NOT NULL DEFAULT '1',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '后台管理员添加时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '后台管理员编辑时间',
PRIMARY KEY (`admin_id`) USING BTREE,
KEY `account` (`account`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='后台管理员表';
-- ----------------------------
-- Table structure for eb_system_attachment
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_attachment`;
CREATE TABLE `eb_system_attachment` (
`attachment_id` int(11) NOT NULL AUTO_INCREMENT,
`attachment_category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '分类ID 0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图',
`attachment_name` varchar(100) NOT NULL COMMENT '附件名称',
`attachment_src` varchar(200) NOT NULL COMMENT '附件路径',
`upload_type` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '图片上传类型 1本地 2七牛云 3OSS 4COS ',
`user_type` int(11) NOT NULL DEFAULT '0' COMMENT '图片上传模块类型 0总后台后台 >0商户后台 -1用户生成',
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传用户的 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '上传时间',
PRIMARY KEY (`attachment_id`) USING BTREE,
KEY `attachment_category_id` (`attachment_category_id`) USING BTREE,
KEY `user_type` (`user_type`,`user_id`,`upload_type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=13633 DEFAULT CHARSET=utf8 COMMENT='附件管理表';
-- ----------------------------
-- Table structure for eb_system_attachment_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_attachment_category`;
CREATE TABLE `eb_system_attachment_category` (
`attachment_category_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`path` varchar(512) NOT NULL DEFAULT '' COMMENT '路径',
`attachment_category_name` varchar(32) NOT NULL COMMENT '分类名称',
`attachment_category_enname` varchar(16) NOT NULL COMMENT '分类目录',
`sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`attachment_category_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8 COMMENT='附件分类表';
-- ----------------------------
-- Table structure for eb_system_city
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_city`;
CREATE TABLE `eb_system_city` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`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 NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE,
KEY `level` (`level`) USING BTREE,
KEY `city_id` (`city_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3946 DEFAULT CHARSET=utf8 COMMENT='城市表';
-- ----------------------------
-- Table structure for eb_system_config
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_config`;
CREATE TABLE `eb_system_config` (
`config_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置id',
`config_classify_id` int(10) unsigned NOT NULL COMMENT '配置分类id',
`config_name` varchar(64) NOT NULL COMMENT '字段名称',
`config_key` varchar(64) NOT NULL COMMENT '字段 key',
`config_type` varchar(20) NOT NULL DEFAULT 'input' COMMENT '配置类型',
`config_rule` varchar(255) DEFAULT NULL COMMENT '规则',
`config_props` varchar(255) DEFAULT '' COMMENT '配置',
`required` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '必填',
`info` varchar(128) DEFAULT '' COMMENT '配置说明',
`sort` smallint(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`user_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0=总后台配置 1=商户后台配置',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否显示',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`config_id`) USING BTREE,
UNIQUE KEY `config_name` (`config_key`) USING BTREE,
KEY `config_classify_id` (`config_classify_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=396 DEFAULT CHARSET=utf8 COMMENT='配置表';
-- ----------------------------
-- Table structure for eb_system_config_classify
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_config_classify`;
CREATE TABLE `eb_system_config_classify` (
`config_classify_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置分类id',
`pid` int(10) DEFAULT '0' COMMENT '父级ID',
`classify_name` varchar(255) NOT NULL COMMENT '配置分类名称',
`classify_key` varchar(255) NOT NULL COMMENT '配置分类英文名称',
`info` varchar(30) DEFAULT NULL COMMENT '配置分类说明',
`sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`icon` varchar(30) DEFAULT NULL COMMENT '图标',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '配置分类状态',
PRIMARY KEY (`config_classify_id`) USING BTREE,
UNIQUE KEY `classify_key` (`classify_key`) USING BTREE,
KEY `pid` (`pid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COMMENT='配置分类表';
-- ----------------------------
-- Table structure for eb_system_config_value
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_config_value`;
CREATE TABLE `eb_system_config_value` (
`config_value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '配置id',
`config_key` varchar(32) NOT NULL COMMENT '配置分类key',
`value` varchar(2000) NOT NULL COMMENT '值',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`config_value_id`) USING BTREE,
UNIQUE KEY `config_name` (`config_key`,`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1096 DEFAULT CHARSET=utf8 COMMENT='配置表';
-- ----------------------------
-- Table structure for eb_system_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_group`;
CREATE TABLE `eb_system_group` (
`group_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '组合数据ID',
`group_name` varchar(50) NOT NULL COMMENT '数据组名称',
`group_info` varchar(256) NOT NULL COMMENT '数据提示',
`group_key` varchar(50) NOT NULL COMMENT '数据字段',
`fields` text COMMENT '数据组字段以及类型(json数据)',
`user_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0=总后台配置 1=商户后台配置',
`sort` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`group_id`) USING BTREE,
UNIQUE KEY `group_key` (`group_key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=utf8 COMMENT='组合数据表';
-- ----------------------------
-- Table structure for eb_system_group_data
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_group_data`;
CREATE TABLE `eb_system_group_data` (
`group_data_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '组合数据详情ID',
`group_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '对应的数据组id',
`value` text NOT NULL COMMENT '数据组对应的数据值(json数据)',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '数据排序',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1:开启;0:关闭;)',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加数据时间',
PRIMARY KEY (`group_data_id`) USING BTREE,
KEY `group_id` (`group_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=606 DEFAULT CHARSET=utf8 COMMENT='组合数据详情表';
-- ----------------------------
-- Table structure for eb_system_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_log`;
CREATE TABLE `eb_system_log` (
`log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '管理员操作记录ID',
`admin_id` int(10) unsigned NOT NULL COMMENT '管理员id',
`admin_name` varchar(64) NOT NULL COMMENT '管理员姓名',
`route` varchar(128) NOT NULL COMMENT '路由',
`method` varchar(12) NOT NULL COMMENT '方式',
`url` varchar(256) NOT NULL COMMENT '链接',
`ip` varchar(16) NOT NULL COMMENT '登录IP',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`log_id`) USING BTREE,
KEY `admin_id` (`admin_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=150962 DEFAULT CHARSET=utf8 COMMENT='管理员操作记录表';
-- ----------------------------
-- Table structure for eb_system_menu
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_menu`;
CREATE TABLE `eb_system_menu` (
`menu_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父级id',
`path` varchar(512) NOT NULL COMMENT '路径',
`icon` varchar(32) DEFAULT '' COMMENT '图标',
`menu_name` varchar(128) NOT NULL DEFAULT '' COMMENT '按钮名',
`route` varchar(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '路由名称',
`params` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '参数',
`sort` tinyint(3) NOT NULL DEFAULT '1' COMMENT '排序',
`is_show` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否显示',
`is_mer` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '模块,1 平台, 2商户',
`is_menu` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '类型,1菜单 2 权限',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`menu_id`) USING BTREE,
KEY `pid` (`pid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1617 DEFAULT CHARSET=utf8 COMMENT='菜单表';
-- ----------------------------
-- Table structure for eb_system_notice
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_notice`;
CREATE TABLE `eb_system_notice` (
`notice_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`admin_id` int(10) unsigned NOT NULL COMMENT '管理员 id',
`notice_title` varchar(128) NOT NULL COMMENT '通知标题',
`notice_content` text NOT NULL COMMENT '通知内容',
`type` tinyint(1) unsigned NOT NULL COMMENT '通知类型',
`type_str` varchar(512) NOT NULL COMMENT '通知说明',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0:正常 1:删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`notice_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_system_notice_config
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_notice_config`;
CREATE TABLE `eb_system_notice_config` (
`notice_config_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`notice_title` varchar(20) DEFAULT NULL COMMENT '消息名称',
`notice_key` varchar(100) DEFAULT NULL COMMENT '消息键名称',
`notice_info` varchar(50) DEFAULT NULL COMMENT '消息说明',
`notice_sys` tinyint(2) DEFAULT '-1' COMMENT '站内消息',
`notice_wechat` tinyint(2) DEFAULT '-1' COMMENT '公众号模板消息',
`notice_routine` tinyint(2) DEFAULT '-1' COMMENT '小程序订阅消息',
`notice_sms` tinyint(2) DEFAULT '-1' COMMENT '短信消息',
`mer_id` int(11) unsigned DEFAULT '0' COMMENT '商户ID',
`type` int(11) unsigned DEFAULT '0' COMMENT '1商户通知, 0用户通知',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间 ',
PRIMARY KEY (`notice_config_id`),
UNIQUE KEY `notic_config_id` (`notice_config_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_system_notice_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_notice_log`;
CREATE TABLE `eb_system_notice_log` (
`notice_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mer_id` int(10) unsigned NOT NULL COMMENT '商户 id',
`notice_id` int(10) unsigned NOT NULL COMMENT '公告 id',
`is_read` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否已读',
`read_time` timestamp NULL DEFAULT NULL COMMENT '读取时间',
`is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
PRIMARY KEY (`notice_log_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1279 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_system_role
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_role`;
CREATE TABLE `eb_system_role` (
`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)',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`role_id`) USING BTREE,
KEY `mer_id` (`mer_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COMMENT='身份管理表';
-- ----------------------------
-- Table structure for eb_template_message
-- ----------------------------
DROP TABLE IF EXISTS `eb_template_message`;
CREATE TABLE `eb_template_message` (
`template_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '模板id',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=订阅消息,1=微信模板消息',
`tempkey` char(50) NOT NULL COMMENT '模板编号',
`name` char(100) NOT NULL COMMENT '模板名',
`content` varchar(1000) NOT NULL COMMENT '回复内容',
`tempid` char(100) DEFAULT NULL COMMENT '模板ID',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
`kid` char(100) DEFAULT '0',
PRIMARY KEY (`template_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='微信模板';
-- ----------------------------
-- Table structure for eb_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_user`;
CREATE TABLE `eb_user` (
`uid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
`wechat_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '微信用户 id',
`account` varchar(32) NOT NULL COMMENT '用户账号',
`pwd` varchar(128) NOT NULL COMMENT '用户密码',
`real_name` varchar(25) NOT NULL DEFAULT '' COMMENT '真实姓名',
`sex` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
`birthday` date DEFAULT NULL COMMENT '生日',
`card_id` varchar(20) NOT NULL DEFAULT '' COMMENT '身份证号码',
`mark` varchar(255) NOT NULL DEFAULT '' COMMENT '用户备注',
`label_id` varchar(64) DEFAULT NULL COMMENT '用户标签 id',
`group_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户分组id',
`nickname` varchar(16) NOT NULL COMMENT '用户昵称',
`avatar` varchar(256) NOT NULL COMMENT '用户头像',
`phone` char(15) DEFAULT NULL COMMENT '手机号码',
`addres` varchar(128) DEFAULT NULL COMMENT '地址',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`last_time` timestamp NULL DEFAULT NULL COMMENT '最后一次登录时间',
`last_ip` varchar(16) NOT NULL COMMENT '最后一次登录ip',
`now_money` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户余额',
`brokerage_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '佣金金额',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1为正常,0为禁止',
`spread_uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '推广员id',
`spread_time` timestamp NULL DEFAULT NULL COMMENT '推广员关联时间',
`spread_limit` timestamp NULL DEFAULT NULL COMMENT '推广员到期时间',
`brokerage_level` int(10) unsigned DEFAULT '0' COMMENT '推广员等级',
`user_type` varchar(32) NOT NULL COMMENT '用户类型',
`promoter_time` timestamp NULL DEFAULT NULL COMMENT '成功推广时间',
`is_promoter` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为推广员',
`main_uid` int(10) unsigned DEFAULT '0' COMMENT '主账号',
`pay_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户购买次数',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户消费金额',
`spread_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下级人数',
`spread_pay_count` int(11) unsigned DEFAULT '0' COMMENT '下级订单数',
`spread_pay_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '下级订单金额',
`integral` int(11) unsigned DEFAULT '0' COMMENT '积分',
`member_level` int(11) unsigned DEFAULT '0' COMMENT '免费会员等级',
`member_value` int(11) unsigned DEFAULT '0' COMMENT '免费会员成长值',
`count_start` int(11) unsigned DEFAULT '0' COMMENT '用户获赞数',
`count_fans` int(11) unsigned DEFAULT '0' COMMENT '用户粉丝数',
PRIMARY KEY (`uid`) USING BTREE,
KEY `account` (`account`) USING BTREE,
KEY `spreaduid` (`spread_uid`) USING BTREE,
KEY `wechat_user_id` (`wechat_user_id`) USING BTREE,
KEY `main_uid` (`main_uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9371 DEFAULT CHARSET=utf8 COMMENT='用户表';
-- ----------------------------
-- Table structure for eb_user_address
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_address`;
CREATE TABLE `eb_user_address` (
`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 '收货人所在省',
`province_id` int(10) unsigned DEFAULT '0' COMMENT '省 id',
`city` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在市',
`city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市id',
`district` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在区',
`district_id` int(10) unsigned DEFAULT '0' COMMENT '区域 id',
`street` varchar(64) DEFAULT NULL COMMENT '街/镇',
`street_id` int(10) unsigned DEFAULT '0' COMMENT '街镇 id',
`detail` varchar(256) NOT NULL DEFAULT '' COMMENT '收货人详细地址',
`post_code` int(10) unsigned NOT NULL 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 NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`address_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=466 DEFAULT CHARSET=utf8 COMMENT='用户地址表';
-- ----------------------------
-- Table structure for eb_user_bill
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_bill`;
CREATE TABLE `eb_user_bill` (
`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 COMMENT '账单标题',
`category` varchar(64) NOT NULL COMMENT '明细种类',
`type` varchar(64) NOT NULL DEFAULT '' COMMENT '明细类型',
`number` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '明细数字',
`balance` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '剩余',
`mark` varchar(512) NOT NULL COMMENT '备注',
`mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户 id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 = 待确定 1 = 有效 -1 = 无效',
PRIMARY KEY (`bill_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `create_time` (`create_time`) USING BTREE,
KEY `type` (`category`,`type`,`link_id`) USING BTREE,
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24528 DEFAULT CHARSET=utf8 COMMENT='用户账单表';
-- ----------------------------
-- Table structure for eb_user_brokerage
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_brokerage`;
CREATE TABLE `eb_user_brokerage` (
`user_brokerage_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`brokerage_level` tinyint(3) unsigned NOT NULL COMMENT '等级',
`brokerage_name` varchar(32) NOT NULL COMMENT 'vip 名称',
`brokerage_icon` varchar(128) NOT NULL COMMENT 'vip 图标',
`brokerage_rule` varchar(1500) NOT NULL COMMENT '升级规则',
`user_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'vip 人数',
`extension_one` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金',
`extension_two` decimal(8,2) unsigned NOT NULL COMMENT '二级佣金',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`type` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '默认0分销会员等级,1 免费会员等级',
PRIMARY KEY (`user_brokerage_id`) USING BTREE,
UNIQUE KEY `vip_level` (`brokerage_level`,`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_user_extract
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_extract`;
CREATE TABLE `eb_user_extract` (
`extract_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned DEFAULT '0' COMMENT '用户 id',
`extract_sn` varchar(255) DEFAULT NULL,
`real_name` varchar(64) DEFAULT NULL COMMENT '姓名',
`extract_type` tinyint(1) DEFAULT '0' COMMENT '0 银行卡 1 支付宝 2微信 3 零钱',
`bank_code` varchar(32) DEFAULT '0' COMMENT '银行卡',
`bank_address` varchar(256) DEFAULT '' COMMENT '开户地址',
`alipay_code` varchar(64) DEFAULT '' COMMENT '支付宝账号',
`wechat` varchar(15) DEFAULT NULL COMMENT '微信号',
`extract_pic` varchar(128) DEFAULT NULL COMMENT '收款码',
`extract_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '提现金额',
`balance` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '余额',
`mark` varchar(512) DEFAULT NULL COMMENT '管理员备注',
`admin_id` int(10) DEFAULT '0' COMMENT '审核管理员',
`fail_msg` varchar(128) DEFAULT NULL COMMENT '无效原因',
`status_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '无效时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
`status` tinyint(2) DEFAULT '0' COMMENT '-1 未通过 0 审核中 1 已提现',
PRIMARY KEY (`extract_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=224 DEFAULT CHARSET=utf8 COMMENT='用户提现表';
-- ----------------------------
-- Table structure for eb_user_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_group`;
CREATE TABLE `eb_user_group` (
`group_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`group_name` varchar(64) NOT NULL COMMENT '用户分组名称',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`group_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COMMENT='用户分组表';
-- ----------------------------
-- Table structure for eb_user_history
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_history`;
CREATE TABLE `eb_user_history` (
`user_history_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`res_id` int(11) unsigned DEFAULT NULL COMMENT '历史记录对象的ID',
`res_type` int(11) DEFAULT NULL COMMENT '历史记录类型',
`uid` int(11) DEFAULT NULL,
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` int(11) DEFAULT NULL,
PRIMARY KEY (`user_history_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3163 DEFAULT CHARSET=utf8 COMMENT='浏览记录表';
-- ----------------------------
-- Table structure for eb_user_label
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_label`;
CREATE TABLE `eb_user_label` (
`label_id` int(11) NOT NULL AUTO_INCREMENT,
`label_name` varchar(255) NOT NULL DEFAULT '' COMMENT '标签名称',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0=手动标签 1=自动标签',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`label_id`) USING BTREE,
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=198 DEFAULT CHARSET=utf8 COMMENT='用户标签表';
-- ----------------------------
-- Table structure for eb_user_merchant
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_merchant`;
CREATE TABLE `eb_user_merchant` (
`user_merchant_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL COMMENT '用户 id',
`mer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户 id',
`first_pay_time` timestamp NULL DEFAULT NULL COMMENT '首次消费时间',
`last_pay_time` timestamp NULL DEFAULT NULL COMMENT '最后一次消费时间',
`pay_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '消费次数',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '消费金额',
`label_id` varchar(256) DEFAULT NULL COMMENT '用户标签',
`last_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次访问时间',
`status` tinyint(1) unsigned DEFAULT '1' COMMENT '状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`user_merchant_id`),
UNIQUE KEY `uid` (`uid`,`mer_id`) USING BTREE,
KEY `mer_id` (`mer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=387 DEFAULT CHARSET=utf8 COMMENT='商户用户表';
-- ----------------------------
-- Table structure for eb_user_receipt
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_receipt`;
CREATE TABLE `eb_user_receipt` (
`user_receipt_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`receipt_type` tinyint(1) DEFAULT '0' COMMENT '发票类型:1.普通发票,2.增值税发票',
`receipt_title` varchar(128) DEFAULT '' COMMENT '发票抬头',
`receipt_title_type` varchar(255) DEFAULT '0' COMMENT '发票抬头类型:1.个人,2.企业',
`duty_paragraph` varchar(255) DEFAULT '' COMMENT '税号',
`email` varchar(255) DEFAULT '' COMMENT '邮箱',
`bank_name` varchar(255) DEFAULT '' COMMENT '开户行',
`bank_code` varchar(255) DEFAULT '0' COMMENT '银行账号',
`address` varchar(255) DEFAULT '' COMMENT '企业地址',
`tel` varchar(255) DEFAULT '' COMMENT '企业电话',
`is_default` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否默认',
`uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_del` tinyint(1) DEFAULT '0',
`create_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`user_receipt_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8 COMMENT='用户发票信息';
-- ----------------------------
-- Table structure for eb_user_recharge
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_recharge`;
CREATE TABLE `eb_user_recharge` (
`recharge_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL COMMENT '充值用户UID',
`order_id` varchar(32) NOT NULL COMMENT '订单号',
`price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '充值金额',
`give_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '购买赠送金额',
`recharge_type` varchar(32) NOT NULL COMMENT '充值类型',
`paid` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否充值',
`pay_time` timestamp NULL DEFAULT NULL COMMENT '充值支付时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '充值时间',
`refund_price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '退款金额',
PRIMARY KEY (`recharge_id`) USING BTREE,
UNIQUE KEY `order_id` (`order_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=207 DEFAULT CHARSET=utf8 COMMENT='用户充值表';
-- ----------------------------
-- Table structure for eb_user_relation
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_relation`;
CREATE TABLE `eb_user_relation` (
`uid` int(10) unsigned NOT NULL COMMENT '用户ID',
`type_id` int(10) unsigned NOT NULL COMMENT '类型的 id',
`type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '关联类型(0 普通商品、1秒杀2、预售3、助力4、拼团、10 = 店铺、12=购买过)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
UNIQUE KEY `uid` (`type`,`type_id`,`uid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户记录表';
-- ----------------------------
-- Table structure for eb_user_sign
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_sign`;
CREATE TABLE `eb_user_sign` (
`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 '获得积分',
`integral` int(11) NOT NULL DEFAULT '0' COMMENT '剩余积分',
`sign_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '连续签到天数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`sign_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8 COMMENT='签到记录表';
-- ----------------------------
-- Table structure for eb_user_spread_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_spread_log`;
CREATE TABLE `eb_user_spread_log` (
`user_spread_log_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` int(10) unsigned NOT NULL COMMENT 'uid',
`old_spread_uid` int(10) unsigned NOT NULL COMMENT '原来的推荐人uid',
`spread_uid` int(10) unsigned NOT NULL COMMENT '新的推荐人 uid',
`admin_id` int(10) unsigned NOT NULL COMMENT '修改的管理员',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`user_spread_log_id`),
KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for eb_user_visit
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_visit`;
CREATE TABLE `eb_user_visit` (
`user_visit_id` int(10) NOT NULL AUTO_INCREMENT,
`uid` int(11) DEFAULT NULL COMMENT '用户ID',
`type` varchar(32) NOT NULL COMMENT '记录类型',
`type_id` int(11) NOT NULL DEFAULT '0' COMMENT '商品ID',
`content` varchar(255) DEFAULT NULL COMMENT '备注描述',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`user_visit_id`) USING BTREE,
KEY `uid` (`uid`) USING BTREE,
KEY `type` (`type`,`type_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=241132 DEFAULT CHARSET=utf8 COMMENT='商品浏览分析表';
-- ----------------------------
-- Table structure for eb_wechat_news
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_news`;
CREATE TABLE `eb_wechat_news` (
`wechat_news_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '图文消息管理ID',
`mer_id` int(11) DEFAULT '0' COMMENT '商户id',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`wechat_news_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8 COMMENT='图文消息管理表';
-- ----------------------------
-- Table structure for eb_wechat_qrcode
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_qrcode`;
CREATE TABLE `eb_wechat_qrcode` (
`wechat_qrcode_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信二维码ID',
`third_type` varchar(32) NOT NULL COMMENT '二维码类型',
`third_id` int(11) unsigned NOT NULL COMMENT '类型id',
`ticket` varchar(255) NOT NULL COMMENT '二维码参数',
`expire_seconds` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '二维码有效时间',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '状态',
`url` varchar(255) NOT NULL COMMENT '微信访问url',
`qrcode_url` varchar(255) NOT NULL COMMENT '微信二维码url',
`scan` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '被扫的次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`wechat_qrcode_id`) USING BTREE,
UNIQUE KEY `third_type` (`third_type`,`third_id`) USING BTREE,
KEY `ticket` (`ticket`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信二维码管理表';
-- ----------------------------
-- Table structure for eb_wechat_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_reply`;
CREATE TABLE `eb_wechat_reply` (
`wechat_reply_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信关键字回复id',
`key` varchar(64) NOT NULL COMMENT '关键字',
`type` varchar(32) NOT NULL COMMENT '回复类型',
`data` text NOT NULL COMMENT '回复数据',
`status` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '0=不可用 1 =可用',
`hidden` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否显示',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`wechat_reply_id`) USING BTREE,
UNIQUE KEY `key` (`key`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COMMENT='微信关键字回复表';
-- ----------------------------
-- Table structure for eb_wechat_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_user`;
CREATE TABLE `eb_wechat_user` (
`wechat_user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信用户id',
`unionid` varchar(60) DEFAULT NULL COMMENT '只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段',
`openid` varchar(30) DEFAULT NULL COMMENT '用户的标识,对当前公众号唯一',
`routine_openid` varchar(32) DEFAULT NULL COMMENT '小程序唯一身份ID',
`nickname` varchar(64) NOT NULL COMMENT '用户的昵称',
`headimgurl` varchar(256) NOT NULL COMMENT '用户头像',
`sex` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '用户的性别,值为1时是男性,值为2时是女性,值为0时是未知',
`city` varchar(32) NOT NULL COMMENT '用户所在城市',
`language` varchar(32) NOT NULL COMMENT '用户的语言,简体中文为zh_CN',
`province` varchar(32) NOT NULL COMMENT '用户所在省份',
`country` varchar(32) NOT NULL COMMENT '用户所在国家',
`remark` varchar(256) DEFAULT NULL COMMENT '公众号运营者对粉丝的备注,公众号运营者可在微信公众平台用户管理界面对粉丝添加备注',
`groupid` smallint(5) unsigned DEFAULT '0' COMMENT '用户所在的分组ID(兼容旧的用户分组接口)',
`tagid_list` varchar(256) DEFAULT NULL COMMENT '用户被打上的标签ID列表',
`subscribe` tinyint(3) unsigned DEFAULT '0' COMMENT '用户是否订阅该公众号标识',
`subscribe_time` int(10) unsigned DEFAULT NULL COMMENT '关注公众号时间',
`session_key` varchar(32) DEFAULT NULL COMMENT '小程序用户会话密匙',
`user_type` varchar(32) DEFAULT 'wechat' COMMENT '用户类型',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`wechat_user_id`) USING BTREE,
KEY `groupid` (`groupid`) USING BTREE,
KEY `subscribe_time` (`subscribe_time`) USING BTREE,
KEY `unionid` (`unionid`) USING BTREE,
KEY `routine_openid` (`routine_openid`) USING BTREE,
KEY `openid` (`openid`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9015 DEFAULT CHARSET=utf8 COMMENT='微信用户表';
```
- 序言
- 系统简介
- 系统介绍
- 前端脑图
- 项目介绍
- 新手入门(源码安装)
- 运行环境
- 服务器配置及安装
- 视频安装教程
- 服务器及环境搭建
- 服务器购买
- 域名购买
- 域名解析
- 服务器配置
- 宝塔配置
- 创建站点
- 安装项目
- 1.源码上传(必看内容)
- 2.PHP扩展安装
- 3.环境配置
- 4.运行服务
- 5.一键安装
- 注意事项(很重要)
- 重启swoole服务
- linux安装swoole方法
- 特别注意事项
- mysql 5.7注意事项
- https域名
- ssl证书申请
- 公众号配置
- 公众号配置
- 公众号开发配置
- 公众号菜单
- 设置公众号菜单
- 关键字
- 跳转网页
- 跳转小程序
- 小程序配置
- 1.微信平台配置
- 2.CRMEB后台配置
- 3.前端提交审核
- 4.确认发布
- 支付配置
- 支付配置
- 公众号支付
- 小程序支付
- 支付宝支付
- 其他配置
- 公众号模板消息
- 小程序订阅消息
- 商业授权
- 授权说明
- 申请授权
- 安装常见问题汇总
- 请修改sql_mode文件为NO_AUTO提示
- 版本更新
- 客服设置
- uni-app 打包H5、公众号
- 版本更新
- 清空数据
- 测试域名
- 部署多套多商户
- 使用说明
- 商品分类
- 分类说明
- 分类管理
- 品牌分类
- 商品标签
- 商品管理
- 发布商品
- 商品规格
- 配置说明
- 文件上传
- 移动端展示说明
- 首页
- 分类页
- 个人中心
- 热门搜索
- 分销规则
- 分销配置
- 分销员管理
- 分销规则说明
- 分销员等级
- 分销礼包
- 佣金说明
- 用户管理
- 商户用户管理
- 平台用户管理
- 用户协议
- 用户搜索记录
- 秒杀
- 秒杀规则
- 开启秒杀活动
- 直播
- 主播实名认证
- 开启直播
- 添加直播商品
- 预售
- 开启全款预售
- 开启定金预售
- 预售协议
- 专题
- 后台配置
- 前端展示
- 助力
- 开启助力
- 查看助力活动
- 拼团
- 虚拟拼团设置
- 开启拼团
- 查看拼团活动
- 积分
- 积分设置
- 积分来源
- 积分使用
- 提现
- 提现规则
- 提现步骤
- 新闻资讯
- 新闻页面
- 发布资讯
- 账户管理
- 账号信息
- 账户资金
- 优惠券
- 添加优惠券
- 发布优惠券
- 领取及使用
- 发放优惠券
- 订单管理
- 后台订单处理
- 前端订单处理
- 订单退款
- 订单打印
- 客服管理
- 添加客服
- 客服权限
- 门店自提
- 开启门店自提
- 设置核销权限
- 订单核销说明
- 商户管理
- 商户分类
- 商户入驻
- 商户列表
- 商户菜单管理
- 店铺类型
- 财务
- 财务对账
- 发票管理
- 自动分账(v1.5及以后版本)
- 邮费说明
- 运费设置
- 运费组成
- 运费模板
- 物流配置
- 公告管理
- 店铺相关
- 店铺定位设置
- 店铺街入口
- 店铺活动
- 店铺基本信息设置
- 小票打印
- 小票打印机配置
- 小票打印机设置
- 技术文档
- 开发规范
- 数据字典
- 目录结构
- 移动端路由
- 系统配置
- 后台表单说明
- 短信设置
- 短信账户
- 短信配置
- 短信模板
- 一号通
- 电子面单
- 短信提醒
- 商品采集
- 物流查询
- 付费采集商品配置
- PC端展示说明
- PC端开启
- PC端平台页面配置
- PC端店铺页面配置
- 保障服务
- 移动端商品管理
- 开启移动端商品管理
- 功能说明
- 会员管理
- 会员管理
- 会员权益
- 会员配置
- 社区功能
- 社区分类
- 社区话题
- 社区文章
- 社区评论
- 社区配置
- 通知管理
- 移动前端
- 目录结构
- 配置说明
- 页面路径
- 后台前端说明
- 总后台目录结构
- 商户后台目录结构
- 开发和构建
- APP 打包
- 基础配置
- 开发调试
- 打包上线
- App打包
- PC端说明
- 安装教程
- 目录结构
- 打包教程
- 常见问题
- 服务器问题
- 服务器环境说明
- MySQL 5.7注意事项
- PHP fileinfo扩展安装
- 后台登录页幻灯片
- 后台登录页logo
- 论坛常见问题汇总
- 个人中心菜单加链接
- 子账号登录名
- 前后端分离配置
- 重启swoole进程
- 开论坛勋章
- 源码下载地址
- 查看/隐藏版本号
- 搜索商品后服务挂了
- 开发文档
- 架构
- config配置文件
- 容器和依赖注入
- 异常处理
- 路由
- 控制器模块
- 日志处理
- 自定义指令
- CRMEB类库
- Basic基类
- Exceptions异常处理
- Interfaces接口类
- Jobs消息队列
- services服务类
- traits
- listens定时监听类
- 接口流程
- Controller
- Repository
- Dao
- Model
- 流程
- 订单流程
- 下单流程
- 退款流程
- 二开教程
- 定义新的接口
- 创建新的页面
- 创建新的组合数据
- 更换短信模板