/*
 Navicat Premium Data Transfer

 Source Server         : nftmeta_test
 Source Server Type    : MySQL
 Source Server Version : 80031
 Source Host           : 43.139.12.226:3306
 Source Schema         : nft

 Target Server Type    : MySQL
 Target Server Version : 80031
 File Encoding         : 65001

 Date: 07/11/2023 10:21:42
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for a_platform_info
-- ----------------------------
DROP TABLE IF EXISTS `a_platform_info`;
CREATE TABLE `a_platform_info`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '平台名称',
  `code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '平台简介',
  `security_key` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '平台密钥',
  `creation_time` timestamp NULL DEFAULT NULL,
  `deleted` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '鉴权中心 平台信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eb_activity
-- ----------------------------
DROP TABLE IF EXISTS `eb_activity`;
CREATE TABLE `eb_activity`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '活动标题',
  `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '活动详情',
  `status` tinyint NULL DEFAULT 1 COMMENT '0 禁用 1 启用',
  `background` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '背景图',
  `award` int NULL DEFAULT NULL COMMENT '奖励积分',
  `start_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint NULL DEFAULT 0,
  `store_product_id` int NULL DEFAULT NULL COMMENT '商品ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '积分商城活动表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eb_article
-- ----------------------------
DROP TABLE IF EXISTS `eb_article`;
CREATE TABLE `eb_article`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '文章管理ID',
  `cid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分类id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文章标题',
  `author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章作者',
  `image_input` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文章图片',
  `synopsis` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章简介',
  `share_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章分享标题',
  `share_synopsis` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文章分享简介',
  `visit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '浏览次数',
  `sort` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '原文链接',
  `media_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信素材id',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态',
  `hide` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否隐藏',
  `admin_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '管理员id',
  `mer_id` int UNSIGNED NULL DEFAULT 0 COMMENT '商户id',
  `product_id` int NOT NULL DEFAULT 0 COMMENT '商品关联id',
  `is_hot` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否热门(小程序)',
  `is_banner` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否轮播图(小程序)',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文章内容',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文章管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_category
-- ----------------------------
DROP TABLE IF EXISTS `eb_category`;
CREATE TABLE `eb_category`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级ID',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '/0/' COMMENT '路径',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名称',
  `type` smallint NULL DEFAULT 1 COMMENT '类型，1 产品分类，2 附件分类，3 文章分类， 4 设置分类， 5 菜单分类，6 配置分类， 7 秒杀配置',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址',
  `extra` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '扩展字段 Jsos格式',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态, 1正常，0失效',
  `sort` int NOT NULL DEFAULT 99999 COMMENT '排序',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status+pid`(`pid` ASC, `status` ASC) USING BTREE,
  INDEX `id+status+url`(`path` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 744 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分类表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_express
-- ----------------------------
DROP TABLE IF EXISTS `eb_express`;
CREATE TABLE `eb_express`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '快递公司id',
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '快递公司简称',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '快递公司全称',
  `partner_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否需要月结账号',
  `partner_key` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否需要月结密码',
  `net` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否需要取件网店',
  `account` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '账号',
  `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '密码',
  `net_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '网点名称',
  `sort` int NOT NULL DEFAULT 0 COMMENT '排序',
  `is_show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否可用',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `code`(`code` ASC) USING BTREE,
  INDEX `is_show`(`is_show` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1638 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '快递公司表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_shipping_templates
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_templates`;
CREATE TABLE `eb_shipping_templates`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模板名称',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '计费方式',
  `appoint` tinyint(1) NOT NULL DEFAULT 0 COMMENT '指定包邮',
  `sort` int NOT NULL DEFAULT 0 COMMENT '排序',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '运费模板' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_shipping_templates_free
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_templates_free`;
CREATE TABLE `eb_shipping_templates_free`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `temp_id` int NOT NULL DEFAULT 0 COMMENT '模板ID',
  `city_id` int NOT NULL DEFAULT 0 COMMENT '城市ID',
  `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '描述',
  `number` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '包邮件数',
  `price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '包邮金额',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '计费方式',
  `uniqid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分组唯一值',
  `status` tinyint(1) NULL DEFAULT 0 COMMENT '是否无效',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 130 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '运费模板包邮' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_shipping_templates_region
-- ----------------------------
DROP TABLE IF EXISTS `eb_shipping_templates_region`;
CREATE TABLE `eb_shipping_templates_region`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `temp_id` int NOT NULL DEFAULT 0 COMMENT '模板ID',
  `city_id` int NOT NULL DEFAULT 0 COMMENT '城市ID',
  `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '描述',
  `first` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '首件',
  `first_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '首件运费',
  `renewal` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '续件',
  `renewal_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '续件运费',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '计费方式 1按件数 2按重量 3按体积',
  `uniqid` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分组唯一值',
  `status` tinyint(1) NULL DEFAULT 0 COMMENT '是否无效',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11322 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '运费模板指定区域费用' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_sms_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_sms_record`;
CREATE TABLE `eb_sms_record`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '短信发送记录编号',
  `uid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '短信平台账号',
  `phone` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '接受短信的手机号',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '短信内容',
  `add_ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '添加记录ip',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `template` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '短信模板ID',
  `resultcode` int UNSIGNED NULL DEFAULT NULL COMMENT '状态码 100=成功,130=失败,131=空号,132=停机,133=关机,134=无状态',
  `record_id` int UNSIGNED NULL DEFAULT NULL COMMENT '发送记录id',
  `memo` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '短信平台返回信息',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短信发送记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_sms_template
-- ----------------------------
DROP TABLE IF EXISTS `eb_sms_template`;
CREATE TABLE `eb_sms_template`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `temp_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '短信模板id',
  `temp_type` tinyint NOT NULL DEFAULT 1 COMMENT '模板类型',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '模板说明',
  `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '类型',
  `temp_key` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '模板编号',
  `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态',
  `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '短息内容',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 572 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短信模板表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_bargain
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_bargain`;
CREATE TABLE `eb_store_bargain`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '砍价商品ID',
  `product_id` int UNSIGNED NOT NULL COMMENT '关联商品ID',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '砍价活动名称',
  `image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '砍价活动图片',
  `unit_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位名称',
  `stock` int UNSIGNED NULL DEFAULT NULL COMMENT '库存',
  `sales` int UNSIGNED NULL DEFAULT NULL COMMENT '销量',
  `images` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '砍价商品轮播图',
  `start_time` bigint UNSIGNED NOT NULL COMMENT '砍价开启时间',
  `stop_time` bigint UNSIGNED NOT NULL COMMENT '砍价结束时间',
  `store_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '砍价商品名称',
  `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍价金额',
  `min_price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍价商品最低价',
  `num` int UNSIGNED NULL DEFAULT NULL COMMENT '购买数量限制——单个活动每个用户发起砍价次数限制',
  `bargain_max_price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '用户每次砍价的最大金额',
  `bargain_min_price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '用户每次砍价的最小金额',
  `bargain_num` int UNSIGNED NOT NULL DEFAULT 1 COMMENT '帮砍次数——单个商品用户可以帮砍的次数',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '砍价状态 0(到砍价时间不自动开启)  1(到砍价时间自动开启时间)',
  `give_integral` int NULL DEFAULT 0 COMMENT '反多少积分',
  `info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '砍价活动简介',
  `cost` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '成本价',
  `sort` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `is_hot` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否推荐0不推荐1推荐',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除 0未删除 1删除',
  `add_time` bigint UNSIGNED NULL DEFAULT NULL COMMENT '添加时间',
  `is_postage` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否包邮 0不包邮 1包邮',
  `postage` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '邮费',
  `rule` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '砍价规则',
  `look` int UNSIGNED NULL DEFAULT 0 COMMENT '砍价商品浏览量',
  `share` int UNSIGNED NULL DEFAULT 0 COMMENT '砍价商品分享量',
  `temp_id` int NULL DEFAULT NULL COMMENT '运费模板ID',
  `weight` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '重量',
  `volume` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '体积',
  `quota` int NOT NULL DEFAULT 0 COMMENT '限购总数',
  `quota_show` int NOT NULL DEFAULT 0 COMMENT '限量总数显示',
  `people_num` int NULL DEFAULT NULL COMMENT '砍价人数——需要多少人砍价成功',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '砍价表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_bargain_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_bargain_user`;
CREATE TABLE `eb_store_bargain_user`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户参与砍价表ID',
  `uid` int UNSIGNED NULL DEFAULT NULL COMMENT '用户ID',
  `bargain_id` int UNSIGNED NULL DEFAULT NULL COMMENT '砍价商品id',
  `bargain_price_min` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍价的最低价',
  `bargain_price` decimal(8, 2) NULL DEFAULT NULL COMMENT '砍价金额',
  `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '砍掉的价格',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态 1参与中 2 活动结束参与失败 3活动结束参与成功',
  `add_time` bigint UNSIGNED NULL DEFAULT NULL COMMENT '参与时间',
  `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否取消',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户参与砍价表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_bargain_user_help
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_bargain_user_help`;
CREATE TABLE `eb_store_bargain_user_help`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '砍价用户帮助表ID',
  `uid` int UNSIGNED NULL DEFAULT NULL COMMENT '帮助的用户id',
  `bargain_id` int UNSIGNED NULL DEFAULT NULL COMMENT '砍价商品ID',
  `bargain_user_id` int UNSIGNED NULL DEFAULT NULL COMMENT '用户参与砍价表id',
  `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '帮助砍价多少金额',
  `add_time` bigint UNSIGNED NULL DEFAULT NULL COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '砍价用户帮助表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_cart
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_cart`;
CREATE TABLE `eb_store_cart`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '购物车表ID',
  `uid` int UNSIGNED NOT NULL COMMENT '用户ID',
  `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型',
  `product_id` int UNSIGNED NOT NULL COMMENT '商品ID',
  `product_attr_unique` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品属性',
  `cart_num` smallint UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品数量',
  `is_new` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为立即购买',
  `combination_id` int UNSIGNED NULL DEFAULT 0 COMMENT '拼团id',
  `seckill_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '秒杀商品ID',
  `bargain_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '砍价id',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NULL DEFAULT NULL COMMENT 'g',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '购物车状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`uid` ASC) USING BTREE,
  INDEX `goods_id`(`product_id` ASC) USING BTREE,
  INDEX `uid`(`uid` ASC) USING BTREE,
  INDEX `uid_2`(`uid` ASC) USING BTREE,
  INDEX `uid_3`(`uid` ASC, `is_new` ASC) USING BTREE,
  INDEX `type`(`type` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '购物车表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_combination
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_combination`;
CREATE TABLE `eb_store_combination`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '拼团商品ID',
  `product_id` int UNSIGNED NOT NULL COMMENT '商品id',
  `mer_id` int UNSIGNED NULL DEFAULT 0 COMMENT '商户id',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '推荐图',
  `images` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动标题',
  `attr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动属性',
  `people` int UNSIGNED NOT NULL COMMENT '参团人数',
  `info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '简介',
  `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '价格',
  `sort` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `sales` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
  `stock` int UNSIGNED NOT NULL COMMENT '库存',
  `add_time` bigint NOT NULL COMMENT '添加时间',
  `is_host` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '推荐',
  `is_show` tinyint UNSIGNED NOT NULL COMMENT '商品状态',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0,
  `combination` tinyint UNSIGNED NULL DEFAULT 1,
  `mer_use` tinyint UNSIGNED NULL DEFAULT NULL COMMENT '商户是否可用1可用0不可用',
  `is_postage` tinyint UNSIGNED NULL DEFAULT NULL COMMENT '是否包邮1是0否',
  `postage` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '邮费',
  `start_time` bigint UNSIGNED NOT NULL COMMENT '拼团开始时间',
  `stop_time` bigint UNSIGNED NOT NULL COMMENT '拼团结束时间',
  `effective_time` int NOT NULL DEFAULT 0 COMMENT '拼团订单有效时间(小时)',
  `cost` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '拼图商品成本',
  `browse` int NULL DEFAULT 0 COMMENT '浏览量',
  `unit_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '单位名',
  `temp_id` int NOT NULL COMMENT '运费模板ID',
  `weight` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '重量',
  `volume` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '体积',
  `num` int NULL DEFAULT NULL COMMENT '单次购买数量',
  `quota` int NOT NULL DEFAULT 0 COMMENT '限购总数',
  `quota_show` int NOT NULL DEFAULT 0 COMMENT '限量总数显示',
  `ot_price` decimal(10, 2) NOT NULL COMMENT '原价',
  `once_num` int NOT NULL DEFAULT 0 COMMENT '每个订单可购买数量',
  `virtual_ration` int NOT NULL DEFAULT 100 COMMENT '虚拟成团百分比',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '拼团商品表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_coupon
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon`;
CREATE TABLE `eb_store_coupon`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '优惠券表ID',
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '优惠券名称',
  `money` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '兑换的优惠券面值',
  `is_limited` tinyint(1) NULL DEFAULT 0 COMMENT '是否限量, 默认0 不限量， 1限量',
  `total` int NOT NULL DEFAULT 0 COMMENT '发放总数',
  `last_total` int NULL DEFAULT 0 COMMENT '剩余数量',
  `use_type` tinyint NOT NULL DEFAULT 1 COMMENT '使用类型 1 全场通用, 2 商品券, 3 品类券',
  `primary_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '所属商品id / 分类id',
  `min_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最低消费，0代表不限制',
  `receive_start_time` timestamp NOT NULL COMMENT '可领取开始时间',
  `receive_end_time` timestamp NULL DEFAULT NULL COMMENT '可领取结束时间',
  `is_fixed_time` tinyint(1) NULL DEFAULT 0 COMMENT '是否固定使用时间, 默认0 否， 1是',
  `use_start_time` timestamp NULL DEFAULT NULL COMMENT '可使用时间范围 开始时间',
  `use_end_time` timestamp NULL DEFAULT NULL COMMENT '可使用时间范围 结束时间',
  `day` int NULL DEFAULT 0 COMMENT '天数',
  `type` tinyint NOT NULL DEFAULT 1 COMMENT '优惠券类型 1 手动领取, 2 新人券, 3 赠送券',
  `sort` int UNSIGNED NOT NULL DEFAULT 1 COMMENT '排序',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态（0：关闭，1：开启）',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除 状态（0：否，1：是）',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `nft_id` int NULL DEFAULT NULL COMMENT '凭证核销藏品ID',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `state`(`status` ASC) USING BTREE,
  INDEX `is_del`(`is_del` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_coupon_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_coupon_user`;
CREATE TABLE `eb_store_coupon_user`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `coupon_id` int NOT NULL COMMENT '优惠券发布id',
  `cid` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '兑换的项目id',
  `uid` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '领取人id',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '优惠券名称',
  `money` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '优惠券的面值',
  `min_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '最低消费多少金额可用优惠券',
  `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'send' COMMENT '获取方式，send后台发放, 用户领取 get',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态（0：未使用，1：已使用, 2:已失效）',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `start_time` timestamp NULL DEFAULT NULL COMMENT '开始使用时间',
  `end_time` timestamp NULL DEFAULT NULL COMMENT '过期时间',
  `use_time` timestamp NULL DEFAULT NULL COMMENT '使用时间',
  `use_type` tinyint(1) NULL DEFAULT 1 COMMENT '使用类型 1 全场通用, 2 商品券, 3 品类券',
  `primary_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属商品id / 分类id',
  `member_nft_id` int NULL DEFAULT NULL COMMENT '指定销毁的藏品ID',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `cid`(`cid` ASC) USING BTREE,
  INDEX `uid`(`uid` ASC) USING BTREE,
  INDEX `end_time`(`end_time` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '优惠券记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_order
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order`;
CREATE TABLE `eb_store_order`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '订单ID',
  `order_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单号',
  `uid` int UNSIGNED NOT NULL COMMENT '用户id',
  `real_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户姓名',
  `user_phone` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户电话',
  `user_address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '详细地址',
  `freight_price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '运费金额',
  `total_num` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '订单商品总数',
  `total_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '订单总价',
  `total_postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '邮费',
  `pay_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实际支付金额',
  `pay_postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '支付邮费',
  `deduction_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '抵扣金额',
  `coupon_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '优惠券id',
  `coupon_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '优惠券金额',
  `paid` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付状态',
  `pay_time` timestamp NULL DEFAULT NULL COMMENT '支付时间',
  `pay_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '支付方式',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '订单状态（0：待发货；1：待收货；2：已收货，待评价；3：已完成；）',
  `refund_status` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 未退款 1 申请中 2 已退款 3 退款中',
  `refund_reason_wap_img` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '退款图片',
  `refund_reason_wap_explain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '退款用户说明',
  `refund_reason_wap` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '前台退款原因',
  `refund_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '不退款的理由',
  `refund_reason_time` timestamp NULL DEFAULT NULL COMMENT '退款时间',
  `refund_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '退款金额',
  `delivery_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '快递名称/送货人姓名',
  `delivery_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发货类型',
  `delivery_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '快递单号/手机号',
  `gain_integral` int NULL DEFAULT 0 COMMENT '消费赚取积分',
  `use_integral` int NULL DEFAULT 0 COMMENT '使用积分',
  `back_integral` int NULL DEFAULT 0 COMMENT '给用户退了多少积分',
  `mark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
  `remark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员备注',
  `mer_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '商户ID',
  `is_mer_check` tinyint UNSIGNED NOT NULL DEFAULT 0,
  `combination_id` int UNSIGNED NULL DEFAULT 0 COMMENT '拼团商品id0一般商品',
  `pink_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '拼团id 0没有拼团',
  `cost` decimal(8, 2) UNSIGNED NOT NULL COMMENT '成本价',
  `seckill_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '秒杀商品ID',
  `bargain_id` int UNSIGNED NULL DEFAULT 0 COMMENT '砍价id',
  `verify_code` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '核销码',
  `store_id` int NOT NULL DEFAULT 0 COMMENT '门店id',
  `shipping_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '配送方式 1=快递 ，2=门店自提',
  `clerk_id` int NOT NULL DEFAULT 0 COMMENT '店员id/核销员id',
  `is_channel` tinyint UNSIGNED NULL DEFAULT 0 COMMENT '支付渠道(0微信公众号1微信小程序2余额)',
  `is_remind` tinyint UNSIGNED NULL DEFAULT 0 COMMENT '消息提醒',
  `is_system_del` tinyint(1) NULL DEFAULT 0 COMMENT '后台是否删除',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `delivery_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '快递公司简称',
  `bargain_user_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户拼团活动id 0没有',
  `type` int NOT NULL DEFAULT 0 COMMENT '订单类型:0-普通订单，1-视频号订单',
  `pro_total_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '商品总价',
  `before_pay_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '改价前支付金额',
  `is_alter_price` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否改价,0-否，1-是',
  `out_trade_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商户系统内部的订单号,32个字符内、可包含字母, 其他说明见商户订单号',
  `score` int NULL DEFAULT NULL COMMENT '兑换所需NFT积分',
  `member_nft_id` int NULL DEFAULT NULL COMMENT '指定销毁的藏品ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `order_id_2`(`order_id` ASC, `uid` ASC) USING BTREE,
  INDEX `uid`(`uid` ASC) USING BTREE,
  INDEX `add_time`(`create_time` ASC) USING BTREE,
  INDEX `pay_price`(`pay_price` ASC) USING BTREE,
  INDEX `paid`(`paid` ASC) USING BTREE,
  INDEX `pay_time`(`pay_time` ASC) USING BTREE,
  INDEX `pay_type`(`pay_type` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `is_del`(`is_del` ASC) USING BTREE,
  INDEX `coupon_id`(`coupon_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 140 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_order_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_info`;
CREATE TABLE `eb_store_order_info`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `order_id` int UNSIGNED NOT NULL COMMENT '订单id',
  `product_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品ID',
  `info` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '购买东西的详细信息',
  `unique` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '唯一id',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
  `order_no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单号',
  `product_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称',
  `attr_value_id` int UNSIGNED NULL DEFAULT NULL COMMENT '规格属性值id',
  `image` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品图片',
  `sku` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品sku',
  `price` decimal(8, 2) UNSIGNED NOT NULL COMMENT '商品价格',
  `pay_num` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '购买数量',
  `weight` decimal(8, 2) UNSIGNED NOT NULL COMMENT '重量',
  `volume` decimal(8, 2) UNSIGNED NOT NULL COMMENT '体积',
  `give_integral` int UNSIGNED NOT NULL COMMENT '赠送积分',
  `is_reply` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否评价，0-未评价，1-已评价',
  `is_sub` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否单独分佣,0-否，1-是',
  `vip_price` decimal(8, 2) UNSIGNED NOT NULL COMMENT '会员价',
  `product_type` int NOT NULL DEFAULT 0 COMMENT '商品类型:0-普通，1-秒杀，2-砍价，3-拼团，4-视频号',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `oid`(`order_id` ASC, `unique` ASC) USING BTREE,
  INDEX `product_id`(`product_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 140 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单购物详情表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_order_status
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_order_status`;
CREATE TABLE `eb_store_order_status`  (
  `oid` int UNSIGNED NOT NULL COMMENT '订单id',
  `change_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型',
  `change_message` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作备注',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
  INDEX `oid`(`oid` ASC) USING BTREE,
  INDEX `change_type`(`change_type` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单操作记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_pink
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_pink`;
CREATE TABLE `eb_store_pink`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '拼团ID',
  `uid` int UNSIGNED NOT NULL COMMENT '用户id',
  `order_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '订单id 生成',
  `order_id_key` int UNSIGNED NOT NULL COMMENT '订单id  数据库',
  `total_num` int UNSIGNED NOT NULL COMMENT '购买商品个数',
  `total_price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '购买总金额',
  `cid` int UNSIGNED NOT NULL COMMENT '拼团商品id',
  `pid` int UNSIGNED NOT NULL COMMENT '商品id',
  `people` int UNSIGNED NOT NULL COMMENT '拼图总人数',
  `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '拼团商品单价',
  `add_time` bigint NOT NULL COMMENT '开始时间',
  `stop_time` bigint NOT NULL COMMENT '结束时间',
  `k_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '团长id 0为团长',
  `is_tpl` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否发送模板消息0未发送1已发送',
  `is_refund` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否退款 0未退款 1已退款',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态1进行中2已完成3未完成',
  `is_virtual` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否虚拟拼团',
  `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
  `avatar` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户头像',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '拼团表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_product
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product`;
CREATE TABLE `eb_store_product`  (
  `id` mediumint NOT NULL AUTO_INCREMENT COMMENT '商品id',
  `mer_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)',
  `image` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品图片',
  `slider_image` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `store_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称',
  `store_info` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品简介',
  `keyword` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '关键字',
  `bar_code` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品条码（一维码）',
  `cate_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类id',
  `price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '商品价格',
  `vip_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '会员价格',
  `ot_price` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '市场价',
  `postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '邮费',
  `unit_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单位名',
  `sort` smallint NOT NULL DEFAULT 0 COMMENT '排序',
  `sales` mediumint UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
  `stock` mediumint UNSIGNED NOT NULL DEFAULT 0 COMMENT '库存',
  `is_show` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态（0：未上架，1：上架）',
  `is_hot` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否热卖',
  `is_benefit` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否优惠',
  `is_best` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否精品',
  `is_new` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否新品',
  `add_time` int UNSIGNED NOT NULL COMMENT '添加时间',
  `score` int NOT NULL DEFAULT 0 COMMENT '兑换所需nft积分',
  `is_postage` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否包邮',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
  `mer_use` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '商户是否代理 0不可代理1可代理',
  `give_integral` int NULL DEFAULT 0 COMMENT '获得积分',
  `cost` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '成本价',
  `is_seckill` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '秒杀状态 0 未开启 1已开启',
  `is_bargain` tinyint UNSIGNED NULL DEFAULT NULL COMMENT '砍价状态 0未开启 1开启',
  `is_good` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否优品推荐',
  `is_sub` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否单独分佣',
  `ficti` mediumint NULL DEFAULT 100 COMMENT '虚拟销量',
  `browse` int NULL DEFAULT 0 COMMENT '浏览量',
  `code_path` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品二维码地址(用户小程序海报)',
  `soure_link` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '淘宝京东1688类型',
  `video_link` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '主图视频链接',
  `temp_id` int NOT NULL DEFAULT 1 COMMENT '运费模板ID',
  `spec_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '规格 0单 1多',
  `activity` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '活动显示排序0=默认, 1=秒杀，2=砍价，3=拼团',
  `flat_pattern` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '展示图',
  `is_recycle` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否回收站',
  `nft_id` int NULL DEFAULT NULL COMMENT '凭证核销藏品ID',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `cate_id`(`cate_id` ASC) USING BTREE,
  INDEX `is_hot`(`is_hot` ASC) USING BTREE,
  INDEX `is_benefit`(`is_benefit` ASC) USING BTREE,
  INDEX `is_best`(`is_best` ASC) USING BTREE,
  INDEX `is_new`(`is_new` ASC) USING BTREE,
  INDEX `toggle_on_sale, is_del`(`is_del` ASC) USING BTREE,
  INDEX `price`(`price` ASC) USING BTREE,
  INDEX `is_show`(`is_show` ASC) USING BTREE,
  INDEX `sort`(`sort` ASC) USING BTREE,
  INDEX `sales`(`sales` ASC) USING BTREE,
  INDEX `add_time`(`add_time` ASC) USING BTREE,
  INDEX `is_postage`(`is_postage` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_attr
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr`;
CREATE TABLE `eb_store_product_attr`  (
  `id` mediumint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `product_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '商品ID',
  `attr_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性名',
  `attr_values` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '属性值',
  `type` tinyint(1) NULL DEFAULT 0 COMMENT '活动类型 0=商品，1=秒杀，2=砍价，3=拼团',
  `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0-否，1-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `store_id`(`product_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品属性表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_attr_result
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr_result`;
CREATE TABLE `eb_store_product_attr_result`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `product_id` int UNSIGNED NOT NULL COMMENT '商品ID',
  `result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品属性参数',
  `change_time` int UNSIGNED NOT NULL COMMENT '上次修改时间',
  `type` tinyint(1) NULL DEFAULT 0 COMMENT '活动类型 0=商品，1=秒杀，2=砍价，3=拼团',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `product_id`(`product_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品属性详情表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_attr_value
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_attr_value`;
CREATE TABLE `eb_store_product_attr_value`  (
  `id` mediumint NOT NULL AUTO_INCREMENT COMMENT '主键',
  `product_id` int UNSIGNED NOT NULL COMMENT '商品ID',
  `suk` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品属性索引值 (attr_value|attr_value[|....])',
  `stock` int UNSIGNED NOT NULL COMMENT '属性对应的库存',
  `sales` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
  `price` decimal(8, 2) UNSIGNED NOT NULL COMMENT '属性金额',
  `image` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片',
  `unique` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '唯一值',
  `cost` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '成本价',
  `bar_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品条码',
  `ot_price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '原价',
  `weight` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '重量',
  `volume` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '体积',
  `brokerage` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '一级返佣',
  `brokerage_two` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '二级返佣',
  `type` tinyint(1) NULL DEFAULT 0 COMMENT '活动类型 0=商品，1=秒杀，2=砍价，3=拼团',
  `quota` int NULL DEFAULT NULL COMMENT '活动限购数量',
  `quota_show` int NULL DEFAULT NULL COMMENT '活动限购数量显示',
  `attr_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'attr_values 创建更新时的属性对应',
  `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0-否，1-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `unique`(`unique` ASC, `suk` ASC) USING BTREE,
  INDEX `store_id`(`product_id` ASC, `suk` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 61 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品属性值表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_product_cate
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_cate`;
CREATE TABLE `eb_store_product_cate`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL DEFAULT 0 COMMENT '商品id',
  `cate_id` int NOT NULL DEFAULT 0 COMMENT '分类id',
  `add_time` int NOT NULL DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品分类辅助表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_coupon
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_coupon`;
CREATE TABLE `eb_store_product_coupon`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `product_id` int NOT NULL DEFAULT 0 COMMENT '商品id',
  `issue_coupon_id` int NOT NULL DEFAULT 0 COMMENT '优惠劵id',
  `add_time` int NOT NULL DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品优惠券表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_description
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_description`;
CREATE TABLE `eb_store_product_description`  (
  `product_id` int NOT NULL DEFAULT 0 COMMENT '商品ID',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品详情',
  `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '商品类型',
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `product_id`(`product_id` ASC, `type` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品描述表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_log
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_log`;
CREATE TABLE `eb_store_product_log`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '统计ID',
  `type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型visit,cart,order,pay,collect,refund',
  `product_id` int NOT NULL DEFAULT 0 COMMENT '商品ID',
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户ID',
  `visit_num` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否浏览',
  `cart_num` int NOT NULL DEFAULT 0 COMMENT '加入购物车数量',
  `order_num` int NOT NULL DEFAULT 0 COMMENT '下单数量',
  `pay_num` int NOT NULL DEFAULT 0 COMMENT '支付数量',
  `pay_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '支付金额',
  `cost_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '商品成本价',
  `pay_uid` int NOT NULL DEFAULT 0 COMMENT '支付用户ID',
  `refund_num` int NOT NULL DEFAULT 0 COMMENT '退款数量',
  `refund_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '退款金额',
  `collect_num` tinyint(1) NOT NULL DEFAULT 0 COMMENT '收藏',
  `add_time` bigint NOT NULL DEFAULT 0 COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品日志表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_product_relation
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_relation`;
CREATE TABLE `eb_store_product_relation`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `uid` int UNSIGNED NOT NULL COMMENT '用户ID',
  `product_id` int UNSIGNED NOT NULL COMMENT '商品ID',
  `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型(收藏(collect）、点赞(like))',
  `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '某种类型的商品(普通商品、秒杀商品)',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uid`(`uid` ASC, `product_id` ASC, `type` ASC, `category` ASC) USING BTREE,
  INDEX `type`(`type` ASC) USING BTREE,
  INDEX `category`(`category` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品点赞和收藏表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_product_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_reply`;
CREATE TABLE `eb_store_product_reply`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '评论ID',
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户ID',
  `oid` int NOT NULL DEFAULT 0 COMMENT '订单ID',
  `unique` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品唯一id',
  `product_id` int NOT NULL COMMENT '商品id',
  `reply_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'product' COMMENT '某种商品类型(普通商品、秒杀商品）',
  `product_score` tinyint(1) NOT NULL COMMENT '商品分数',
  `service_score` tinyint(1) NOT NULL COMMENT '服务分数',
  `comment` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论内容',
  `pics` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '评论图片',
  `merchant_reply_content` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员回复内容',
  `merchant_reply_time` int NULL DEFAULT NULL COMMENT '管理员回复时间',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0未删除1已删除',
  `is_reply` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0未回复1已回复',
  `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名称',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户头像',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `sku` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '商品规格属性值,多个,号隔开',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `parent_id`(`reply_type` ASC) USING BTREE,
  INDEX `is_del`(`is_del` ASC) USING BTREE,
  INDEX `product_score`(`product_score` ASC) USING BTREE,
  INDEX `service_score`(`service_score` ASC) USING BTREE,
  INDEX `uid+oid`(`uid` ASC, `oid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评论表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_product_rule
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_product_rule`;
CREATE TABLE `eb_store_product_rule`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `rule_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规格名称',
  `rule_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规格值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品规则值(规格)表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_store_seckill
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_seckill`;
CREATE TABLE `eb_store_seckill`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品秒杀产品表id',
  `product_id` int UNSIGNED NOT NULL COMMENT '商品id',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '推荐图',
  `images` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动标题',
  `info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '简介',
  `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '价格',
  `cost` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '成本',
  `ot_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '原价',
  `give_integral` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '返多少积分',
  `sort` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `stock` int UNSIGNED NOT NULL COMMENT '库存',
  `sales` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量',
  `unit_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '单位名',
  `postage` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '邮费',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
  `start_time` datetime NOT NULL COMMENT '开始时间',
  `stop_time` datetime NOT NULL COMMENT '结束时间',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `status` tinyint UNSIGNED NOT NULL COMMENT '秒杀状态 0=关闭 1=开启',
  `is_postage` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否包邮',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '删除 0未删除1已删除',
  `num` int UNSIGNED NOT NULL COMMENT '当天参与活动次数',
  `is_show` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '显示',
  `time_id` int NULL DEFAULT NULL COMMENT '时间段ID',
  `temp_id` int NOT NULL DEFAULT 0 COMMENT '运费模板ID',
  `weight` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '重量',
  `volume` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '体积',
  `quota` int NOT NULL DEFAULT 0 COMMENT '限购总数,随减',
  `quota_show` int NOT NULL DEFAULT 0 COMMENT '限购总数显示.不变',
  `spec_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '规格 0=单 1=多',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `product_id`(`product_id` ASC) USING BTREE,
  INDEX `start_time`(`start_time` ASC, `stop_time` ASC) USING BTREE,
  INDEX `is_del`(`is_del` ASC) USING BTREE,
  INDEX `is_show`(`status` ASC) USING BTREE,
  INDEX `add_time`(`create_time` ASC) USING BTREE,
  INDEX `sort`(`sort` ASC) USING BTREE,
  INDEX `is_postage`(`is_postage` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品秒杀产品表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_store_seckill_manger
-- ----------------------------
DROP TABLE IF EXISTS `eb_store_seckill_manger`;
CREATE TABLE `eb_store_seckill_manger`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '秒杀名称',
  `start_time` int NULL DEFAULT NULL COMMENT '秒杀开始时间段',
  `end_time` int NULL DEFAULT NULL COMMENT '秒杀结束时间段',
  `img` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '主图',
  `silder_imgs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '轮播图',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `status` int NULL DEFAULT NULL COMMENT '状态 0=关闭 1=开启',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `is_del` int NOT NULL DEFAULT 0 COMMENT '删除标记 0=为删除 1=删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_admin
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_admin`;
CREATE TABLE `eb_system_admin`  (
  `id` smallint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '后台管理员表ID',
  `account` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '后台管理员账号',
  `pwd` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '后台管理员密码',
  `real_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '后台管理员姓名',
  `roles` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '后台管理员权限(menus_id)',
  `last_ip` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '后台管理员最后一次登录ip',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '后台管理员最后一次登录时间',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '后台管理员添加时间',
  `login_count` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录次数',
  `level` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '后台管理员级别',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '后台管理员状态 1有效0无效',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0,
  `phone` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
  `is_sms` tinyint UNSIGNED NULL DEFAULT 0 COMMENT '是否接收短信',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `account`(`account` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '后台管理员表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_attachment
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_attachment`;
CREATE TABLE `eb_system_attachment`  (
  `att_id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '附件名称',
  `att_dir` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '附件路径',
  `satt_dir` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '压缩图片路径',
  `att_size` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '附件大小',
  `att_type` char(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '附件类型',
  `pid` int NOT NULL DEFAULT 0 COMMENT '分类ID0编辑器,1商品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图， 7前台用户',
  `image_type` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '图片上传类型 1本地 2七牛云 3OSS 4COS ',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`att_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 278 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '附件管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_city
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_city`;
CREATE TABLE `eb_system_city`  (
  `id` int NOT NULL,
  `city_id` int NOT NULL DEFAULT 0 COMMENT '城市id',
  `level` int NOT NULL DEFAULT 0 COMMENT '省市级别',
  `parent_id` int NOT NULL DEFAULT 0 COMMENT '父级id',
  `area_code` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '区号',
  `name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '名称',
  `merger_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '合并名称',
  `lng` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '经度',
  `lat` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '纬度',
  `is_show` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否展示',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '城市表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_config
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_config`;
CREATE TABLE `eb_system_config`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '配置id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '字段名称',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '字段提示文字',
  `form_id` int NULL DEFAULT 0 COMMENT '表单id',
  `value` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '值',
  `status` tinyint(1) NULL DEFAULT 0 COMMENT '是否隐藏',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status+name`(`name` ASC) USING BTREE,
  INDEX `name`(`name` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7977 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '配置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_form_temp
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_form_temp`;
CREATE TABLE `eb_system_form_temp`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '表单模板id',
  `name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '表单名称',
  `info` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '表单简介',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表单内容',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 143 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '表单模板' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_group`;
CREATE TABLE `eb_system_group`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '组合数据ID',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '数据组名称',
  `info` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '简介',
  `form_id` int NOT NULL DEFAULT 0 COMMENT 'form 表单 id',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 73 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组合数据表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_group_data
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_group_data`;
CREATE TABLE `eb_system_group_data`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '组合数据详情ID',
  `gid` int NOT NULL DEFAULT 0 COMMENT '对应的数据组id',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '数据组对应的数据值（json数据）',
  `sort` int NOT NULL DEFAULT 0 COMMENT '数据排序',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态（1：开启；2：关闭；）',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1249 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组合数据详情表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_menu
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_menu`;
CREATE TABLE `eb_system_menu`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `pid` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级ID',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'icon',
  `perms` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限标识',
  `component` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件路径',
  `menu_type` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'M' COMMENT '类型，M-目录，C-菜单，A-按钮',
  `sort` int NOT NULL DEFAULT 99999 COMMENT '排序',
  `is_show` tinyint(1) NOT NULL DEFAULT 1 COMMENT '显示状态',
  `is_delte` tinyint UNSIGNED NULL DEFAULT 0 COMMENT '是否删除',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 405 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统菜单表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_notification
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_notification`;
CREATE TABLE `eb_system_notification`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `mark` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标识',
  `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '通知类型',
  `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '通知场景说明',
  `is_wechat` tinyint NOT NULL DEFAULT 0 COMMENT '公众号模板消息（0：不存在，1：开启，2：关闭）',
  `wechat_id` int NOT NULL DEFAULT 0 COMMENT '模板消息id',
  `is_routine` tinyint NOT NULL DEFAULT 0 COMMENT '小程序订阅消息（0：不存在，1：开启，2：关闭）',
  `routine_id` int NOT NULL DEFAULT 0 COMMENT '订阅消息id',
  `is_sms` tinyint NOT NULL DEFAULT 0 COMMENT '发送短信（0：不存在，1：开启，2：关闭）',
  `sms_id` int NOT NULL DEFAULT 0 COMMENT '短信id',
  `send_type` tinyint NOT NULL DEFAULT 1 COMMENT '发送类型（1：用户，2：管理员）',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知设置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_role
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_role`;
CREATE TABLE `eb_system_role`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '身份管理id',
  `role_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '身份管理名称',
  `rules` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '身份管理权限(menus_id)',
  `level` tinyint UNSIGNED NOT NULL DEFAULT 0,
  `status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '身份管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_role_menu`;
CREATE TABLE `eb_system_role_menu`  (
  `rid` int NOT NULL COMMENT '角色id',
  `menu_id` int NOT NULL COMMENT '权限id',
  PRIMARY KEY (`rid`, `menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_store
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_store`;
CREATE TABLE `eb_system_store`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '门店名称',
  `introduction` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '简介',
  `phone` char(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号码',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '省市区',
  `detailed_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '门店logo',
  `latitude` char(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '纬度',
  `longitude` char(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '经度',
  `valid_time` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '核销有效日期',
  `day_time` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '每日营业开关时间',
  `is_show` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否显示',
  `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `phone`(`phone` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '门店自提' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_store_staff
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_store_staff`;
CREATE TABLE `eb_system_store_staff`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `uid` int UNSIGNED NOT NULL COMMENT '管理员id',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '店员头像',
  `store_id` int NOT NULL COMMENT '门店id',
  `staff_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '店员名称',
  `phone` char(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
  `verify_status` tinyint NOT NULL DEFAULT 0 COMMENT '核销开关',
  `status` tinyint NULL DEFAULT 1 COMMENT '状态',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '门店店员表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_system_user_level
-- ----------------------------
DROP TABLE IF EXISTS `eb_system_user_level`;
CREATE TABLE `eb_system_user_level`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '会员名称',
  `experience` int NOT NULL DEFAULT 0 COMMENT '达到多少升级经验',
  `is_show` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否显示 1=显示,0=隐藏',
  `grade` int NOT NULL DEFAULT 0 COMMENT '会员等级',
  `discount` int NOT NULL DEFAULT 100 COMMENT '享受折扣',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '会员图标',
  `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除.1=删除,0=未删除',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '普通会员等级' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_template_message
-- ----------------------------
DROP TABLE IF EXISTS `eb_template_message`;
CREATE TABLE `eb_template_message`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '模板id',
  `type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0=订阅消息,1=微信模板消息',
  `temp_key` char(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '模板编号',
  `name` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模板名',
  `content` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '回复内容',
  `temp_id` char(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '模板ID',
  `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 58 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信模板' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for eb_user
-- ----------------------------
DROP TABLE IF EXISTS `eb_user`;
CREATE TABLE `eb_user`  (
  `uid` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `account` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户账号',
  `pwd` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户密码',
  `real_name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '真实姓名',
  `birthday` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '生日',
  `card_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证号码',
  `mark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户备注',
  `partner_id` int NULL DEFAULT NULL COMMENT '合伙人id',
  `group_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户分组id',
  `tag_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签id',
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
  `avatar` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户头像',
  `phone` char(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号码',
  `add_ip` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '添加ip',
  `last_ip` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '最后一次登录ip',
  `now_money` decimal(16, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '用户余额',
  `brokerage_price` decimal(8, 2) NULL DEFAULT 0.00 COMMENT '佣金金额',
  `integral` int NULL DEFAULT 0 COMMENT '用户剩余积分',
  `experience` int UNSIGNED NULL DEFAULT 0 COMMENT '用户剩余经验',
  `sign_num` int NULL DEFAULT 0 COMMENT '连续签到天数',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '1为正常，0为禁止',
  `level` tinyint UNSIGNED NULL DEFAULT 0 COMMENT '等级',
  `spread_uid` int UNSIGNED NULL DEFAULT 0 COMMENT '推广员id',
  `spread_time` timestamp NULL DEFAULT NULL COMMENT '推广员关联时间',
  `user_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户类型',
  `is_promoter` tinyint UNSIGNED NULL DEFAULT 0 COMMENT '是否为推广员',
  `pay_count` int UNSIGNED NULL DEFAULT 0 COMMENT '用户购买次数',
  `spread_count` int NULL DEFAULT 0 COMMENT '下级人数',
  `addres` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '详细地址',
  `adminid` int UNSIGNED NULL DEFAULT 0 COMMENT '管理员编号 ',
  `login_type` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户登陆类型，h5,wechat,routine',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `last_login_time` timestamp NULL DEFAULT NULL COMMENT '最后一次登录时间',
  `clean_time` timestamp NULL DEFAULT NULL COMMENT '清除时间',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '/0/' COMMENT '推广等级记录',
  `subscribe` tinyint NULL DEFAULT 0 COMMENT '是否关注公众号',
  `subscribe_time` timestamp NULL DEFAULT NULL COMMENT '关注公众号时间',
  `sex` tinyint(1) NULL DEFAULT 1 COMMENT '性别，0未知，1男，2女，3保密',
  `country` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'CN' COMMENT '国家，中国CN，其他OTHER',
  `promoter_time` timestamp NULL DEFAULT NULL COMMENT '成为分销员时间',
  PRIMARY KEY (`uid`) USING BTREE,
  UNIQUE INDEX `account`(`account` ASC) USING BTREE,
  INDEX `spreaduid`(`spread_uid` ASC) USING BTREE,
  INDEX `level`(`level` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `is_promoter`(`is_promoter` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_activity
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_activity`;
CREATE TABLE `eb_user_activity`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `activity_id` int NULL DEFAULT NULL COMMENT '活动id',
  `complete` tinyint NULL DEFAULT NULL COMMENT '0 未完成 1 已完成',
  `member_id` int NULL DEFAULT NULL COMMENT '用户id',
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '领取时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '积分商城用户活动记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for eb_user_address
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_address`;
CREATE TABLE `eb_user_address`  (
  `id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户地址id',
  `uid` int UNSIGNED NOT NULL COMMENT '用户id',
  `real_name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人姓名',
  `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人电话',
  `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人所在省',
  `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人所在市',
  `city_id` int NOT NULL DEFAULT 0 COMMENT '城市id',
  `district` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人所在区',
  `detail` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '收货人详细地址',
  `post_code` int NOT NULL DEFAULT 0 COMMENT '邮编',
  `longitude` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '经度',
  `latitude` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '纬度',
  `is_default` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否默认',
  `is_del` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `uid`(`uid` ASC) USING BTREE,
  INDEX `is_default`(`is_default` ASC) USING BTREE,
  INDEX `is_del`(`is_del` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户地址表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_bill
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_bill`;
CREATE TABLE `eb_user_bill`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户账单id',
  `uid` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '用户uid',
  `link_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '关联id',
  `pm` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 = 支出 1 = 获得',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '账单标题',
  `category` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '明细种类',
  `type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '明细类型',
  `number` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '明细数字',
  `balance` decimal(16, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '剩余',
  `mark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0 = 带确定 1 = 有效 -1 = 无效',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `openid`(`uid` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `add_time`(`create_time` ASC) USING BTREE,
  INDEX `pm`(`pm` ASC) USING BTREE,
  INDEX `type`(`category` ASC, `type` ASC, `link_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 90 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户账单表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_brokerage_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_brokerage_record`;
CREATE TABLE `eb_user_brokerage_record`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户uid',
  `link_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '关联id（orderNo,提现id）',
  `link_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '关联类型（order,extract，yue）',
  `type` int NOT NULL DEFAULT 1 COMMENT '类型：1-增加，2-扣减（提现）',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题',
  `price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '金额',
  `balance` decimal(16, 2) NOT NULL DEFAULT 0.00 COMMENT '剩余',
  `mark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-订单创建，2-冻结期，3-完成，4-失效（订单退款），5-提现申请',
  `frozen_time` int NOT NULL DEFAULT 0 COMMENT '冻结期时间（天）',
  `thaw_time` bigint NOT NULL DEFAULT 0 COMMENT '解冻时间',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `brokerage_level` int NULL DEFAULT NULL COMMENT '分销等级',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `openid`(`uid` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `add_time`(`create_time` ASC) USING BTREE,
  INDEX `type`(`type` ASC) USING BTREE,
  INDEX `type_link`(`type` ASC, `link_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户佣金记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_experience_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_experience_record`;
CREATE TABLE `eb_user_experience_record`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户uid',
  `link_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '关联id-orderNo,(sign,system默认为0）',
  `link_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'order' COMMENT '关联类型（order,sign,system）',
  `type` int NOT NULL DEFAULT 1 COMMENT '类型：1-增加，2-扣减',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题',
  `experience` int NOT NULL DEFAULT 0 COMMENT '经验',
  `balance` int NOT NULL DEFAULT 0 COMMENT '剩余',
  `mark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-成功（保留字段）',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `openid`(`uid` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `add_time`(`create_time` ASC) USING BTREE,
  INDEX `type`(`type` ASC) USING BTREE,
  INDEX `type_link`(`type` ASC, `link_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 92 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户经验记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_extract
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_extract`;
CREATE TABLE `eb_user_extract`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `uid` int UNSIGNED NULL DEFAULT NULL,
  `real_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `extract_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'bank' COMMENT 'bank = 银行卡 alipay = 支付宝 weixin=微信',
  `bank_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '银行卡',
  `bank_address` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '开户地址',
  `alipay_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '支付宝账号',
  `extract_price` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '提现金额',
  `mark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `balance` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00,
  `fail_msg` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '无效原因',
  `status` tinyint NULL DEFAULT 0 COMMENT '-1 未通过 0 审核中 1 已提现',
  `wechat` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信号',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `fail_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '失败时间',
  `bank_name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '银行名称',
  `qrcode_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信收款二维码',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `extract_type`(`extract_type` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `openid`(`uid` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户提现表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_group
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_group`;
CREATE TABLE `eb_user_group`  (
  `id` smallint UNSIGNED NOT NULL AUTO_INCREMENT,
  `group_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户分组名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户分组表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_integral_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_integral_record`;
CREATE TABLE `eb_user_integral_record`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '记录id',
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户uid',
  `link_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '关联id-orderNo,(sign,system默认为0）',
  `link_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'order' COMMENT '关联类型（order,sign,system）',
  `type` int NOT NULL DEFAULT 1 COMMENT '类型：1-增加，2-扣减',
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题',
  `integral` int NOT NULL DEFAULT 0 COMMENT '积分',
  `balance` int NOT NULL DEFAULT 0 COMMENT '剩余',
  `mark` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-订单创建，2-冻结期，3-完成，4-失效（订单退款）',
  `frozen_time` int NOT NULL DEFAULT 0 COMMENT '冻结期时间（天）',
  `thaw_time` bigint NOT NULL DEFAULT 0 COMMENT '解冻时间',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `openid`(`uid` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE,
  INDEX `add_time`(`create_time` ASC) USING BTREE,
  INDEX `type`(`type` ASC) USING BTREE,
  INDEX `type_link`(`type` ASC, `link_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 33 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户积分记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_level
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_level`;
CREATE TABLE `eb_user_level`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户uid',
  `level_id` int NOT NULL DEFAULT 0 COMMENT '等级vip',
  `grade` int NOT NULL DEFAULT 0 COMMENT '会员等级',
  `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '0:禁止,1:正常',
  `mark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `remind` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否已通知',
  `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0=未删除,1=删除',
  `discount` int NOT NULL DEFAULT 100 COMMENT '享受折扣',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `expired_time` timestamp NULL DEFAULT NULL COMMENT '过期时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `id`(`id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户等级记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_recharge
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_recharge`;
CREATE TABLE `eb_user_recharge`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `uid` int NULL DEFAULT NULL COMMENT '充值用户UID',
  `order_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `price` decimal(8, 2) NULL DEFAULT NULL COMMENT '充值金额',
  `give_price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '购买赠送金额',
  `recharge_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '充值类型',
  `paid` tinyint(1) NULL DEFAULT 0 COMMENT '是否充值',
  `pay_time` timestamp NULL DEFAULT NULL COMMENT '充值支付时间',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '充值时间',
  `refund_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '退款金额',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `order_id`(`order_id` ASC) USING BTREE,
  INDEX `uid`(`uid` ASC) USING BTREE,
  INDEX `recharge_type`(`recharge_type` ASC) USING BTREE,
  INDEX `paid`(`paid` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户充值表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_sign
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_sign`;
CREATE TABLE `eb_user_sign`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `uid` int NOT NULL DEFAULT 0 COMMENT '用户uid',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '签到说明',
  `number` int NOT NULL DEFAULT 0 COMMENT '获得',
  `balance` int NOT NULL DEFAULT 0 COMMENT '剩余',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '类型，1积分，2经验',
  `create_day` date NOT NULL COMMENT '签到日期',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `uid`(`uid` ASC, `type` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '签到记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_tag
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_tag`;
CREATE TABLE `eb_user_tag`  (
  `id` smallint UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签管理' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_token
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_token`;
CREATE TABLE `eb_user_token`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `uid` int UNSIGNED NOT NULL COMMENT '用户 id',
  `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'token',
  `type` tinyint(1) NULL DEFAULT 1 COMMENT '类型，1 公众号， 2 小程序, 3 unionid, 5AppIos,6AppAndroid,7ios',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `expires_time` datetime NULL DEFAULT NULL COMMENT '到期时间',
  `login_ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录ip',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `type+token`(`type` ASC, `token` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_user_visit_record
-- ----------------------------
DROP TABLE IF EXISTS `eb_user_visit_record`;
CREATE TABLE `eb_user_visit_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期',
  `uid` int NULL DEFAULT NULL COMMENT '用户uid',
  `visit_type` int NULL DEFAULT NULL COMMENT '访问类型',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `date`(`date` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2678 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户访问记录表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_wechat_callback
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_callback`;
CREATE TABLE `eb_wechat_callback`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `to_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商家小程序名称',
  `from_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信团队的 OpenID(固定值)',
  `create_time` bigint UNSIGNED NULL DEFAULT NULL COMMENT '事件时间,Unix时间戳',
  `msg_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息类型',
  `event` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件类型',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
  `add_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信回调表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_wechat_exceptions
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_exceptions`;
CREATE TABLE `eb_wechat_exceptions`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `errcode` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误码',
  `errmsg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '错误信息',
  `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '回复数据',
  `remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 152 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信异常表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_wechat_pay_info
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_pay_info`;
CREATE TABLE `eb_wechat_pay_info`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `app_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公众号唯一标识',
  `mch_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商户号',
  `device_info` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备号,PC网页或公众号内支付可以传-WEB',
  `open_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户的唯一标识',
  `nonce_str` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '随机字符串',
  `sign` varchar(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '签名',
  `sign_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'MD5' COMMENT '签名类型，默认为MD5，支持HMAC-SHA256和MD5',
  `body` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品描述',
  `detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '商品详细描述，对于使用单品优惠的商户，该字段必须按照规范上传',
  `attach` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '附加数据，在查询API和支付通知中原样返回，可作为自定义参数使用',
  `out_trade_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商户订单号,要求32个字符内',
  `fee_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标价币种：CNY：人民币 GBP：英镑 HKD：港币 USD：美元 JPY：日元 CAD：加拿大元 AUD：澳大利亚元 EUR：欧元 NZD：新西兰元 KRW：韩元 THB：泰铢',
  `total_fee` int NULL DEFAULT NULL COMMENT '标价金额',
  `spbill_create_ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '终端IP',
  `time_start` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易起始时间',
  `time_expire` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易结束时间',
  `notify_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通知地址',
  `trade_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易类型,取值为：JSAPI，NATIVE，APP等',
  `product_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品ID',
  `scene_info` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景信息',
  `err_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '错误代码',
  `prepay_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预支付交易会话标识',
  `code_url` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '二维码链接',
  `is_subscribe` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否关注公众账号',
  `trade_state` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易状态',
  `bank_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '付款银行',
  `cash_fee` int NULL DEFAULT NULL COMMENT '现金支付金额',
  `coupon_fee` int NULL DEFAULT NULL COMMENT '代金券金额',
  `transaction_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信支付订单号',
  `time_end` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付完成时间',
  `trade_state_desc` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易状态描述',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `out_trade_no`(`out_trade_no` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信订单表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for eb_wechat_reply
-- ----------------------------
DROP TABLE IF EXISTS `eb_wechat_reply`;
CREATE TABLE `eb_wechat_reply`  (
  `id` mediumint UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '微信关键字回复id',
  `keywords` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '关键字',
  `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '回复类型',
  `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '回复数据',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '回复状态 0=不可用  1 =可用',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `key`(`keywords` ASC) USING BTREE,
  INDEX `type`(`type` ASC) USING BTREE,
  INDEX `status`(`status` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信关键字回复表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for h_material_record
-- ----------------------------
DROP TABLE IF EXISTS `h_material_record`;
CREATE TABLE `h_material_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '会员ID',
  `material_id` int NULL DEFAULT NULL COMMENT '素材ID',
  `once_record_id` int NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '素材使用记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for h_once_repository
-- ----------------------------
DROP TABLE IF EXISTS `h_once_repository`;
CREATE TABLE `h_once_repository`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `id_path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '素材集合 id|id|id|id',
  `member_id` int NULL DEFAULT 0 COMMENT '会员id',
  `nft_id` int NULL DEFAULT NULL COMMENT '所属Nft ',
  `status` tinyint NULL DEFAULT 0 COMMENT '0 未分配 1  待生成   2 已使用',
  `get_time` timestamp NULL DEFAULT NULL COMMENT '获取日期',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '形象唯一库' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for h_part
-- ----------------------------
DROP TABLE IF EXISTS `h_part`;
CREATE TABLE `h_part`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部位名称',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图标',
  `activity_icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '选中状态',
  `z_index` int NULL DEFAULT NULL COMMENT '层级',
  `type` tinyint NULL DEFAULT NULL COMMENT '1 固定随机部位 2 选配部位',
  `creation_time` timestamp NULL DEFAULT NULL,
  `deleted` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '头像diy部位' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for h_part_material
-- ----------------------------
DROP TABLE IF EXISTS `h_part_material`;
CREATE TABLE `h_part_material`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '素材名称',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '素材描述',
  `part_id` int NULL DEFAULT NULL COMMENT '部位id',
  `icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '缩略图',
  `source_file` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '源文件',
  `deleted` tinyint NULL DEFAULT 0,
  `creation_time` timestamp NULL DEFAULT NULL,
  `stock` int NULL DEFAULT 0 COMMENT '发行总量',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 293 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '头像DIY部位素材' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for h_random_record
-- ----------------------------
DROP TABLE IF EXISTS `h_random_record`;
CREATE TABLE `h_random_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '会员id',
  `nft_id` int NULL DEFAULT NULL COMMENT '藏品id',
  `status` int NULL DEFAULT NULL COMMENT '0 未使用 1 已使用',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '随机机会记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for h_whitelist
-- ----------------------------
DROP TABLE IF EXISTS `h_whitelist`;
CREATE TABLE `h_whitelist`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `type` int NULL DEFAULT NULL COMMENT '1 diy ',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '头像DIY白名单' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for m_account_custom
-- ----------------------------
DROP TABLE IF EXISTS `m_account_custom`;
CREATE TABLE `m_account_custom`  (
  `member_id` int NOT NULL,
  `ground_ids` json NULL COMMENT '[1,2,3,4,5]',
  `hidden` tinyint NULL DEFAULT 0 COMMENT '0 可见 1 不可见',
  PRIMARY KEY (`member_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户->自定义账号关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for m_admin_menu
-- ----------------------------
DROP TABLE IF EXISTS `m_admin_menu`;
CREATE TABLE `m_admin_menu`  (
  `menu_id` int NOT NULL AUTO_INCREMENT,
  `parent_id` int NULL DEFAULT NULL,
  `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `type` int NULL DEFAULT NULL,
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `component` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `icon` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `sort` int NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '后台功能列表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for m_admin_role
-- ----------------------------
DROP TABLE IF EXISTS `m_admin_role`;
CREATE TABLE `m_admin_role`  (
  `role_id` int NOT NULL AUTO_INCREMENT,
  `role_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `role_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `role_desc` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`role_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '后台管理角色' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for m_admin_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `m_admin_role_menu`;
CREATE TABLE `m_admin_role_menu`  (
  `admin_role_id` int NOT NULL,
  `admin_menu_id` int NOT NULL,
  PRIMARY KEY (`admin_role_id`, `admin_menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色菜单中间表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for m_admin_user
-- ----------------------------
DROP TABLE IF EXISTS `m_admin_user`;
CREATE TABLE `m_admin_user`  (
  `user_id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `salt` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `email` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `status` int NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '后台用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for m_admin_user_role
-- ----------------------------
DROP TABLE IF EXISTS `m_admin_user_role`;
CREATE TABLE `m_admin_user_role`  (
  `admin_user_id` int NOT NULL,
  `admin_role_id` int NOT NULL,
  PRIMARY KEY (`admin_user_id`, `admin_role_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '后台用户角色关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for mq_msg_fail_record
-- ----------------------------
DROP TABLE IF EXISTS `mq_msg_fail_record`;
CREATE TABLE `mq_msg_fail_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `exchange` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `msg` json NULL,
  `cause` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '报错原因',
  `creation_time` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8725 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'mq重试失败表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for y_interest_card_record
-- ----------------------------
DROP TABLE IF EXISTS `y_interest_card_record`;
CREATE TABLE `y_interest_card_record`  (
  `record_id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '用户ID',
  `interest_id` int NULL DEFAULT NULL COMMENT '权益ID发放的',
  `verify_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '指定核销码(核销码不能以ZAN,YZAN为前缀)，核销码长度：6-20个字符',
  `verify_in_order` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '核销的订单号',
  `preferential_mode` int NULL DEFAULT NULL COMMENT '优惠方式，1：代金券，2：折扣券，3：兑换券',
  `valid_start_time` timestamp NULL DEFAULT NULL COMMENT '有效开始时间,时间格式：yyyy-MM-DD HH-MM-SS',
  `valid_end_time` timestamp NULL DEFAULT NULL COMMENT '有效结束时间,时间格式：yyyy-MM-DD HH-MM-SS',
  `status` int NULL DEFAULT NULL COMMENT '核销状态：0-未核销，1-已核销',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`record_id`) USING BTREE,
  INDEX `member_id`(`member_id` ASC) USING BTREE INVISIBLE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '优惠券发放记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for y_nft_interest
-- ----------------------------
DROP TABLE IF EXISTS `y_nft_interest`;
CREATE TABLE `y_nft_interest`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL,
  `ycard_id` int NULL DEFAULT NULL COMMENT '优惠券id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '优惠劵名称',
  `type` int NULL DEFAULT NULL COMMENT '优惠类型：7-优惠券，9-优惠码-一卡一码，10-优惠码-通用码',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '使用说明',
  `validstart_time` timestamp NULL DEFAULT NULL COMMENT '开始时间',
  `validend_time` timestamp NULL DEFAULT NULL COMMENT '结束时间',
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `deleted` int NULL DEFAULT 0,
  `status` int NULL DEFAULT NULL COMMENT '活动状态:0:正常，1:已删除，2:已失效',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品权益表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for y_user_info
-- ----------------------------
DROP TABLE IF EXISTS `y_user_info`;
CREATE TABLE `y_user_info`  (
  `info_id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL,
  `yz_open_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `account_type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `weixin_openid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `wx_union_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`info_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 36 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '有赞用户信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_activity
-- ----------------------------
DROP TABLE IF EXISTS `z_activity`;
CREATE TABLE `z_activity`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '活动标题',
  `details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '活动详情',
  `status` tinyint NULL DEFAULT 1 COMMENT '0 禁用 1 启用',
  `type` int NULL DEFAULT NULL COMMENT '活动类型',
  `type_id` int NULL DEFAULT NULL COMMENT '类型ID',
  `is_category` tinyint NULL DEFAULT 0 COMMENT '是否系列分享 0不是 1是',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文章/平台链接',
  `background` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '背景图',
  `limit_id` int NULL DEFAULT NULL COMMENT '限制持有的藏品ID',
  `award` int NULL DEFAULT NULL COMMENT '奖励积分',
  `start_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `end_time` timestamp NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 42 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '活动表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_activity_check
-- ----------------------------
DROP TABLE IF EXISTS `z_activity_check`;
CREATE TABLE `z_activity_check`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `activity_id` int NULL DEFAULT NULL COMMENT '活动ID',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '活动标题',
  `nft_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '藏品名称（ai绘画活动）',
  `type` tinyint NULL DEFAULT NULL COMMENT '活动类型 3 分享活动 4 AI绘画活动',
  `type_id` int NULL DEFAULT NULL COMMENT '系列ID',
  `img_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图片地址',
  `member_id` int NULL DEFAULT NULL COMMENT '用户ID',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名（手机号）',
  `nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '昵称',
  `check_status` tinyint NULL DEFAULT 0 COMMENT '审核状态： 0 待审核；1 审核通过；2 审核不通过',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '申请时间',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  `deleted` tinyint NULL DEFAULT 0 COMMENT '逻辑删除：0 未删除；1 已删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 96 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '分享活动审核表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_aigc_whitelist
-- ----------------------------
DROP TABLE IF EXISTS `z_aigc_whitelist`;
CREATE TABLE `z_aigc_whitelist`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '会员ID',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名',
  `nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '昵称',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint NULL DEFAULT 0 COMMENT '逻辑删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'AIGC工具箱-次数限制白名单' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_airdroplog
-- ----------------------------
DROP TABLE IF EXISTS `z_airdroplog`;
CREATE TABLE `z_airdroplog`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_id` int NULL DEFAULT NULL COMMENT '藏品',
  `type` int NULL DEFAULT NULL,
  `username` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `status` int NULL DEFAULT NULL COMMENT '状态',
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `airdropno` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `count` int NULL DEFAULT NULL,
  `source` tinyint NULL DEFAULT NULL COMMENT '0 手动 1 定时空投',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_article
-- ----------------------------
DROP TABLE IF EXISTS `z_article`;
CREATE TABLE `z_article`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '专题名',
  `mainphoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '专题头图',
  `content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '内容',
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `tdate` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_attachment
-- ----------------------------
DROP TABLE IF EXISTS `z_attachment`;
CREATE TABLE `z_attachment`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `uuid` char(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT 'filehash',
  `uploader` int NOT NULL DEFAULT 0 COMMENT '上传者',
  `url` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '物理路径',
  `name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '名称',
  `size` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件大小',
  `mime` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT 'mime类型',
  `ip` bigint NOT NULL DEFAULT 0 COMMENT '上传者IP',
  `width` int NOT NULL COMMENT '宽度',
  `height` int NOT NULL COMMENT '高度',
  `suffix` varchar(8) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '图片类型',
  `domain` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '域名',
  `creation_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '附件表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for z_bank
-- ----------------------------
DROP TABLE IF EXISTS `z_bank`;
CREATE TABLE `z_bank`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `logo` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_brander
-- ----------------------------
DROP TABLE IF EXISTS `z_brander`;
CREATE TABLE `z_brander`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '发行方',
  `address` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '账户地址',
  `status` int NULL DEFAULT 1 COMMENT '状态',
  `logo` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `memo` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL,
  `maxid` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `weburl` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '发行方' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_carousel
-- ----------------------------
DROP TABLE IF EXISTS `z_carousel`;
CREATE TABLE `z_carousel`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `mainphoto` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '轮播图',
  `url` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '链接',
  `sort` int NULL DEFAULT 0 COMMENT '排序',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_category
-- ----------------------------
DROP TABLE IF EXISTS `z_category`;
CREATE TABLE `z_category`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '系列名',
  `subname` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '副标题',
  `code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '系列编号',
  `status` int NULL DEFAULT 0 COMMENT '状态',
  `programflag` int NULL DEFAULT NULL COMMENT '模式',
  `lotteryflag` int NULL DEFAULT NULL COMMENT '开启抽签',
  `lotterypercent` decimal(18, 2) NULL DEFAULT 30.00 COMMENT '抽签概率',
  `memo` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '系列说明',
  `mainphoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '大图',
  `bgcolor` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '背景色',
  `limitnum` int NULL DEFAULT NULL,
  `publisher_id` int NULL DEFAULT NULL COMMENT '发行',
  `brander_id` int NULL DEFAULT NULL COMMENT '版权',
  `lotterynum` int NULL DEFAULT 0 COMMENT '抽签限制数量',
  `tag` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '标签',
  `amount` decimal(18, 2) NULL DEFAULT NULL COMMENT '金额',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `prestart` timestamp NULL DEFAULT NULL,
  `preend` timestamp NULL DEFAULT NULL,
  `lotterystart` timestamp NULL DEFAULT NULL,
  `lotteryend` timestamp NULL DEFAULT NULL,
  `is_verification` tinyint NULL DEFAULT 0 COMMENT '核销开关',
  `deleted` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_cdkey
-- ----------------------------
DROP TABLE IF EXISTS `z_cdkey`;
CREATE TABLE `z_cdkey`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL COMMENT '藏品',
  `member_id` int NULL DEFAULT NULL COMMENT '会员',
  `keycode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '兑换码',
  `key_date` timestamp NULL DEFAULT NULL COMMENT '兑换时间',
  `status` int NULL DEFAULT NULL COMMENT '0 未兑换 1已经兑换',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `keycode`(`keycode` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_coin
-- ----------------------------
DROP TABLE IF EXISTS `z_coin`;
CREATE TABLE `z_coin`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `coin` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `price` decimal(18, 6) NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_cus_airdrop_nft
-- ----------------------------
DROP TABLE IF EXISTS `z_cus_airdrop_nft`;
CREATE TABLE `z_cus_airdrop_nft`  (
  `nft_id` int NOT NULL COMMENT '藏品id 唯一',
  `award_ids` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '1|2,2|2',
  `air_interval` int NULL DEFAULT NULL COMMENT '间隔时长(天)',
  `status` tinyint NULL DEFAULT 1 COMMENT '0 禁用 1 启用',
  PRIMARY KEY (`nft_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '自定义藏品空投' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_cus_airdrop_nft_record
-- ----------------------------
DROP TABLE IF EXISTS `z_cus_airdrop_nft_record`;
CREATE TABLE `z_cus_airdrop_nft_record`  (
  `member_nft_id` int NOT NULL COMMENT '会员藏品ID',
  `nft_id` int NULL DEFAULT NULL,
  `last_airdrop_time` timestamp NULL DEFAULT NULL COMMENT '上次空投时间',
  PRIMARY KEY (`member_nft_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '自定义空投记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_excellent_painting
-- ----------------------------
DROP TABLE IF EXISTS `z_excellent_painting`;
CREATE TABLE `z_excellent_painting`  (
  `nft_id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '主标题',
  `mainphoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '主图',
  `phone_number` varchar(11) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '会员手机号',
  `author` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '作者',
  `blockaddr` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `file` varchar(512) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '藏品文件',
  `type` int NULL DEFAULT 1 COMMENT '藏品类型 1 图片 2视频 3音乐',
  `bigphoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '大图',
  `chainflag` int NULL DEFAULT 1 COMMENT '是否上链',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`nft_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 142 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = 'Midjourney优质绘画作品' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_finance_in
-- ----------------------------
DROP TABLE IF EXISTS `z_finance_in`;
CREATE TABLE `z_finance_in`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `member_id` int NOT NULL COMMENT 'menebrID',
  `count` double NOT NULL DEFAULT 0 COMMENT '数量',
  `txid` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `status` int NULL DEFAULT 0,
  `memo` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_finance_out
-- ----------------------------
DROP TABLE IF EXISTS `z_finance_out`;
CREATE TABLE `z_finance_out`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `member_id` int NOT NULL COMMENT 'memberID',
  `count` double NOT NULL DEFAULT 0 COMMENT '数量',
  `type` int NULL DEFAULT NULL COMMENT '1 基础账户 2 佣金账户',
  `status` int NOT NULL DEFAULT 0,
  `address` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '提款地址',
  `fromaddress` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '出户地址',
  `txid` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `memo` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `cardno` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `bank` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_interest
-- ----------------------------
DROP TABLE IF EXISTS `z_interest`;
CREATE TABLE `z_interest`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '权益名称',
  `icon` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图标',
  `expository` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '说明',
  `type` int NULL DEFAULT NULL COMMENT '1 兑换券',
  `status` int NULL DEFAULT 0 COMMENT '0 禁用 1 启用',
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  `creation_tiem` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '权益表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_level
-- ----------------------------
DROP TABLE IF EXISTS `z_level`;
CREATE TABLE `z_level`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'edddddddsd',
  `level` int NULL DEFAULT NULL COMMENT '等级',
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '等级名',
  `startrecharge` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '起始充值',
  `endrecharge` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '结束充值',
  `incomepercent` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '日收益比例',
  `withdrawal` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '日提现比例',
  `inviterebate1` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '邀请返利1',
  `inviterebate2` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '邀请返利2',
  `inviterebate3` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '邀请返利3',
  `depositrebate1` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '充值返利1',
  `depositrebate2` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '充值返利2',
  `depositrebate3` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '充值返利3',
  `tradingrebate1` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '挖矿返利1',
  `tradingrebate2` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '挖矿返利2',
  `tradingrebate3` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '挖矿返利3',
  `teampercent` decimal(10, 0) NULL DEFAULT 0 COMMENT '团队比例',
  `levelbate` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '收益分配',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_log
-- ----------------------------
DROP TABLE IF EXISTS `z_log`;
CREATE TABLE `z_log`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `content` varbinary(50) NULL DEFAULT NULL,
  `ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `type` varbinary(50) NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_lottery
-- ----------------------------
DROP TABLE IF EXISTS `z_lottery`;
CREATE TABLE `z_lottery`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `member_id` int NULL DEFAULT NULL COMMENT '会员',
  `category_id` int NULL DEFAULT NULL COMMENT '抽签活动',
  `winflag` int NULL DEFAULT 0 COMMENT '中签',
  `useflag` int NULL DEFAULT 0 COMMENT '是否使用',
  `type` int NULL DEFAULT 0 COMMENT '0 空投;1 每日签到;2 邀请',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_lotteryset
-- ----------------------------
DROP TABLE IF EXISTS `z_lotteryset`;
CREATE TABLE `z_lotteryset`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '活动',
  `period` int NULL DEFAULT NULL COMMENT '期数',
  `person` int NULL DEFAULT NULL COMMENT '人数',
  `start_time` int NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` int NULL DEFAULT NULL COMMENT '结束时间',
  `prevtime` int NULL DEFAULT NULL COMMENT '提前分钟数',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_lotteryset_detail
-- ----------------------------
DROP TABLE IF EXISTS `z_lotteryset_detail`;
CREATE TABLE `z_lotteryset_detail`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL COMMENT 'nftid',
  `percent` decimal(18, 4) NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member
-- ----------------------------
DROP TABLE IF EXISTS `z_member`;
CREATE TABLE `z_member`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '密码',
  `nickname` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `secondpassword` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '二级密码',
  `address` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '地址',
  `area` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `level` int NULL DEFAULT 0 COMMENT '节点等级',
  `pid` int NULL DEFAULT NULL COMMENT '父节点',
  `ptree` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '团队树',
  `totalrecharge` decimal(18, 6) NULL DEFAULT 0.000000 COMMENT '累计充值',
  `balance` decimal(18, 6) NULL DEFAULT 0.000000 COMMENT '余额',
  `bonus` decimal(18, 6) NULL DEFAULT 0.000000 COMMENT '分红',
  `teamtree` varchar(11) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '团队结构',
  `status` int NULL DEFAULT 1 COMMENT '状态',
  `token` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT 'token',
  `privatekey` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '密匙',
  `hexaddress` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT 'hex地址',
  `bonusonline` decimal(18, 6) NULL DEFAULT 0.000000,
  `totalcount` int NULL DEFAULT 0 COMMENT '总单量',
  `ip` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT 'ip',
  `country` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '国家',
  `agentid` int NULL DEFAULT NULL COMMENT '代理',
  `score` int NULL DEFAULT 0 COMMENT '积分',
  `avatar` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `verify` int NULL DEFAULT 0,
  `idcardfront` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `idcardend` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `idcard` varchar(18) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '身份证',
  `realname` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '姓名',
  `openid` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `invitecode` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `isp` int NULL DEFAULT 0 COMMENT '运营商',
  `invitenum` int NULL DEFAULT NULL COMMENT '邀请人数',
  `inviteverifynum` int NULL DEFAULT NULL COMMENT '邀请实名人数',
  `real_time` timestamp NULL DEFAULT NULL COMMENT '实名时间',
  `liveaddress` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '快递地址',
  `livephone` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '收货手机',
  `livename` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '收货人',
  `livearea` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '地区',
  `livememo` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注信息',
  `cverify` int NULL DEFAULT 0,
  `age` int NULL DEFAULT NULL,
  `sex` int NULL DEFAULT 0 COMMENT '0未知 1男 2女',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `shuhe_code` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '数盒身份码',
  `shuhe_address` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '数盒钱包地址',
  `channel` int NULL DEFAULT 0 COMMENT '0 数元 1 数盒',
  `wenshu_user_id` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '文数用户id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `id`(`id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 92 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_bankcard
-- ----------------------------
DROP TABLE IF EXISTS `z_member_bankcard`;
CREATE TABLE `z_member_bankcard`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `cardno` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '银行卡号',
  `member_id` int NULL DEFAULT NULL COMMENT '会员号',
  `status` int NULL DEFAULT 1 COMMENT '状态',
  `bank` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '银行',
  `bindcardid` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `phone` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_blind
-- ----------------------------
DROP TABLE IF EXISTS `z_member_blind`;
CREATE TABLE `z_member_blind`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL,
  `blind_id` int NULL DEFAULT NULL,
  `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `status` int NULL DEFAULT NULL,
  `member_nft_id` int NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '会员盲盒' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_extend
-- ----------------------------
DROP TABLE IF EXISTS `z_member_extend`;
CREATE TABLE `z_member_extend`  (
  `member_id` int NOT NULL,
  `invite_num` int NULL DEFAULT NULL COMMENT '邀请人数',
  `inviteverify_num` int NULL DEFAULT NULL COMMENT '实名邀请人数',
  `youzan_count` int NULL DEFAULT NULL COMMENT '有赞优惠券',
  `pmember_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '父级用户名',
  PRIMARY KEY (`member_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户拓展表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_friends
-- ----------------------------
DROP TABLE IF EXISTS `z_member_friends`;
CREATE TABLE `z_member_friends`  (
  `zid` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL,
  `friend_id` int NULL DEFAULT NULL,
  `add_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`zid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '会员好友' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_goods
-- ----------------------------
DROP TABLE IF EXISTS `z_member_goods`;
CREATE TABLE `z_member_goods`  (
  `member_goods_id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '会员id',
  `type` int NULL DEFAULT NULL COMMENT '类型 1 藏品 2 盲盒',
  `type_id` int NULL DEFAULT NULL COMMENT '类别id',
  `target_id` int NULL DEFAULT NULL COMMENT '具体物品id',
  `creation_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`member_goods_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 992 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '会员物品' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_invite
-- ----------------------------
DROP TABLE IF EXISTS `z_member_invite`;
CREATE TABLE `z_member_invite`  (
  `parent_id` int NULL DEFAULT NULL,
  `member_id` int NOT NULL,
  PRIMARY KEY (`member_id`) USING BTREE,
  INDEX `parent_id`(`parent_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '会员邀请表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_mt_record
-- ----------------------------
DROP TABLE IF EXISTS `z_member_mt_record`;
CREATE TABLE `z_member_mt_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '用户id',
  `count` int NULL DEFAULT NULL COMMENT '数量',
  `type` tinyint NULL DEFAULT NULL COMMENT '1 获取 2 支出',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `activity_id` int NULL DEFAULT NULL,
  `activity_type` int NULL DEFAULT NULL COMMENT '来源渠道',
  `deleted` tinyint NULL DEFAULT 0,
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 452 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '会员代币记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_member_nft
-- ----------------------------
DROP TABLE IF EXISTS `z_member_nft`;
CREATE TABLE `z_member_nft`  (
  `member_nft_id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `member_id` int NULL DEFAULT 0 COMMENT '会员',
  `nft_id` int NULL DEFAULT NULL COMMENT 'NFT',
  `blockaddr` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '' COMMENT 'NFT地址',
  `file` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '源文件路径',
  `code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '唯一编号',
  `status` int NULL DEFAULT NULL COMMENT '状态 0 未发行 1 已发行 3 首次持有 4 已转赠',
  `batch_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `nft_class_address` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `operation_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `task_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `tx_hash` varchar(130) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '交易哈希',
  `source_type` int NULL DEFAULT NULL COMMENT '1 订单 2 合成 3 开盲盒 4 空投 5 转赠 6 抽奖 21 DIY',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`member_nft_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 400 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_msg_code
-- ----------------------------
DROP TABLE IF EXISTS `z_msg_code`;
CREATE TABLE `z_msg_code`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `phone` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `status` int NULL DEFAULT 0,
  `type` int NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 166 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft
-- ----------------------------
DROP TABLE IF EXISTS `z_nft`;
CREATE TABLE `z_nft`  (
  `nft_id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '主标题',
  `subname` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '副标题',
  `code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '藏品编号',
  `mainphoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '主图',
  `model` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '3D模型',
  `category_id` int NULL DEFAULT NULL COMMENT '类别',
  `author` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '作者',
  `brander_id` int NULL DEFAULT NULL COMMENT '版权方',
  `publisher_id` int NULL DEFAULT NULL COMMENT '发行方',
  `memo` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '描述',
  `amount` decimal(18, 2) NULL DEFAULT NULL COMMENT '售价',
  `status` int NULL DEFAULT 0 COMMENT '上架状态',
  `tag` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '标签',
  `blockaddr` varchar(256) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `file` varchar(512) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '藏品文件',
  `type` int NULL DEFAULT 1 COMMENT '藏品类型 1 图片 2视频 3音乐',
  `bigphoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '大图',
  `transferflag` int NULL DEFAULT 1 COMMENT '转赠开关',
  `chainflag` int NULL DEFAULT 1 COMMENT '是否上链',
  `function_type` int NULL DEFAULT NULL COMMENT '1 普通藏品 2 diy',
  `saleflag` int NULL DEFAULT 0 COMMENT '寄售开关',
  `mergeflag` int NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `publish_time` timestamp NULL DEFAULT NULL COMMENT '发布时间',
  `prestart` timestamp NULL DEFAULT NULL COMMENT '预售开始',
  `preend` timestamp NULL DEFAULT NULL COMMENT '预售结束',
  `avata_time` timestamp NULL DEFAULT NULL COMMENT '铸造时间',
  `visualnum` int NULL DEFAULT NULL COMMENT '虚拟参与人数',
  `sort` int NULL DEFAULT 0 COMMENT '排序',
  `publish_count` int NULL DEFAULT NULL COMMENT '发行总量',
  `lock_circulation` tinyint NULL DEFAULT 0 COMMENT '0 未锁定 1 已锁定',
  `deleted` int NULL DEFAULT 0,
  `score_amount` int NULL DEFAULT NULL COMMENT '兑换所需积分',
  PRIMARY KEY (`nft_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 139 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = 'nft' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_area
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_area`;
CREATE TABLE `z_nft_area`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `area_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分区名称',
  `area_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分区编号',
  `area_description` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分区描述',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `sort` int NULL DEFAULT NULL COMMENT '排序',
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '内容分区' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_area_category
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_area_category`;
CREATE TABLE `z_nft_area_category`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `area_id` int NULL DEFAULT NULL,
  `category_id` int NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '分区系列中间表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_blind
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_blind`;
CREATE TABLE `z_nft_blind`  (
  `blind_id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NULL DEFAULT NULL,
  `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `subname` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `mainphoto` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '首页封面图',
  `subphoto` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '详情封面图',
  `code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `tag` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `brander_id` int NULL DEFAULT NULL,
  `publisher_id` int NULL DEFAULT NULL,
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `amount` decimal(9, 2) NULL DEFAULT NULL,
  `visualnum` int NULL DEFAULT NULL,
  `status` int NULL DEFAULT NULL,
  `publish_time` timestamp NULL DEFAULT NULL,
  `prestart` timestamp NULL DEFAULT NULL,
  `preend` timestamp NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  `count` int NULL DEFAULT NULL,
  `publish_count` int NULL DEFAULT NULL,
  `sort` int NULL DEFAULT NULL,
  `deleted` int NULL DEFAULT 0,
  `score_amount` int NULL DEFAULT NULL COMMENT '兑换所需积分',
  PRIMARY KEY (`blind_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 71 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品盲盒' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_blind_details
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_blind_details`;
CREATE TABLE `z_nft_blind_details`  (
  `blind_details_id` int NOT NULL AUTO_INCREMENT,
  `blind_id` int NULL DEFAULT NULL,
  `nft_id` int NULL DEFAULT NULL,
  `nft_count` int NULL DEFAULT NULL COMMENT '总数',
  `probability` int NULL DEFAULT NULL COMMENT '概率',
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`blind_details_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '盲盒详情' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_compound
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_compound`;
CREATE TABLE `z_nft_compound`  (
  `compound_id` int NOT NULL AUTO_INCREMENT,
  `compound_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '方案名称',
  `compound_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '方案编号',
  `nft_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`compound_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品合成方案' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_compound_details
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_compound_details`;
CREATE TABLE `z_nft_compound_details`  (
  `details_id` int NOT NULL AUTO_INCREMENT,
  `compound_id` int NULL DEFAULT NULL COMMENT '合成方案id',
  `nft_id` int NULL DEFAULT NULL COMMENT '所需nftid',
  `nft_number` int NULL DEFAULT NULL,
  PRIMARY KEY (`details_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = ' 藏品合成详情' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_destroy_record
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_destroy_record`;
CREATE TABLE `z_nft_destroy_record`  (
  `record_id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL,
  `member_id` int NULL DEFAULT NULL,
  `member_nft_id` int NULL DEFAULT NULL,
  `status` int NULL DEFAULT NULL,
  `task_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `operation_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `tx_hash` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT NULL COMMENT '藏品销毁记录',
  PRIMARY KEY (`record_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 75 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_issue_record
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_issue_record`;
CREATE TABLE `z_nft_issue_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL,
  `batch_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `shop_num` int NULL DEFAULT NULL COMMENT '商城数量',
  `compound_num` int NULL DEFAULT NULL COMMENT '合成数量',
  `air_num` int NULL DEFAULT NULL COMMENT '空投数量',
  `blind_num` int NULL DEFAULT NULL COMMENT '盲盒数量',
  `count` int NULL DEFAULT NULL COMMENT '总数量',
  `publish_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发行日期',
  `deleted` int NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品发行记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_sku_stock
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_sku_stock`;
CREATE TABLE `z_nft_sku_stock`  (
  `stock_id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL,
  `type` int NULL DEFAULT NULL COMMENT '类型',
  `stock` int NULL DEFAULT NULL COMMENT '库存',
  `update_interval` int NULL DEFAULT 0 COMMENT '商城库存更新周期(天)',
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`stock_id`) USING BTREE,
  INDEX `union index`(`nft_id` ASC, `type` ASC) USING BTREE INVISIBLE
) ENGINE = InnoDB AUTO_INCREMENT = 273 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品规格库存表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_verification_auth
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_verification_auth`;
CREATE TABLE `z_nft_verification_auth`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_id` int NOT NULL COMMENT '分类id',
  `user_id` int NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 64 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品核销授权表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_nft_verification_record
-- ----------------------------
DROP TABLE IF EXISTS `z_nft_verification_record`;
CREATE TABLE `z_nft_verification_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL COMMENT '藏品id',
  `member_nft_id` int NULL DEFAULT NULL COMMENT '具体nft',
  `member_id` int NULL DEFAULT NULL COMMENT '使用人',
  `verificator` int NULL DEFAULT NULL COMMENT '核销人',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '核销时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '藏品核销记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_notice
-- ----------------------------
DROP TABLE IF EXISTS `z_notice`;
CREATE TABLE `z_notice`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL,
  `type` int NULL DEFAULT 1,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_order
-- ----------------------------
DROP TABLE IF EXISTS `z_order`;
CREATE TABLE `z_order`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `order_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `type_id` int NULL DEFAULT NULL COMMENT 'NFT产品',
  `amount` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '金额',
  `member_id` int NULL DEFAULT NULL COMMENT '会员',
  `type` int NULL DEFAULT 1 COMMENT '类型 1 藏品 2盲盒',
  `trade_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '支付单号',
  `status` int NULL DEFAULT 1 COMMENT '状态 0 待支付 1 支付中 2 已支付 -1 取消',
  `pay_url` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '支付地址',
  `real_amount` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '实际支付',
  `goods_id` int NULL DEFAULT NULL,
  `memo` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `notify_url` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '回调地址',
  `repay_url` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '跳转地址',
  `lottery_id` int NULL DEFAULT NULL COMMENT '抽签id',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `pay_time` timestamp NULL DEFAULT NULL,
  `pay_type` int NULL DEFAULT NULL COMMENT '支付类型 1 微信；3 支付宝；9 积分；12 支付宝-积分组合支付；',
  `deleted` int NULL DEFAULT 0,
  `score_amount` int NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 700 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_paytype
-- ----------------------------
DROP TABLE IF EXISTS `z_paytype`;
CREATE TABLE `z_paytype`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '支付名称',
  `appid` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '商户号',
  `appsecret` varchar(300) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '密匙',
  `appmd5key` varchar(300) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT 'md5密匙',
  `type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '支付形式',
  `status` int NULL DEFAULT NULL,
  `pay_url` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '支付地址',
  `notify_url` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '通知地址',
  `snotify_url` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '通知地址',
  `create_time` int NULL DEFAULT NULL,
  `update_time` int NULL DEFAULT NULL,
  `walletnotify_url` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '通知地址',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_protocol_content
-- ----------------------------
DROP TABLE IF EXISTS `z_protocol_content`;
CREATE TABLE `z_protocol_content`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '内容',
  `type` int NULL DEFAULT NULL COMMENT '0 服务协议 1 隐私协议',
  `creation_time` timestamp NULL DEFAULT NULL,
  `deleted` tinyint NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '协议内容' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_publisher
-- ----------------------------
DROP TABLE IF EXISTS `z_publisher`;
CREATE TABLE `z_publisher`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '版权方',
  `address` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '账户地址',
  `status` int NULL DEFAULT 1 COMMENT '状态',
  `logo` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT 'logo',
  `memo` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT 'memo',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '版权方' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_setting
-- ----------------------------
DROP TABLE IF EXISTS `z_setting`;
CREATE TABLE `z_setting`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `service` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `url` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `blockid` int NULL DEFAULT NULL,
  `locktime` int NULL DEFAULT 45 COMMENT '锁定天数',
  `translocktime` int NULL DEFAULT 15 COMMENT '转赠锁定天数',
  `ordertimeout` int NULL DEFAULT 30 COMMENT '订单超时分钟',
  `transferwhitelist` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '转赠白名单',
  `invitenum` int NULL DEFAULT NULL COMMENT '邀请人数',
  `earlybuy` int NULL DEFAULT NULL COMMENT '提前购分钟',
  `salestart` int NULL DEFAULT NULL COMMENT '寄售挂单开始',
  `saleend` int NULL DEFAULT NULL COMMENT '寄售挂单结束',
  `offtime` int NULL DEFAULT NULL COMMENT '寄售下架时间',
  `sharephoto` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '分享背景',
  `tag` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '标签',
  `lotterywhitelist` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '抽签白名单',
  `fee` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '手续费',
  `invitestart` int NULL DEFAULT NULL COMMENT '邀请开始',
  `inviteend` int NOT NULL COMMENT '邀请结束',
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `diy_consume` decimal(18, 2) NULL DEFAULT NULL COMMENT '头像diy花费 元',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_share_activity_platform
-- ----------------------------
DROP TABLE IF EXISTS `z_share_activity_platform`;
CREATE TABLE `z_share_activity_platform`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `activity_id` int NULL DEFAULT NULL COMMENT '活动ID',
  `platform` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '平台',
  `award` int NULL DEFAULT NULL COMMENT '积分奖励',
  `creation_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  `deleted` tinyint(1) NULL DEFAULT 0 COMMENT '逻辑删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 61 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '分享活动平台-积分表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_sign_record
-- ----------------------------
DROP TABLE IF EXISTS `z_sign_record`;
CREATE TABLE `z_sign_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL COMMENT '用户id',
  `remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '签到时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '签到表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_transfer
-- ----------------------------
DROP TABLE IF EXISTS `z_transfer`;
CREATE TABLE `z_transfer`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `from_id` int NULL DEFAULT NULL COMMENT '卖方',
  `to_id` int NULL DEFAULT NULL COMMENT '买方',
  `member_nft_id` int NULL DEFAULT NULL COMMENT 'NFT',
  `tradehash` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `recipient_address` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `operation_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `task_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `status` int NULL DEFAULT 0,
  `blockaddr` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT NULL,
  `type` int NULL DEFAULT 1 COMMENT '1 用户转赠 2 数盒存入 3 文数交转入',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_user_activity
-- ----------------------------
DROP TABLE IF EXISTS `z_user_activity`;
CREATE TABLE `z_user_activity`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `activity_id` int NULL DEFAULT NULL COMMENT '活动id',
  `complete` tinyint NULL DEFAULT NULL COMMENT '0 未完成 1 已完成',
  `member_id` int NULL DEFAULT NULL COMMENT '用户id',
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '领取时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 78 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户活动表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_white_list_get_record
-- ----------------------------
DROP TABLE IF EXISTS `z_white_list_get_record`;
CREATE TABLE `z_white_list_get_record`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `member_id` int NULL DEFAULT NULL,
  `type` int NULL DEFAULT NULL,
  `type_id` int NULL DEFAULT NULL,
  `creation_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '领取时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '白名单领取记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for z_whitelist
-- ----------------------------
DROP TABLE IF EXISTS `z_whitelist`;
CREATE TABLE `z_whitelist`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `nft_id` int NULL DEFAULT NULL COMMENT 'NFT',
  `member_id` int NULL DEFAULT NULL COMMENT '会员',
  `good_type` int NULL DEFAULT NULL COMMENT '1 藏品 2盲盒',
  `type` int NULL DEFAULT NULL,
  `price` decimal(8, 2) NULL DEFAULT NULL,
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
