~~~[sql] CREATE TABLE `eb_article` ( `article_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章管理ID', `cid` int(11) unsigned DEFAULT '0' COMMENT '分类id', `title` varchar(64) NOT NULL COMMENT '文章标题', `author` varchar(32) DEFAULT NULL COMMENT '文章作者', `image_input` varchar(128) NOT NULL COMMENT '文章图片', `synopsis` varchar(128) DEFAULT NULL COMMENT '文章简介', `visit` varchar(255) DEFAULT NULL COMMENT '浏览次数', `sort` int(10) unsigned DEFAULT '0' COMMENT '排序', `url` varchar(128) DEFAULT NULL COMMENT '原文链接', `admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '管理员id', `mer_id` int(10) unsigned DEFAULT '0' COMMENT '商户id', `is_hot` tinyint(1) unsigned DEFAULT '0' COMMENT '是否热门(小程序)', `is_banner` tinyint(1) unsigned DEFAULT '0' COMMENT '是否轮播图(小程序)', `status` tinyint(1) unsigned DEFAULT NULL COMMENT '状态', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间', `wechat_news_id` int(11) DEFAULT '0' COMMENT '微信图文id', PRIMARY KEY (`article_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=149 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=16 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_cache -- ---------------------------- DROP TABLE IF EXISTS `eb_cache`; CREATE TABLE `eb_cache` ( `key` varchar(32) NOT NULL, `expire_time` int(11) NOT NULL DEFAULT '0' COMMENT '0=永久', `result` text NOT NULL COMMENT '缓存数据', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '缓存时间', PRIMARY KEY (`key`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信缓存表'; -- ---------------------------- -- Table structure for eb_express -- ---------------------------- DROP TABLE IF EXISTS `eb_express`; CREATE TABLE `eb_express` ( `id` mediumint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '快递公司id', `code` varchar(50) NOT NULL COMMENT '快递公司简称', `name` varchar(50) NOT NULL COMMENT '快递公司全称', `sort` int(11) NOT NULL COMMENT '排序', `is_show` tinyint(1) NOT NULL COMMENT '是否显示', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `code` (`code`) USING BTREE, KEY `is_show` (`is_show`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=430 DEFAULT CHARSET=utf8 COMMENT='快递公司表'; -- ---------------------------- -- Table structure for eb_feedback -- ---------------------------- DROP TABLE IF EXISTS `eb_feedback`; CREATE TABLE `eb_feedback` ( `feedback_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `uid` int(10) unsigned NOT NULL DEFAULT '0', `type` varchar(255) NOT NULL, `content` varchar(512) NOT NULL, `images` varchar(512) DEFAULT NULL, `realname` varchar(24) NOT NULL COMMENT '姓名', `contact` varchar(32) NOT NULL COMMENT '联系方式', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `status` tinyint(1) DEFAULT '0' COMMENT '状态', `reply` varchar(255) DEFAULT NULL COMMENT '回复,最终给用户的回复内容', `remake` varchar(255) DEFAULT NULL COMMENT '备注,后台人员自己查看用', `is_del` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`feedback_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for eb_feedback_category -- ---------------------------- DROP TABLE IF EXISTS `eb_feedback_category`; CREATE TABLE `eb_feedback_category` ( `feedback_category_id` mediumint(11) NOT NULL AUTO_INCREMENT COMMENT '商品分类表ID', `pid` mediumint(11) NOT NULL COMMENT '父id', `cate_name` varchar(100) NOT NULL COMMENT '分类名称', `path` varchar(255) NOT NULL DEFAULT '' COMMENT '路径', `sort` mediumint(11) NOT NULL COMMENT '排序', `pic` varchar(128) NOT NULL DEFAULT '' COMMENT '图标', `is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否显示', `level` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '等级', `mer_id` int(11) unsigned DEFAULT '0' COMMENT '商户id', `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间', PRIMARY KEY (`feedback_category_id`) USING BTREE, KEY `pid` (`pid`) USING BTREE, KEY `sort` (`sort`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8 COMMENT='商品分类表'; -- ---------------------------- -- Table structure for eb_merchant -- ---------------------------- DROP TABLE IF EXISTS `eb_merchant`; CREATE TABLE `eb_merchant` ( `mer_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商户id', `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商户分类 id', `mer_name` varchar(32) NOT NULL COMMENT '商户名称', `real_name` varchar(32) NOT NULL COMMENT '商户姓名', `mer_phone` varchar(13) NOT NULL COMMENT '商户手机号', `mer_address` varchar(64) NOT NULL COMMENT '商户地址', `mer_keyword` varchar(64) NOT NULL COMMENT '商户关键字', `mer_avatar` varchar(128) DEFAULT NULL COMMENT '商户头像', `mer_banner` varchar(128) DEFAULT NULL COMMENT '商户banner图片', `sales` int(11) unsigned DEFAULT '0' COMMENT '销量', `product_score` decimal(11,1) DEFAULT '5.0' COMMENT '商品描述评分', `service_score` decimal(11,1) DEFAULT '5.0' COMMENT '服务评分', `postage_score` decimal(11,1) DEFAULT '5.0' COMMENT '物流评分', `mark` varchar(256) NOT NULL COMMENT '商户备注', `reg_admin_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总后台管理员ID', `sort` int(10) unsigned NOT NULL DEFAULT '0', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '商户是否禁用0锁定,1正常', `commission_rate` decimal(11,4) DEFAULT NULL COMMENT '提成比例', `is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未删除1删除', `is_audit` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '添加的产品是否审核0不审核1审核', `is_best` 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 '关注总数', PRIMARY KEY (`mer_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=64 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=71 DEFAULT CHARSET=utf8 COMMENT='商户管理员表'; -- ---------------------------- -- Table structure for eb_merchant_category -- ---------------------------- DROP TABLE IF EXISTS `eb_merchant_category`; CREATE TABLE `eb_merchant_category` ( `merchant_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '商户分类 id', `commission_rate` decimal(6,4) unsigned NOT NULL DEFAULT '0.0000' COMMENT '手续费', `category_name` varchar(32) NOT NULL COMMENT '商户分类名称', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间', PRIMARY KEY (`merchant_category_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COMMENT='商户分类表'; -- ---------------------------- -- Table structure for eb_merchant_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 '对账总金额', `refund_price` decimal(10,2) NOT NULL COMMENT '退款单金额', `order_extension` decimal(10,0) NOT NULL COMMENT '订单佣金', `refund_extension` decimal(10,0) NOT NULL COMMENT '退款单佣金', `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`), KEY `mer_id` (`mer_id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 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_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=3 DEFAULT CHARSET=utf8 COMMENT='小程序二维码管理表'; -- ---------------------------- -- Table structure for eb_shipping_template -- ---------------------------- DROP TABLE IF EXISTS `eb_shipping_template`; CREATE TABLE `eb_shipping_template` ( `shipping_template_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', `name` varchar(255) NOT NULL COMMENT '模板名称', `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '计费方式 0=数量 1=重量 2=体积', `appoint` tinyint(1) NOT NULL DEFAULT '0' COMMENT '开启指定包邮', `undelivery` tinyint(1) NOT NULL DEFAULT '0' COMMENT '开启指定区域不配送', `mer_id` int(10) unsigned NOT NULL COMMENT '商户 id', `is_default` tinyint(1) unsigned DEFAULT '0' COMMENT '默认模板', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间', PRIMARY KEY (`shipping_template_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=96 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) NOT NULL AUTO_INCREMENT COMMENT '编号', `temp_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板ID', `city_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '城市ID /id/id/id/id/', `number` int(10) NOT NULL DEFAULT '0' COMMENT '包邮件数', `price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '包邮金额', PRIMARY KEY (`shipping_template_free_id`) USING BTREE, KEY `mer_id` (`temp_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=84 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) NOT NULL AUTO_INCREMENT COMMENT '编号', `temp_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板ID', `city_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '城市ID /id/id/id/', `first` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '首件', `first_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '首件运费', `continue` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '续件', `continue_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '续件运费', PRIMARY KEY (`shipping_template_region_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=385 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) NOT NULL AUTO_INCREMENT COMMENT '编号', `temp_id` int(11) NOT NULL DEFAULT '0' COMMENT '模板ID', `city_id` varchar(200) NOT NULL DEFAULT '0' COMMENT '城市ID /id/id/id/', PRIMARY KEY (`shipping_template_undelivery_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=79 DEFAULT CHARSET=utf8 COMMENT='指定不配送区域表'; -- ---------------------------- -- Table structure for eb_sms_record -- ---------------------------- DROP TABLE IF EXISTS `eb_sms_record`; CREATE TABLE `eb_sms_record` ( `sms_record_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '短信发送记录编号', `uid` varchar(255) NOT NULL COMMENT '短信平台账号', `phone` char(11) NOT NULL COMMENT '接受短信的手机号', `content` text NOT NULL COMMENT '短信内容', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发送短信时间', `ip` varchar(16) NOT NULL DEFAULT '' COMMENT '添加记录ip', `template` varchar(255) NOT NULL COMMENT '短信模板ID', `resultcode` int(6) unsigned DEFAULT NULL COMMENT '状态码 100=成功,130=失败,131=空号,132=停机,133=关机,134=无状态', `record_id` int(11) unsigned NOT NULL COMMENT '发送记录id', PRIMARY KEY (`sms_record_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='短信发送记录表'; -- ---------------------------- -- Table structure for eb_store_attr_template -- ---------------------------- DROP TABLE IF EXISTS `eb_store_attr_template`; CREATE TABLE `eb_store_attr_template` ( `attr_template_id` int(10) NOT NULL AUTO_INCREMENT, `template_name` varchar(32) NOT NULL COMMENT '规格名称', `template_value` text NOT NULL COMMENT '规格值', `mer_id` int(11) NOT NULL COMMENT '商户 id', PRIMARY KEY (`attr_template_id`) USING BTREE, KEY `mer_id` (`mer_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=28 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=120 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=151 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=普通产品', `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 '添加时间', `is_pay` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 = 未购买 1 = 已购买', `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除', `is_new` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为立即购买', `is_fail` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否失效', PRIMARY KEY (`cart_id`) USING BTREE, KEY `user_id` (`uid`) USING BTREE, KEY `product_id` (`product_id`) USING BTREE, KEY `mer_id` (`mer_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=878 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=169 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=99 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 '领取时间', UNIQUE 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_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:买赠送)', `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 ) ENGINE=InnoDB AUTO_INCREMENT=2760 DEFAULT CHARSET=utf8 COMMENT='优惠券发放记录表'; -- ---------------------------- -- Table structure for eb_store_group_order -- ---------------------------- DROP TABLE IF EXISTS `eb_store_group_order`; CREATE TABLE `eb_store_group_order` ( `group_order_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `group_order_sn` varchar(32) NOT NULL COMMENT '订单号', `uid` int(10) unsigned NOT NULL COMMENT '用户 ID', `total_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费', `total_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总额', `total_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品数', `coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠金额', `real_name` varchar(32) NOT NULL COMMENT '联系人', `user_phone` varchar(18) NOT NULL COMMENT '联系电话', `user_address` varchar(128) NOT NULL COMMENT '收货地址', `pay_price` decimal(8,2) unsigned NOT NULL COMMENT '支付金额', `pay_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付邮费', `cost` decimal(8,2) unsigned NOT NULL COMMENT '成本价', `give_coupon_ids` varchar(500) DEFAULT '' COMMENT '赠送优惠券', `paid` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否支付', `pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间', `pay_type` tinyint(1) NOT NULL COMMENT '支付方式 0=余额 1=微信 2=小程序 3=h5', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `is_remind` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否提醒', `is_del` tinyint(3) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`group_order_id`) USING BTREE, UNIQUE KEY `group_order_id` (`group_order_sn`) USING BTREE, KEY `uid` (`uid`) USING BTREE, KEY `paid` (`paid`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for eb_store_order -- ---------------------------- DROP TABLE IF EXISTS `eb_store_order`; CREATE TABLE `eb_store_order` ( `order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID', `group_order_id` int(11) DEFAULT NULL COMMENT '订单组 id', `order_sn` varchar(32) NOT NULL COMMENT '订单号', `uid` int(11) unsigned NOT NULL COMMENT '用户id', `real_name` varchar(32) NOT NULL COMMENT '用户姓名', `user_phone` varchar(18) NOT NULL COMMENT '用户电话', `user_address` varchar(128) NOT NULL COMMENT '详细地址', `cart_id` varchar(256) NOT NULL COMMENT '购物车id', `total_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单商品总数', `total_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单总价', `total_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '邮费', `pay_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际支付金额', `pay_postage` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '支付邮费', `extension_one` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金', `extension_two` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金', `coupon_id` varchar(128) NOT NULL DEFAULT '' COMMENT '优惠券id', `coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券金额', `paid` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '支付状态', `pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间', `pay_type` tinyint(1) NOT NULL COMMENT '支付方式 0余额 1微信 2小程序', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态(0:待发货;1:待收货;2:待评价;3:已完成;-1:已退款)', `delivery_type` varchar(32) DEFAULT NULL COMMENT '发货类型(1:发货 2: 送货 3: 虚拟)', `delivery_name` varchar(64) DEFAULT NULL COMMENT '快递名称/送货人姓名', `delivery_id` varchar(64) DEFAULT NULL COMMENT '快递单号/手机号', `mark` varchar(512) NOT NULL COMMENT '备注', `remark` varchar(512) DEFAULT NULL COMMENT '管理员备注', `admin_mark` varchar(512) DEFAULT NULL COMMENT '总后台备注', `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 ) ENGINE=InnoDB AUTO_INCREMENT=99 DEFAULT CHARSET=utf8 COMMENT='订单表'; -- ---------------------------- -- Table structure for eb_store_order_product -- ---------------------------- DROP TABLE IF EXISTS `eb_store_order_product`; CREATE TABLE `eb_store_order_product` ( `order_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单产品 id', `order_id` int(11) unsigned NOT NULL COMMENT '订单id', `uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '用户 id', `cart_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '购物车id', `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `extension_one` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '一级佣金', `extension_two` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '二级佣金', `product_sku` char(12) NOT NULL COMMENT '商品 sku', `is_refund` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否退款 0:未退款 1:退款中 2:部分退款 3=全退', `product_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '购买数量', `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`), KEY `product_id` (`product_id`) USING BTREE, KEY `oid` (`order_id`) USING BTREE, KEY `uid` (`uid`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=101 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', `image` varchar(256) NOT NULL COMMENT '商品图片', `slider_image` varchar(2000) NOT NULL COMMENT '轮播图', `store_name` varchar(128) NOT NULL COMMENT '商品名称', `store_info` varchar(256) NOT NULL COMMENT '商品简介', `keyword` varchar(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 '是否删除', `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 '是否优品推荐', `ficti` mediumint(11) DEFAULT '100' 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(10,0) DEFAULT '5' COMMENT '评价分数', `reply_count` int(11) unsigned DEFAULT '0' COMMENT '评论数', `mer_status` tinyint(1) DEFAULT '1' COMMENT '商铺状态是否 1.正常 0. 非正常', `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 '添加时间', 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=218 DEFAULT CHARSET=utf8 COMMENT='商品表'; -- ---------------------------- -- Table structure for eb_store_product_attr -- ---------------------------- DROP TABLE IF EXISTS `eb_store_product_attr`; CREATE TABLE `eb_store_product_attr` ( `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID', `attr_name` varchar(32) NOT NULL COMMENT '属性名', `attr_values` varchar(256) 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(255) 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,0) DEFAULT '0' COMMENT '一级佣金', `extension_two` decimal(8,0) DEFAULT '0' COMMENT '二级佣金', `unique` char(12) NOT NULL DEFAULT '' COMMENT '唯一值', KEY `store_id` (`product_id`,`sku`) USING BTREE, KEY `unique` (`unique`,`sku`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商品属性值表'; -- ---------------------------- -- Table structure for eb_store_product_cate -- ---------------------------- DROP TABLE IF EXISTS `eb_store_product_cate`; CREATE TABLE `eb_store_product_cate` ( `product_id` int(11) DEFAULT NULL, `mer_cate_id` int(11) DEFAULT NULL, `mer_id` int(11) DEFAULT NULL, KEY `mer_id` (`mer_id`,`mer_cate_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for eb_store_product_content -- ---------------------------- DROP TABLE IF EXISTS `eb_store_product_content`; CREATE TABLE `eb_store_product_content` ( `product_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品id', `content` longtext NOT NULL COMMENT '商品详情', `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '商品类型 0=普通', PRIMARY KEY (`product_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=218 DEFAULT CHARSET=utf8 COMMENT='商品详情表'; -- ---------------------------- -- Table structure for eb_store_product_reply -- ---------------------------- DROP TABLE IF EXISTS `eb_store_product_reply`; CREATE TABLE `eb_store_product_reply` ( `reply_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '评论ID', `uid` int(11) NOT NULL COMMENT '用户ID', `mer_id` int(10) unsigned NOT NULL COMMENT '商户 id', `order_product_id` int(11) NOT NULL COMMENT '订单商品ID', `unique` char(12) DEFAULT NULL COMMENT '商品 sku', `product_id` int(11) NOT NULL COMMENT '商品id', `product_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0=普通商品', `product_score` tinyint(1) NOT NULL COMMENT '商品分数', `service_score` tinyint(1) NOT NULL COMMENT '服务分数', `postage_score` tinyint(1) NOT NULL COMMENT '物流分数', `rate` float(2,1) DEFAULT '5.0' COMMENT '平均值', `comment` varchar(512) NOT NULL COMMENT '评论内容', `pics` text NOT NULL COMMENT '评论图片', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '评论时间', `merchant_reply_content` varchar(300) DEFAULT NULL COMMENT '管理员回复内容', `merchant_reply_time` timestamp NULL DEFAULT NULL COMMENT '管理员回复时间', `is_del` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '0未删除1已删除', `is_reply` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未回复1已回复', `is_virtual` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0不是虚拟评价1是虚拟评价', `nickname` varchar(64) NOT NULL COMMENT '用户名称', `avatar` varchar(255) NOT NULL COMMENT '用户头像', PRIMARY KEY (`reply_id`) USING BTREE, UNIQUE KEY `order_id` (`order_product_id`,`unique`) USING BTREE, KEY `uid` (`uid`) USING BTREE, KEY `product_id` (`product_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=46 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 '退还二级佣金', `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 '商户备注', `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`), UNIQUE KEY `refund_order_sn` (`refund_order_sn`), KEY `oid` (`order_id`) USING BTREE, KEY `uid` (`uid`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=11 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`), KEY `refund_order_id` (`refund_order_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=73 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_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 '是否展示统计管理', `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=12 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:是;)', `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`) ) ENGINE=InnoDB AUTO_INCREMENT=249 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=18 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 ) ENGINE=InnoDB AUTO_INCREMENT=276 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=16 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 '规则', `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=284 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=52 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(500) 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=160 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=82 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=263 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=110358 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=678 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='菜单表'; -- ---------------------------- -- 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` varchar(512) 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=12 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 '状态', PRIMARY KEY (`template_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT 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 '推广员关联时间', `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 '下级人数', 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`) ) ENGINE=InnoDB AUTO_INCREMENT=7245 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 '收货人所在省', `city` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在市', `city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市id', `district` varchar(64) NOT NULL DEFAULT '' COMMENT '收货人所在区', `detail` varchar(256) NOT NULL DEFAULT '' COMMENT '收货人详细地址', `post_code` int(10) 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=100 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 '备注', `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 ) ENGINE=InnoDB AUTO_INCREMENT=3283 DEFAULT CHARSET=utf8 COMMENT='用户账单表'; -- ---------------------------- -- 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', `real_name` varchar(64) DEFAULT NULL COMMENT '姓名', `extract_type` tinyint(1) DEFAULT '0' COMMENT '0 银行卡 1 支付宝 2微信', `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=34 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=11 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 '标签名称', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`label_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=4 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=34 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 = 普通商品、10 = 店铺)', `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_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=1573 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=76 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=23 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(30) 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=7219 DEFAULT CHARSET=utf8 COMMENT='微信用户表'; ~~~