/*
 Navicat Premium Data Transfer

 Source Server         : 多样青春夜校11
 Source Server Type    : MySQL
 Source Server Version : 50650
 Source Host           : 211.159.157.63:3306
 Source Schema         : duoyangqingchunyexiao

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

 Date: 02/04/2025 17:50:59
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for baoming
-- ----------------------------
DROP TABLE IF EXISTS `baoming`;
CREATE TABLE `baoming`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `keid` int(11) NULL DEFAULT NULL,
  `ctime` int(18) NULL DEFAULT NULL COMMENT '创建时间',
  `userid` int(11) NULL DEFAULT NULL COMMENT '报名用户',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报课状态,1.申请中,2,审核中,3,已审核,4报名成功',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1320 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for code
-- ----------------------------
DROP TABLE IF EXISTS `code`;
CREATE TABLE `code`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `time` int(18) NULL DEFAULT NULL COMMENT '过期时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_admin
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_admin`;
CREATE TABLE `dyqc_admin`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `username` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户名',
  `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '昵称',
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码',
  `salt` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码盐',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '电子邮箱',
  `mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号码',
  `loginfailure` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '失败次数',
  `logintime` bigint(16) NULL DEFAULT NULL COMMENT '登录时间',
  `loginip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录IP',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `token` varchar(59) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'Session标识',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'normal' COMMENT '状态',
  `area_json` varchar(3000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '限定区域（不填为不限制）',
  `admin_shop_id` int(11) NULL DEFAULT 0 COMMENT '生成机构id',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE,
  INDEX `admin_shop_id`(`admin_shop_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_admin_api_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_admin_api_log`;
CREATE TABLE `dyqc_admin_api_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '管理员名字',
  `url` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作页面',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志标题',
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'User-Agent',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13271 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员api日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_admin_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_admin_log`;
CREATE TABLE `dyqc_admin_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '管理员名字',
  `url` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '操作页面',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '日志标题',
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'User-Agent',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13869 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_api_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_api_auth_group`;
CREATE TABLE `dyqc_api_auth_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父组别',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组名',
  `rules` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则ID',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分api组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_api_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_api_auth_group_access`;
CREATE TABLE `dyqc_api_auth_group_access`  (
  `uid` int(10) UNSIGNED NOT NULL COMMENT '会员ID',
  `group_id` int(10) UNSIGNED NOT NULL COMMENT '级别ID',
  UNIQUE INDEX `uid_group_id`(`uid`, `group_id`) USING BTREE,
  INDEX `uid`(`uid`) USING BTREE,
  INDEX `group_id`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'api权限分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_api_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_api_auth_rule`;
CREATE TABLE `dyqc_api_auth_rule`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` enum('menu','file') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'file' COMMENT 'menu为菜单,file为权限节点',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父ID',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规则名称',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规则名称',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图标',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规则URL',
  `condition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '条件',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  `ismenu` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为菜单',
  `menutype` enum('addtabs','blank','dialog','ajax') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单类型',
  `extend` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扩展属性',
  `py` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拼音首字母',
  `pinyin` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拼音',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态',
  `rule_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限标识(菜单需要)',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 805 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'api节点表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_area
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_area`;
CREATE TABLE `dyqc_area`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `pid` int(10) NULL DEFAULT NULL COMMENT '父id',
  `shortname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '简称',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `mergename` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '全称',
  `level` tinyint(4) NULL DEFAULT NULL COMMENT '层级:1=省,2=市,3=区/县',
  `pinyin` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '拼音',
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '长途区号',
  `zip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮编',
  `first` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '首字母',
  `lng` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
  `lat` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3749 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '地区表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_attachment
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_attachment`;
CREATE TABLE `dyqc_attachment`  (
  `id` int(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类别',
  `admin_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '物理路径',
  `imagewidth` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '宽度',
  `imageheight` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '高度',
  `imagetype` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片类型',
  `imageframes` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '图片帧数',
  `filename` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件名称',
  `filesize` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件大小',
  `mimetype` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'mime类型',
  `extparam` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '透传数据',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建日期',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `uploadtime` bigint(16) NULL DEFAULT NULL COMMENT '上传时间',
  `storage` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'local' COMMENT '存储位置',
  `sha1` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件 sha1编码',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `category`(`category`) USING BTREE,
  INDEX `admin_id`(`admin_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `filename`(`filename`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3040 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '附件表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_auth_group`;
CREATE TABLE `dyqc_auth_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父组别',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组名',
  `rules` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规则ID',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_auth_group_access`;
CREATE TABLE `dyqc_auth_group_access`  (
  `uid` int(10) UNSIGNED NOT NULL COMMENT '会员ID',
  `group_id` int(10) UNSIGNED NOT NULL COMMENT '级别ID',
  UNIQUE INDEX `uid_group_id`(`uid`, `group_id`) USING BTREE,
  INDEX `uid`(`uid`) USING BTREE,
  INDEX `group_id`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '权限分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_auth_rule`;
CREATE TABLE `dyqc_auth_rule`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` enum('menu','file') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'file' COMMENT 'menu为菜单,file为权限节点',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父ID',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规则名称',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规则名称',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图标',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '规则URL',
  `condition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '条件',
  `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  `ismenu` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为菜单',
  `menutype` enum('addtabs','blank','dialog','ajax') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单类型',
  `extend` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扩展属性',
  `py` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拼音首字母',
  `pinyin` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '拼音',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 821 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '节点表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_category
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_category`;
CREATE TABLE `dyqc_category`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父ID',
  `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '栏目类型',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  `flag` set('hot','index','recommend') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  `image` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片',
  `keywords` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '关键字',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
  `diyname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '自定义名称',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `weigh`(`weigh`, `id`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分类表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_command
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_command`;
CREATE TABLE `dyqc_command`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '类型',
  `params` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '参数',
  `command` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '命令',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '返回结果',
  `executetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '执行时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '更新时间',
  `status` enum('successed','failured') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'failured' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 277 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '在线命令表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_config
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_config`;
CREATE TABLE `dyqc_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变量名',
  `group` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分组',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变量标题',
  `tip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变量描述',
  `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
  `visible` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '可见条件',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '变量值',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '变量字典数据',
  `rule` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '验证规则',
  `extend` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扩展属性',
  `setting` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 68 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统配置' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_crontab
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_crontab`;
CREATE TABLE `dyqc_crontab`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '事件类型',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '事件标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '事件内容',
  `schedule` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'Crontab格式',
  `sleep` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '延迟秒数执行',
  `maximums` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最大执行次数 0为不限',
  `executes` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已经执行的次数',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `begintime` bigint(16) NULL DEFAULT NULL COMMENT '开始时间',
  `endtime` bigint(16) NULL DEFAULT NULL COMMENT '结束时间',
  `executetime` bigint(16) NULL DEFAULT NULL COMMENT '最后执行时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` enum('completed','expired','hidden','normal') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'normal' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_crontab_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_crontab_log`;
CREATE TABLE `dyqc_crontab_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `crontab_id` int(10) NULL DEFAULT NULL COMMENT '任务ID',
  `executetime` bigint(16) NULL DEFAULT NULL COMMENT '执行时间',
  `completetime` bigint(16) NULL DEFAULT NULL COMMENT '结束时间',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '执行结果',
  `processid` int(10) NULL DEFAULT 0 COMMENT '进程ID',
  `status` enum('success','failure','inprogress') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'failure' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `crontab_id`(`crontab_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 271 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_csmtable_xlstask
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_csmtable_xlstask`;
CREATE TABLE `dyqc_csmtable_xlstask`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
  `admin_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '管理员',
  `filesource` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件来源标记',
  `filename` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名',
  `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '参数',
  `progress` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '下载进度',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `iserror` enum('Y','N') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'N' COMMENT '是否处理错误',
  `errormsg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '错误信息',
  `b1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段1',
  `b2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段2',
  `b3` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段3',
  `b4` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段4',
  `b5` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段5',
  `b6` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段6',
  `b7` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段7',
  `b8` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段8',
  `b9` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备用字段9',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 378 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'Excel下载任务表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_ems
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_ems`;
CREATE TABLE `dyqc_ems`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `event` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '事件',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '邮箱',
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '验证码',
  `times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '验证次数',
  `ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'IP',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邮箱验证码表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_jobs
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_jobs`;
CREATE TABLE `dyqc_jobs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED NULL DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore`;
CREATE TABLE `dyqc_manystore`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `shop_id` int(10) NOT NULL DEFAULT 0 COMMENT '商家ID',
  `is_main` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否主账号',
  `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户名',
  `nickname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '昵称',
  `password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '密码',
  `salt` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '密码盐',
  `avatar` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '头像',
  `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '电子邮箱',
  `loginfailure` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '失败次数',
  `logintime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录时间',
  `loginip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录IP',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `token` varchar(59) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'Session标识',
  `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'normal' COMMENT '状态',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '机构前端用户',
  `shop_apply_id` int(11) NULL DEFAULT 0 COMMENT '机构申请ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 192 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家管理员表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_api_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_api_auth_group`;
CREATE TABLE `dyqc_manystore_api_auth_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `shop_id` int(10) NOT NULL COMMENT '商家ID',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父组别',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '组名',
  `rules` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '规则ID',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'normal' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 140 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家API分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_api_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_api_auth_group_access`;
CREATE TABLE `dyqc_manystore_api_auth_group_access`  (
  `uid` int(10) UNSIGNED NOT NULL COMMENT '会员ID',
  `group_id` int(10) UNSIGNED NOT NULL COMMENT '级别ID',
  UNIQUE INDEX `uid_group_id`(`uid`, `group_id`) USING BTREE,
  INDEX `uid`(`uid`) USING BTREE,
  INDEX `group_id`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家API权限分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_api_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_api_auth_rule`;
CREATE TABLE `dyqc_manystore_api_auth_rule`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` enum('menu','file') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'file' COMMENT 'menu为菜单,file为权限节点',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父ID',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则名称',
  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则名称',
  `icon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图标',
  `condition` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '条件',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `ismenu` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为菜单',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '状态',
  `authtype` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT ' 开放状态:1=开发,2=关闭',
  `asname` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由唯一name（vue-router）',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 342 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家API菜单节点表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_api_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_api_log`;
CREATE TABLE `dyqc_manystore_api_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `shop_id` int(10) NOT NULL DEFAULT 0 COMMENT '商家ID',
  `store_id` int(10) NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `username` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '管理员名字',
  `url` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作页面',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '日志标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'User-Agent',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2434 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家API后台管理员日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_attachment
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_attachment`;
CREATE TABLE `dyqc_manystore_attachment`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `shop_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商家ID',
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物理路径',
  `imagewidth` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '宽度',
  `imageheight` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '高度',
  `imagetype` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片类型',
  `imageframes` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '图片帧数',
  `filename` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件名称',
  `filesize` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件大小',
  `mimetype` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'mime类型',
  `extparam` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '透传数据',
  `createtime` int(10) NULL DEFAULT NULL COMMENT '创建日期',
  `updatetime` int(10) NULL DEFAULT NULL COMMENT '更新时间',
  `uploadtime` int(10) NULL DEFAULT NULL COMMENT '上传时间',
  `storage` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'local' COMMENT '存储位置',
  `sha1` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
  `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类别',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `filename`(`filename`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 340 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '附件表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_auth_group`;
CREATE TABLE `dyqc_manystore_auth_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `shop_id` int(10) NOT NULL COMMENT '商家ID',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父组别',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '组名',
  `rules` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '规则ID',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'normal' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 140 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_auth_group_access
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_auth_group_access`;
CREATE TABLE `dyqc_manystore_auth_group_access`  (
  `uid` int(10) UNSIGNED NOT NULL COMMENT '会员ID',
  `group_id` int(10) UNSIGNED NOT NULL COMMENT '级别ID',
  UNIQUE INDEX `uid_group_id`(`uid`, `group_id`) USING BTREE,
  INDEX `uid`(`uid`) USING BTREE,
  INDEX `group_id`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家权限分组表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_auth_rule
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_auth_rule`;
CREATE TABLE `dyqc_manystore_auth_rule`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` enum('menu','file') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'file' COMMENT 'menu为菜单,file为权限节点',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父ID',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则名称',
  `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '规则名称',
  `icon` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图标',
  `condition` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '条件',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
  `ismenu` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为菜单',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '状态',
  `authtype` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT ' 开放状态:1=开发,2=关闭',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 322 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家菜单节点表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_command
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_command`;
CREATE TABLE `dyqc_manystore_command`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '类型',
  `params` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '参数',
  `command` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '命令',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '返回结果',
  `executetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '执行时间',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `status` enum('successed','failured') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'failured' COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 66 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家在线命令表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_config
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_config`;
CREATE TABLE `dyqc_manystore_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变量名',
  `group` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变量标题',
  `tip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变量描述',
  `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '变量字典数据',
  `rule` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '验证规则',
  `extend` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '扩展属性',
  `setting` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配置',
  `default` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '默认值',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家系统配置表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_config_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_config_group`;
CREATE TABLE `dyqc_manystore_config_group`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `unique` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '字符唯一标识',
  `name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `unique`(`unique`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家系统配置分组' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_log`;
CREATE TABLE `dyqc_manystore_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `shop_id` int(10) NOT NULL DEFAULT 0 COMMENT '商家ID',
  `store_id` int(10) NOT NULL DEFAULT 0 COMMENT '管理员ID',
  `username` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '管理员名字',
  `url` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作页面',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '日志标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'User-Agent',
  `createtime` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`username`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4000 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家管理员日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_shop
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_shop`;
CREATE TABLE `dyqc_manystore_shop`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '机构前端用户',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '店铺名称',
  `logo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '品牌LOGO',
  `image` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面图',
  `images` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '店铺环境照片',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '店铺地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '店铺详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `yyzzdm` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '营业执照',
  `yyzz_images` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '营业执照照片',
  `front_idcard_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人身份证正面',
  `reverse_idcard_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人身份证反面',
  `tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '服务电话',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '店铺详情',
  `type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '类型:1=个人,2=机构',
  `desc` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '申请备注',
  `status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `auth_time` int(11) NULL DEFAULT 0 COMMENT '审核时间',
  `admin_id` int(11) NULL DEFAULT 0 COMMENT '审核管理员id',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '修改时间',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `loss_ratio` decimal(12, 2) NULL DEFAULT NULL COMMENT '课程损耗比（百分制）',
  `establish_time` bigint(14) NULL DEFAULT NULL COMMENT '成立时间',
  `people` int(255) NULL DEFAULT NULL COMMENT '员工人数',
  `legal_entity` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人姓名',
  `gender` tinyint(2) NULL DEFAULT 1 COMMENT '法人或个人性别:0=女,1=男',
  `nation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人民族',
  `out_look` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人政治面貌',
  `birthtime` bigint(20) NULL DEFAULT NULL COMMENT '法人或个人出生日期',
  `native_place` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人籍贯',
  `card_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人身份证号码',
  `diploma` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人学历',
  `post` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人职务',
  `social_position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人社会职务',
  `shop_star` decimal(10, 1) NOT NULL DEFAULT 5.0 COMMENT '教师环境',
  `star_number` int(11) NOT NULL DEFAULT 0 COMMENT '评价数',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `province`(`province`) USING BTREE,
  INDEX `city`(`city`) USING BTREE,
  INDEX `district`(`district`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `address_city`(`address_city`) USING BTREE,
  INDEX `longitude`(`longitude`) USING BTREE,
  INDEX `latitude`(`latitude`) USING BTREE,
  INDEX `type`(`type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 199 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '店铺表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_shop_apply
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_shop_apply`;
CREATE TABLE `dyqc_manystore_shop_apply`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '申请用户',
  `type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '类型:1=个人,2=机构',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '机构名称',
  `realname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系人姓名',
  `mobile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '联系电话',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构|授课地址',
  `shop_id` int(11) NULL DEFAULT NULL COMMENT '申请的机构id',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '修改时间',
  `store_id` int(10) NULL DEFAULT 0 COMMENT '管理员ID',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构申请' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_shop_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_shop_log`;
CREATE TABLE `dyqc_manystore_shop_log`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '机构前端用户',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '店铺名称',
  `logo` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '品牌LOGO',
  `image` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '封面图',
  `images` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '店铺环境照片',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '店铺地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '店铺详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `yyzzdm` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '营业执照',
  `yyzz_images` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '营业执照照片',
  `front_idcard_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人身份证正面',
  `reverse_idcard_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人身份证反面',
  `tel` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '服务电话',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '店铺详情',
  `type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '类型:1=个人,2=机构',
  `desc` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '申请备注',
  `status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `auth_time` int(11) NULL DEFAULT 0 COMMENT '审核时间',
  `admin_id` int(11) NULL DEFAULT 0 COMMENT '审核管理员id',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '修改时间',
  `establish_time` bigint(14) NULL DEFAULT NULL COMMENT '成立时间',
  `people` int(255) NULL DEFAULT NULL COMMENT '员工人数',
  `legal_entity` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人姓名',
  `gender` tinyint(2) NULL DEFAULT 1 COMMENT '法人或个人性别:0=女,1=男',
  `nation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人民族',
  `out_look` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人政治面貌',
  `birthtime` bigint(20) NULL DEFAULT NULL COMMENT '法人或个人出生日期',
  `native_place` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人籍贯',
  `card_number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人身份证号码',
  `diploma` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人学历',
  `post` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人职务',
  `social_position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '法人或个人社会职务',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '店铺更新log表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_token
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_token`;
CREATE TABLE `dyqc_manystore_token`  (
  `token` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Token',
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '机构后台ID',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `expiretime` bigint(16) NULL DEFAULT NULL COMMENT '过期时间',
  PRIMARY KEY (`token`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构后台Token表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_user_auth
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_user_auth`;
CREATE TABLE `dyqc_manystore_user_auth`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shop_id` int(11) NOT NULL COMMENT '机构shopid',
  `user_id` int(11) NOT NULL COMMENT '授权用户',
  `status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '授权状态:0=待确认,1=通过,2=拒绝',
  `auth_time` int(11) NULL DEFAULT 0 COMMENT '授权确认时间',
  `createtime` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发起时间',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 181 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '授权机构用户' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_manystore_value
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_manystore_value`;
CREATE TABLE `dyqc_manystore_value`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `shop_id` int(10) NOT NULL COMMENT '商家ID',
  `store_id` int(10) NOT NULL COMMENT '管理员ID',
  `config_id` int(10) NOT NULL COMMENT '配置id',
  `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '变量值',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商家系统配置数据表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_area
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_area`;
CREATE TABLE `dyqc_school_area`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `pid` int(11) NULL DEFAULT 0 COMMENT '上级',
  `level` int(11) NULL DEFAULT 1,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `level`(`level`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 900002 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '省市区数据' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity`;
CREATE TABLE `dyqc_school_classes_activity`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `address_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '地址类型:1=按机构,2=独立位置',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '活动地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '活动详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '活动开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '活动结束时间',
  `sign_start_time` bigint(20) NULL DEFAULT NULL COMMENT '报名开始时间',
  `sign_end_time` bigint(20) NULL DEFAULT NULL COMMENT '报名结束时间',
  `price` decimal(10, 2) NOT NULL COMMENT '报名费用',
  `people_num` int(11) NULL DEFAULT 0 COMMENT '活动人数',
  `item` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动项目',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动详情',
  `status` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架,3=平台下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `recommend` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台推荐:0=否,1=是',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台热门:0=否,1=是',
  `new` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台最新:0=否,1=是',
  `selfhot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '机构热门:0=否,1=是',
  `sale` int(11) NULL DEFAULT 0 COMMENT '总销量',
  `stock` int(11) NULL DEFAULT NULL COMMENT '限制总人数',
  `views` bigint(20) NULL DEFAULT 0 COMMENT '浏览量',
  `expirestatus` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '过期状态:1=进行中,2=已过期',
  `add_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '添加人类型:1=机构,2=总后台',
  `add_id` int(11) NOT NULL DEFAULT 0 COMMENT '添加人id',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  `classes_activity_auth_id` int(11) NULL DEFAULT 0 COMMENT '活动审核中的id',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '总已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '总已核销人数',
  `collect` bigint(20) NULL DEFAULT NULL COMMENT '实际收藏量',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `address_type`(`address_type`) USING BTREE,
  INDEX `address_city`(`address_city`) USING BTREE,
  INDEX `province`(`province`) USING BTREE,
  INDEX `city`(`city`) USING BTREE,
  INDEX `district`(`district`) USING BTREE,
  INDEX `address`(`address`) USING BTREE,
  INDEX `address_detail`(`address_detail`) USING BTREE,
  INDEX `longitude`(`longitude`) USING BTREE,
  INDEX `latitude`(`latitude`) USING BTREE,
  INDEX `start_time`(`start_time`) USING BTREE,
  INDEX `end_time`(`end_time`) USING BTREE,
  INDEX `sign_start_time`(`sign_start_time`) USING BTREE,
  INDEX `sign_end_time`(`sign_end_time`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `recommend`(`recommend`) USING BTREE,
  INDEX `hot`(`hot`) USING BTREE,
  INDEX `new`(`new`) USING BTREE,
  INDEX `selfhot`(`selfhot`) USING BTREE,
  INDEX `feel`(`feel`) USING BTREE,
  INDEX `classes_activity_auth_id`(`classes_activity_auth_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程活动' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_auth
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_auth`;
CREATE TABLE `dyqc_school_classes_activity_auth`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_activity_id` int(11) NULL DEFAULT NULL COMMENT '课程活动id',
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `address_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '地址类型:1=按机构,2=独立位置',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '活动地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '活动详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '活动开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '活动结束时间',
  `sign_start_time` bigint(20) NULL DEFAULT NULL COMMENT '报名开始时间',
  `sign_end_time` bigint(20) NULL DEFAULT NULL COMMENT '报名结束时间',
  `price` decimal(10, 2) NOT NULL COMMENT '报名费用',
  `people_num` int(11) NULL DEFAULT 0 COMMENT '活动人数',
  `item` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动项目',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动详情',
  `status` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架,3=平台下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `recommend` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台推荐:0=否,1=是',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台热门:0=否,1=是',
  `new` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台最新:0=否,1=是',
  `selfhot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '机构热门:0=否,1=是',
  `auth_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核不通过',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `expirestatus` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '过期状态:1=进行中,2=已过期',
  `add_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '添加人类型:1=机构,2=总后台',
  `add_id` int(11) NOT NULL DEFAULT 0 COMMENT '添加人id',
  `admin_id` int(11) NULL DEFAULT 0 COMMENT '审核管理员id',
  `auth_time` int(11) NULL DEFAULT 0 COMMENT '审核时间',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_activity_id`(`classes_activity_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `auth_status`(`auth_status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 28 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程活动审核' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_demo
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_demo`;
CREATE TABLE `dyqc_school_classes_activity_demo`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '活动地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '活动详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '活动开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '活动结束时间',
  `sign_start_time` bigint(20) NULL DEFAULT NULL COMMENT '报名开始时间',
  `sign_end_time` bigint(20) NULL DEFAULT NULL COMMENT '报名结束时间',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=报名中,2=已结束',
  `price` decimal(10, 2) NOT NULL COMMENT '报名费用',
  `people_num` int(11) NULL DEFAULT 0 COMMENT '活动人数',
  `item` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动项目',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动详情',
  `item_json` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动报名项目',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动样品数据' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_item
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_item`;
CREATE TABLE `dyqc_school_classes_activity_item`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `classes_activity_id` int(11) NOT NULL COMMENT '课程活动id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动项名称',
  `price` decimal(10, 2) NOT NULL COMMENT '项目价格（0为免费）',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '本项目限定人数',
  `age` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年龄限制描述',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `sex` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '性别限制:1=男,2=女,3=男女不限',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '已核销人数',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `classes_activity_id`(`classes_activity_id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE,
  INDEX `feel`(`feel`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程活动项目' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_item_auth
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_item_auth`;
CREATE TABLE `dyqc_school_classes_activity_item_auth`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `classes_activity_id` int(11) NOT NULL COMMENT '课程活动id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动项名称',
  `price` decimal(10, 2) NOT NULL COMMENT '项目价格（0为免费）',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '本项目限定人数',
  `age` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年龄限制描述',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `sex` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '性别限制:1=男,2=女,3=男女不限',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  `classes_activity_auth_id` int(11) NOT NULL DEFAULT 0 COMMENT '课程活动审核id',
  `classes_activity_item_id` int(11) NOT NULL DEFAULT 0 COMMENT '课程活动项id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `classes_activity_id`(`classes_activity_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `classes_activity_auth_id`(`classes_activity_auth_id`) USING BTREE,
  INDEX `classes_activity_item_id`(`classes_activity_item_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程活动项目审核表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_order
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_order`;
CREATE TABLE `dyqc_school_classes_activity_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `pay_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信支付单号',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '下单人用户id',
  `manystore_id` int(11) NULL DEFAULT NULL COMMENT '机构账号id',
  `shop_id` int(11) NULL DEFAULT NULL COMMENT '机构id',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核销码',
  `codeimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核销二维码图片',
  `codeoneimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核销一维码图片',
  `classes_activity_id` int(11) NULL DEFAULT NULL COMMENT '课程活动id',
  `activity_order_detail_id` int(11) NULL DEFAULT NULL COMMENT '订单课程活动id',
  `classes_activity_item_id` int(11) NULL DEFAULT NULL COMMENT '课程活动项id',
  `beforeprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单优惠前金额',
  `totalprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单应付金额',
  `payprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单实付金额',
  `pay_type` enum('yue','wechat') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'wechat' COMMENT '支付方式:yue=余额,wechat=微信',
  `status` enum('-3','0','2','3','4','5','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '订单状态:-3=已取消,0=待支付,2=已报名待审核,3=已预约,4=售后中,5=退款结算中,6=已退款,9=已完成',
  `before_status` enum('-3','0','3','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后前状态:-3=已取消,0=未售后,2=已报名待审核,3=已预约,4=售后中,6=已退款,9=已完成',
  `server_status` enum('0','3','6') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后订单状态:0=正常,3=售后中,6=售后完成',
  `canceltime` bigint(20) NULL DEFAULT NULL COMMENT '取消时间',
  `paytime` bigint(20) NULL DEFAULT NULL COMMENT '支付时间',
  `auth_time` bigint(20) NULL DEFAULT NULL COMMENT '审核时间',
  `reservation_time` bigint(20) NULL DEFAULT NULL COMMENT '预约时间',
  `finishtime` bigint(20) NULL DEFAULT NULL COMMENT '完成时间',
  `refundtime` bigint(20) NULL DEFAULT NULL COMMENT '退款时间',
  `total_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '应退款金额',
  `real_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '实际退款金额',
  `sub_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '剩余未退金额',
  `pay_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三方支付信息json',
  `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付平台',
  `verification_user_id` int(11) NULL DEFAULT 0 COMMENT '核销人用户id',
  `verification_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '核销用户类型',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `auth_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `auth_user_id` int(11) NULL DEFAULT 0 COMMENT '审核用户id',
  `auth_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '审核用户类型',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `activity_order_item_id` int(11) NULL DEFAULT 0 COMMENT '活动订单规格id',
  `refund_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '退款单号',
  `refund_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三方支付退款信息json',
  `refund_error` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三方支付退款错误信息更新',
  `refundsendtime` bigint(20) NULL DEFAULT NULL COMMENT '退款发起时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`(191)) USING BTREE,
  INDEX `pay_no`(`pay_no`(191)) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `code`(`code`(191)) USING BTREE,
  INDEX `classes_lib_id`(`classes_activity_id`) USING BTREE,
  INDEX `classes_order_detail_id`(`activity_order_detail_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `classes_activity_item_id`(`classes_activity_item_id`) USING BTREE,
  INDEX `activity_order_item_id`(`activity_order_item_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 322 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程活动订单' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_order_detail
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_order_detail`;
CREATE TABLE `dyqc_school_classes_activity_order_detail`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_activity_order_id` int(11) NULL DEFAULT NULL COMMENT '课程活动订单id',
  `classes_activity_id` int(11) NULL DEFAULT NULL COMMENT '课程活动id',
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构id',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '下单用户id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `address_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '地址类型:1=按机构,2=独立位置',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '活动地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '活动详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '活动开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '活动结束时间',
  `sign_start_time` bigint(20) NULL DEFAULT NULL COMMENT '报名开始时间',
  `sign_end_time` bigint(20) NULL DEFAULT NULL COMMENT '报名结束时间',
  `price` decimal(10, 2) NOT NULL COMMENT '报名费用',
  `people_num` int(11) NULL DEFAULT 0 COMMENT '活动人数',
  `item` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动项目',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动详情',
  `status` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架,3=平台下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `recommend` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台推荐:0=否,1=是',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台热门:0=否,1=是',
  `new` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台最新:0=否,1=是',
  `selfhot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '机构热门:0=否,1=是',
  `sale` int(11) NULL DEFAULT 0 COMMENT '总销量',
  `stock` int(11) NULL DEFAULT NULL COMMENT '限制总人数',
  `views` bigint(20) NULL DEFAULT 0 COMMENT '浏览量',
  `expirestatus` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '过期状态:1=进行中,2=已过期',
  `add_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '添加人类型:1=机构,2=总后台',
  `add_id` int(11) NOT NULL DEFAULT 0 COMMENT '添加人id',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '总已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '总已核销人数',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_activity_order_id`(`classes_activity_order_id`) USING BTREE,
  INDEX `classes_activity_id`(`classes_activity_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `start_time`(`start_time`) USING BTREE,
  INDEX `end_time`(`end_time`) USING BTREE,
  INDEX `sign_start_time`(`sign_start_time`) USING BTREE,
  INDEX `sign_end_time`(`sign_end_time`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程活动订单详情' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_order_item
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_order_item`;
CREATE TABLE `dyqc_school_classes_activity_order_item`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_activity_order_id` int(11) NULL DEFAULT NULL COMMENT '课程活动订单id',
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `classes_activity_id` int(11) NOT NULL COMMENT '课程活动id',
  `classes_activity_item_id` int(11) NULL DEFAULT NULL COMMENT '课程活动项id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动项名称',
  `price` decimal(10, 2) NOT NULL COMMENT '项目价格（0为免费）',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '本项目限定人数',
  `age` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '年龄限制描述',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `sex` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '性别限制:1=男,2=女,3=男女不限',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '已核销人数',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_activity_order_id`(`classes_activity_order_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `classes_activity_id`(`classes_activity_id`) USING BTREE,
  INDEX `classes_activity_item_id`(`classes_activity_item_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程活动订单项目规格' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_activity_order_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_activity_order_log`;
CREATE TABLE `dyqc_school_classes_activity_order_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_activity_order_id` int(11) NULL DEFAULT NULL COMMENT '课程活动订单id',
  `status` enum('-3','0','2','3','4','5','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '订单状态:-3=已取消,0=待支付,2=已报名待审核,3=已预约,4=售后中,5=退款结算中,6=已退款,9=已完成',
  `log_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录内容',
  `oper_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录人类型',
  `oper_id` int(11) NULL DEFAULT 0 COMMENT '记录人id',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_activity_order_id`(`classes_activity_order_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 374 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程活动订单日志' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_blacklist
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_blacklist`;
CREATE TABLE `dyqc_school_classes_blacklist`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL COMMENT '授权用户',
  `createtime` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '发起时间',
  `updatetime` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '免费课黑名单' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_cate
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_cate`;
CREATE TABLE `dyqc_school_classes_cate`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '热门:0=否,1=是',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `hot`(`hot`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程分类' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_collect
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_collect`;
CREATE TABLE `dyqc_school_classes_collect`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
  `classes_lib_id` int(11) NULL DEFAULT NULL COMMENT '课程id',
  `classes_activity_id` int(11) NULL DEFAULT NULL COMMENT '课程活动id',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE,
  INDEX `createtime`(`createtime`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 132 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '收藏记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_evaluate
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_evaluate`;
CREATE TABLE `dyqc_school_classes_evaluate`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NULL DEFAULT NULL COMMENT '评价用户id',
  `classes_lib_id` bigint(11) NOT NULL COMMENT '课程id',
  `classes_order_id` int(11) NULL DEFAULT NULL COMMENT '课程订单id',
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `teacher_id` int(11) NOT NULL COMMENT '老师id',
  `image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评价人头像',
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评价人昵称',
  `classes_star` decimal(10, 1) NOT NULL DEFAULT 0.5 COMMENT '课程评分',
  `teacher_star` decimal(10, 1) NOT NULL DEFAULT 0.5 COMMENT '讲师评分',
  `shop_star` decimal(10, 1) NOT NULL DEFAULT 0.5 COMMENT '教师环境',
  `message_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评价内容',
  `evaluate_time` bigint(14) NOT NULL COMMENT '评价时间',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `top` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否置顶:0=否,1=是',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `update_number` int(11) NOT NULL DEFAULT 0 COMMENT '修改次数',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `classes_order_id`(`classes_order_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `teacher_id`(`teacher_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `top`(`top`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程反馈表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_hour_order
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_hour_order`;
CREATE TABLE `dyqc_school_classes_hour_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `classes_order_id` int(11) NULL DEFAULT NULL COMMENT '课程订单id',
  `classes_lib_spec_id` int(11) NULL DEFAULT NULL COMMENT '课时id',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '下单人id',
  `classes_order_detail_id` int(11) NULL DEFAULT NULL COMMENT '订单课程id',
  `classes_lib_id` bigint(11) NULL DEFAULT NULL COMMENT '课程id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程规格名',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '结束时间',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '本课时限定人数（0不限制）',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '下单时已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '下单时已核销人数',
  `status` enum('-3','-1','0','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-1' COMMENT '订单状态:-3=已取消,-1=已报名待审核,0=已预约,3=已完成',
  `verification_user_id` int(11) NULL DEFAULT 0 COMMENT '核销人用户id',
  `reservation_time` bigint(20) NULL DEFAULT NULL COMMENT '预约时间',
  `finish_time` bigint(20) NULL DEFAULT NULL COMMENT '完成时间',
  `cancel_time` bigint(20) NULL DEFAULT NULL COMMENT '取消时间',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `auth_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '订单类型:1=线上预约,2=线下直接核销',
  `help_user_id` int(11) NULL DEFAULT 0 COMMENT '代下单工作人员用户id',
  `help_type` enum('user','admin','shop') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '代下单工作人员类型:user=前台员工,admin=系统管理员,shop=租户后台',
  `auth_time` bigint(20) NULL DEFAULT NULL COMMENT '审核时间',
  `auth_user_id` int(11) NULL DEFAULT 0 COMMENT '审核用户id',
  `auth_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '审核用户类型',
  `verification_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '核销用户类型',
  `manystore_id` int(11) NULL DEFAULT NULL COMMENT '机构账号id',
  `shop_id` int(11) NULL DEFAULT NULL COMMENT '机构店铺id',
  `expire_status` tinyint(2) NULL DEFAULT 0 COMMENT '过期状态:0=未过期,1=已过期',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`(191)) USING BTREE,
  INDEX `classes_order_id`(`classes_order_id`) USING BTREE,
  INDEX `classes_lib_spec_id`(`classes_lib_spec_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `classes_order_detail_id`(`classes_order_detail_id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `start_time`(`start_time`) USING BTREE,
  INDEX `end_time`(`end_time`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `auth_status`(`auth_status`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课时订单' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_hour_order_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_hour_order_log`;
CREATE TABLE `dyqc_school_classes_hour_order_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_hour_order_id` int(11) NULL DEFAULT NULL COMMENT '课时订单id',
  `status` enum('-3','-1','0','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '-1' COMMENT '订单状态:-3=已取消,-1=已报名待审核,0=已预约,3=已完成',
  `auth_status` tinyint(2) NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `log_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录内容',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `oper_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录人类型',
  `oper_id` int(11) NULL DEFAULT 0 COMMENT '记录人id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_hour_order_id`(`classes_hour_order_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2234 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课时订单日志' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_label
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_label`;
CREATE TABLE `dyqc_school_classes_label`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '类型标签名',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平台课程类型标签' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_lib
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_lib`;
CREATE TABLE `dyqc_school_classes_lib`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `user_id` int(11) NOT NULL COMMENT '主讲师用户id',
  `teacher_id` int(11) NOT NULL COMMENT '老师id',
  `classes_cate_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '平台课程分类ids',
  `classes_label_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台课程类型ids',
  `self_label_tag` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构特色标签',
  `add_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '添加人类型:1=机构,2=总后台',
  `add_id` int(11) NOT NULL DEFAULT 0 COMMENT '添加人id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `type` enum('out','in') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'in' COMMENT '地点类型:out=户外,in=室内',
  `classes_num` int(10) NOT NULL COMMENT '课时数',
  `address_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '地址类型:1=按机构,2=独立位置',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '店铺地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '店铺详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `classes_date_text` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上课日期',
  `classes_time_text` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上课时间',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程详情',
  `notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程须知',
  `virtual_num` int(11) NULL DEFAULT 0 COMMENT '虚拟报名人数',
  `sale` int(11) NULL DEFAULT 0 COMMENT '总销量',
  `price` decimal(10, 2) NOT NULL COMMENT '售价',
  `underline_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '划线价',
  `virtual_collect` int(11) NULL DEFAULT 0 COMMENT '虚拟收藏量',
  `status` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架,3=平台下架',
  `auth_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `auth_time` int(11) NULL DEFAULT 0 COMMENT '审核时间',
  `admin_id` int(11) NULL DEFAULT 0 COMMENT '审核管理员id',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `recommend` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台推荐:0=否,1=是',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台热门:0=否,1=是',
  `new` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台最新:0=否,1=是',
  `selfhot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '机构热门:0=否,1=是',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `virtual_people` int(11) NULL DEFAULT 0 COMMENT '虚拟参与人数',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '总限定人数（0不限制）',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '总已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '总已核销人数',
  `views` bigint(20) NULL DEFAULT 0 COMMENT '浏览量',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '结束时间',
  `collect` bigint(20) NULL DEFAULT NULL COMMENT '实际收藏量',
  `classes_type` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程类型',
  `classes_star` decimal(10, 1) NOT NULL DEFAULT 5.0 COMMENT '课程评分',
  `star_number` int(11) NOT NULL DEFAULT 0 COMMENT '评价数',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `teacher_id`(`teacher_id`) USING BTREE,
  INDEX `classes_cate_ids`(`classes_cate_ids`(191)) USING BTREE,
  INDEX `classes_label_ids`(`classes_label_ids`(191)) USING BTREE,
  INDEX `self_label_tag`(`self_label_tag`(191)) USING BTREE,
  INDEX `add_type`(`add_type`) USING BTREE,
  INDEX `add_id`(`add_id`) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `province`(`province`) USING BTREE,
  INDEX `city`(`city`) USING BTREE,
  INDEX `district`(`district`) USING BTREE,
  INDEX `longitude`(`longitude`) USING BTREE,
  INDEX `latitude`(`latitude`) USING BTREE,
  INDEX `auth_status`(`auth_status`) USING BTREE,
  INDEX `recommend`(`recommend`) USING BTREE,
  INDEX `hot`(`hot`) USING BTREE,
  INDEX `new`(`new`) USING BTREE,
  INDEX `selfhot`(`selfhot`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1176 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程库' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_lib_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_lib_log`;
CREATE TABLE `dyqc_school_classes_lib_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `user_id` int(11) NOT NULL COMMENT '主讲师用户id',
  `teacher_id` int(11) NOT NULL COMMENT '老师id',
  `classes_cate_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '平台课程分类ids',
  `classes_label_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台课程类型ids',
  `self_label_tag` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构特色标签',
  `add_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '2' COMMENT '添加人类型:1=机构,2=总后台',
  `add_id` int(11) NOT NULL DEFAULT 0 COMMENT '添加人id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '轮播图',
  `type` enum('out','in') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'in' COMMENT '地点类型:out=户外,in=室内',
  `classes_num` int(10) NOT NULL COMMENT '课时数',
  `address_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '地址类型:1=按机构,2=独立位置',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '店铺地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '店铺详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `classes_date_text` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上课日期',
  `classes_time_text` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '上课时间',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程详情',
  `notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '课程须知',
  `virtual_num` int(11) NULL DEFAULT 0 COMMENT '虚拟报名人数',
  `sale` int(11) NULL DEFAULT 0 COMMENT '总销量',
  `price` decimal(10, 2) NOT NULL COMMENT '售价',
  `underline_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '划线价',
  `virtual_collect` int(11) NULL DEFAULT 0 COMMENT '虚拟收藏量',
  `status` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架,3=平台下架',
  `auth_status` tinyint(2) NOT NULL DEFAULT 0 COMMENT '审核状态:0=待审核,1=审核通过,2=审核失败',
  `reason` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '审核不通过原因',
  `auth_time` int(11) NULL DEFAULT 0 COMMENT '审核时间',
  `admin_id` int(11) NULL DEFAULT 0 COMMENT '审核管理员id',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `recommend` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台推荐:0=否,1=是',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台热门:0=否,1=是',
  `new` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台最新:0=否,1=是',
  `selfhot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '机构热门:0=否,1=是',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `virtual_people` int(11) NULL DEFAULT 0 COMMENT '虚拟参与人数',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '总限定人数（0不限制）',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '总已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '总已核销人数',
  `views` bigint(20) NULL DEFAULT 0 COMMENT '浏览量',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '结束时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程库修改审核' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_lib_spec
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_lib_spec`;
CREATE TABLE `dyqc_school_classes_lib_spec`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_lib_id` bigint(11) NOT NULL COMMENT '课程id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规格名',
  `start_time` bigint(20) NOT NULL COMMENT '开始时间',
  `end_time` bigint(20) NOT NULL COMMENT '结束时间',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '本课时限定人数（0不限制）',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '已核销人数',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `start_time`(`start_time`) USING BTREE,
  INDEX `end_time`(`end_time`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1338 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程课时规格' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_lib_spec_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_lib_spec_log`;
CREATE TABLE `dyqc_school_classes_lib_spec_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_lib_id` bigint(11) NOT NULL COMMENT '课程id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '规格名',
  `start_time` bigint(20) NOT NULL COMMENT '开始时间',
  `end_time` bigint(20) NOT NULL COMMENT '结束时间',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '本课时限定人数（0不限制）',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '已核销人数',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程课时规格修改审核' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_order
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_order`;
CREATE TABLE `dyqc_school_classes_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `pay_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信支付单号',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '下单人id',
  `manystore_id` int(11) NULL DEFAULT NULL COMMENT '机构账号id',
  `shop_id` int(11) NULL DEFAULT NULL COMMENT '机构店铺id',
  `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核销码',
  `codeimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核销二维码图片',
  `codeoneimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '核销一维码图片',
  `classes_lib_id` int(11) NULL DEFAULT NULL COMMENT '课程id',
  `classes_order_detail_id` int(11) NULL DEFAULT NULL COMMENT '订单课程id',
  `beforeprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单优惠前金额',
  `totalprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单应付金额',
  `payprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '订单实付金额',
  `pay_type` enum('yue','wechat') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'wechat' COMMENT '支付方式:yue=余额,wechat=微信',
  `status` enum('-3','0','3','4','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '订单状态:-3=已取消,0=待支付,3=使用中,4=售后中,6=已退款,9=已完成',
  `before_status` enum('-3','0','3','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后前状态:-3=已取消,0=未售后,3=使用中,6=已退款,9=已完成',
  `server_status` enum('0','3','6') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后订单状态:0=正常,3=售后中,6=售后完成',
  `reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '售后申请原因',
  `auth_manystore_id` int(11) NULL DEFAULT NULL COMMENT '机构审核人id',
  `auth_opinion` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构审核意见',
  `auth_file` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构审核附件',
  `admin_id` int(11) NULL DEFAULT NULL COMMENT '平台审核人id',
  `result_status` enum('0','3','6') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后处理结果:0=未售后,3=退款,6=驳回',
  `result_text` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '售后处理结果说明',
  `result_file` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '售后处理结果说明附件',
  `canceltime` bigint(20) NULL DEFAULT NULL COMMENT '取消时间',
  `paytime` bigint(20) NULL DEFAULT NULL COMMENT '支付时间',
  `finishtime` bigint(20) NULL DEFAULT NULL COMMENT '完成时间',
  `refundtime` bigint(20) NULL DEFAULT NULL COMMENT '退款时间',
  `total_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '应退款金额',
  `real_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '实际退款金额',
  `sub_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '剩余未退金额',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `pay_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三方支付信息json',
  `platform` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付平台',
  `classes_service_order_id` int(11) NULL DEFAULT 0 COMMENT '售后订单id',
  `classes_lib_spec_id` int(11) NULL DEFAULT 0 COMMENT '快捷下单课时id',
  `classes_evaluate_id` int(11) NULL DEFAULT 0 COMMENT '课程反馈id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`(191)) USING BTREE,
  INDEX `pay_no`(`pay_no`(191)) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `code`(`code`(191)) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `classes_order_detail_id`(`classes_order_detail_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1212 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程订单' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_order_detail
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_order_detail`;
CREATE TABLE `dyqc_school_classes_order_detail`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_order_id` int(11) NULL DEFAULT NULL COMMENT '课程订单id',
  `classes_lib_id` int(11) NULL DEFAULT NULL COMMENT '课程id',
  `manystore_id` int(11) NULL DEFAULT NULL COMMENT '机构账号id',
  `shop_id` int(11) NULL DEFAULT NULL COMMENT '机构店铺id',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '主讲师用户id',
  `teacher_id` int(11) NULL DEFAULT NULL COMMENT '老师id',
  `classes_cate_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台课程分类ids',
  `classes_label_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台课程类型ids',
  `self_label_tag` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构特色标签',
  `add_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '2' COMMENT '添加人类型:1=机构,2=总后台',
  `add_id` int(11) NULL DEFAULT 0 COMMENT '添加人id',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  `headimage` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头图',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '轮播图',
  `type` enum('out','in') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'in' COMMENT '地点类型:out=户外,in=室内',
  `classes_num` int(10) NULL DEFAULT NULL COMMENT '课时数',
  `address_type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '地址类型:1=按机构,2=独立位置',
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '城市选择',
  `province` int(11) NULL DEFAULT NULL COMMENT '省编号',
  `city` int(11) NULL DEFAULT NULL COMMENT '市编号',
  `district` int(11) NULL DEFAULT NULL COMMENT '县区编号',
  `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '店铺地址',
  `address_detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '店铺详细地址',
  `longitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '经度',
  `latitude` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '纬度',
  `classes_date_text` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上课日期',
  `classes_time_text` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上课时间',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '课程详情',
  `notice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '课程须知',
  `virtual_num` int(11) NULL DEFAULT NULL COMMENT '虚拟报名人数',
  `sale` int(11) NULL DEFAULT NULL COMMENT '总销量',
  `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '售价',
  `underline_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '划线价',
  `virtual_collect` int(11) NULL DEFAULT 0 COMMENT '虚拟收藏量',
  `use_num` int(11) NULL DEFAULT 0 COMMENT '已使用课时',
  `sub_num` int(11) NULL DEFAULT 0 COMMENT '剩余课时',
  `unit_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '计算单次单价',
  `used_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '计算的已使用金额',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `limit_num` int(11) NULL DEFAULT 0 COMMENT '总限定人数（0不限制）',
  `sign_num` int(11) NULL DEFAULT 0 COMMENT '总已报名人数',
  `verification_num` int(11) NULL DEFAULT NULL COMMENT '总已核销人数',
  `feel` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否免费:0=否,1=是',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` bigint(20) NULL DEFAULT NULL COMMENT '结束时间',
  `classes_type` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程类型',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_order_id`(`classes_order_id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `teacher_id`(`teacher_id`) USING BTREE,
  INDEX `classes_cate_ids`(`classes_cate_ids`(191)) USING BTREE,
  INDEX `classes_label_ids`(`classes_label_ids`(191)) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `price`(`price`) USING BTREE,
  INDEX `feel`(`feel`) USING BTREE,
  INDEX `start_time`(`start_time`) USING BTREE,
  INDEX `end_time`(`end_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1212 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程订单课程详情' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_order_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_order_log`;
CREATE TABLE `dyqc_school_classes_order_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_order_id` int(11) NULL DEFAULT NULL COMMENT '课程订单id',
  `status` enum('-3','0','3','4','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '订单状态:-3=已取消,0=待支付,3=使用中,4=售后中,6=已退款,9=已完成',
  `before_status` enum('-3','0','3','6','9') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后前状态:-3=已取消,0=未售后,3=使用中,6=已退款,9=已完成',
  `server_status` enum('0','3','6') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后订单状态:0=正常,3=售后中,6=售后完成',
  `result_status` enum('0','3','6') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '售后处理结果:0=未售后,3=退款,6=驳回',
  `log_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录内容',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `oper_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录人类型',
  `oper_id` int(11) NULL DEFAULT 0 COMMENT '记录人id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2589 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程订单日志' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_service_order
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_service_order`;
CREATE TABLE `dyqc_school_classes_service_order`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '售后单号',
  `classes_order_id` int(11) NOT NULL COMMENT '课程订单id',
  `user_id` int(11) NOT NULL COMMENT '下单人id',
  `classes_order_detail_id` int(11) NOT NULL COMMENT '订单课程id',
  `classes_lib_id` bigint(11) NOT NULL COMMENT '课程id',
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `status` enum('1','4','7','-3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '售后状态:1=待处理,4=处理中,7=已结单,-3=已取消',
  `service_stauts` enum('1','4','7','10','-3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '售后处理状态:1=待机构处理,4=待用户确认,7=售后通过结单中,10=售后结单完成,-3=售后驳回结单',
  `sales_type` enum('-3','1','4','7','10') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '-3' COMMENT '结单类型:-3=未结单,1=机构驳回,4=用户驳回,7=平台驳回,10=成功退款',
  `reject_reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驳回原因',
  `reject_images` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '驳回图片资料',
  `auto_price` decimal(12, 2) NOT NULL COMMENT '自动计算应退全额',
  `auto_recommend_price` decimal(12, 2) NOT NULL COMMENT '自动计算推荐金额',
  `loss_proportion` decimal(12, 2) NOT NULL COMMENT '课程损耗比例',
  `auto_loss_price` decimal(10, 2) NOT NULL COMMENT '自动计算损耗金额',
  `tbc_price` decimal(10, 2) NOT NULL COMMENT '售后待确认退款金额',
  `c_price` decimal(10, 2) NOT NULL COMMENT '售后已确认退款金额',
  `real_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '实际退款金额',
  `sub_refundprice` decimal(10, 2) NULL DEFAULT NULL COMMENT '剩余未退金额',
  `platform` enum('miniapp') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '退款平台:miniapp=微信小程序',
  `pay_type` enum('yue','wechat') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'wechat' COMMENT '退款方式:yue=余额,wechat=微信',
  `pay_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '三方支付信息json',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `refundtime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '退款时间',
  `rejecttime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '驳回时间',
  `handletime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '处理时间',
  `confirmtime` bigint(11) NULL DEFAULT NULL COMMENT '确认时间',
  `checkouttime` bigint(12) NULL DEFAULT NULL COMMENT '结单时间',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `reason` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '售后申请原因',
  `auto_loss_unit_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '自动计算损耗单价',
  `canceltime` bigint(20) NULL DEFAULT NULL COMMENT '取消时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`(191)) USING BTREE,
  INDEX `classes_order_id`(`classes_order_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `classes_order_detail_id`(`classes_order_detail_id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `service_stauts`(`service_stauts`) USING BTREE,
  INDEX `sales_type`(`sales_type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 102 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程售后单' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_service_order_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_service_order_log`;
CREATE TABLE `dyqc_school_classes_service_order_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_service_order_id` int(11) NOT NULL COMMENT '课程售后订单id',
  `classes_order_id` int(11) NOT NULL COMMENT '课程订单id',
  `user_id` int(11) NOT NULL COMMENT '下单人id',
  `classes_order_detail_id` int(11) NOT NULL COMMENT '订单课程id',
  `classes_lib_id` bigint(11) NOT NULL COMMENT '课程id',
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `status` enum('1','4','7','-3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '售后状态:1=待处理,4=处理中,7=已结单,-3=已取消',
  `service_stauts` enum('1','4','7','10','-3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '售后处理状态:1=待机构处理,4=待用户确认,7=售后通过结单中,10=售后结单完成,-3=售后驳回结单',
  `sales_type` enum('-3','1','4','7','10') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '-3' COMMENT '结单类型:-3=未结单,1=机构驳回,4=用户驳回,7=平台驳回,10=成功退款',
  `log_text` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录内容',
  `oper_id` int(11) NULL DEFAULT 0 COMMENT '记录人id',
  `oper_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '记录人类型',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_service_order_id`(`classes_service_order_id`) USING BTREE,
  INDEX `classes_order_id`(`classes_order_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `classes_order_detail_id`(`classes_order_detail_id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 259 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程售后单日志' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_classes_type
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_classes_type`;
CREATE TABLE `dyqc_school_classes_type`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '分类名',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构课程类型' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_help_article
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_help_article`;
CREATE TABLE `dyqc_school_help_article`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `help_cate_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '平台帮助分类ids',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文章详情',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `hot` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台热门:0=否,1=是',
  `start_time` bigint(20) NULL DEFAULT NULL COMMENT '更新时间',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `views` bigint(20) NULL DEFAULT 0 COMMENT '浏览量',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `help_cate_ids`(`help_cate_ids`(191)) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '帮助文章' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_help_cate
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_help_cate`;
CREATE TABLE `dyqc_school_help_cate`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` int(11) NULL DEFAULT NULL COMMENT 'pid',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '帮助分类名',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=上架,2=下架',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '帮助分类' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_home_images
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_home_images`;
CREATE TABLE `dyqc_school_home_images`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '展示图',
  `type` enum('in','out') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'in' COMMENT '跳转类型:in=内部跳转,out=外部跳转',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '跳转链接',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `showtype` enum('image','video') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'image' COMMENT '展示类型:image=图片,video=视频',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '夜校首页轮播图' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_message
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_message`;
CREATE TABLE `dyqc_school_message`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `platform` set('admin','user','shop') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息平台:admin=总后台,user=用户端,shop=机构后台',
  `oper_type` enum('admin','user','system','shop') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'system' COMMENT '发送人类型:admin=管理员,user=用户,system=推荐,shop=机构',
  `oper_id` int(11) NOT NULL DEFAULT 0 COMMENT '发送人id',
  `to_type` enum('admin','user','system','shop') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'system' COMMENT '接收人类型:admin=管理员,user=用户,system=推荐,shop=机构',
  `to_id` int(11) NOT NULL DEFAULT 0 COMMENT '接收人id',
  `status` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'system' COMMENT '消息总类型:system=系统消息,classes=课程消息,order=订单消息',
  `mini_type` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'other' COMMENT '小消息类型:order_notice=课程订单通知,classes_auth=课程报名审核,classes_apply=课程上新审核,shop_apply=机构审核,classes_order_notice=课时预约,user_auth=机构授权用户信息,aftercare=售后服务,other=其他',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息标题',
  `desc` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息内容',
  `params` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息额外参数(json)',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `type` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '已读状态:1=未读,2=已读',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `event` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '事件标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `platform`(`platform`) USING BTREE,
  INDEX `oper_type`(`oper_type`) USING BTREE,
  INDEX `oper_id`(`oper_id`) USING BTREE,
  INDEX `to_type`(`to_type`) USING BTREE,
  INDEX `to_id`(`to_id`) USING BTREE,
  INDEX `status`(`status`(191)) USING BTREE,
  INDEX `mini_type`(`mini_type`(191)) USING BTREE,
  INDEX `title`(`title`(191)) USING BTREE,
  INDEX `desc`(`desc`(191)) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `weigh`(`weigh`) USING BTREE,
  INDEX `event`(`event`(191)) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6916 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '夜校站内信' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_message_config
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_message_config`;
CREATE TABLE `dyqc_school_message_config`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '事件名',
  `event` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '事件标识',
  `logo_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '事件消息logo',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '事件类型:1=系统推送,2=其他',
  `wechat_wap` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '微信公众号消息:1=开启,2=关闭',
  `message` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '短信消息:1=开启,2=关闭',
  `selfmail` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '站内行消息:1=开启,2=关闭',
  `message_id` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '短信模板id',
  `wechat_wap_id` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '公众号模板消息id',
  `selfmail_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站内信标题',
  `selfmail_template_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '站内信模板',
  `configjson` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '可用的模板字段变量',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `event`(`event`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 62 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统事件消息配置' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_message_config_item
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_message_config_item`;
CREATE TABLE `dyqc_school_message_config_item`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '事件标识',
  `event_two` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '事件二级标识',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息备注',
  `wechat_wap` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '微信公众号消息:1=开启,2=关闭',
  `message` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '短信消息:1=开启,2=关闭',
  `selfmail` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '站内行消息:1=开启,2=关闭',
  `message_id` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '短信模板id',
  `wechat_wap_id` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '公众号模板消息id',
  `selfmail_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站内信标题',
  `selfmail_template_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '站内信模板',
  `configjson` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '可用的模板字段变量',
  `thirdjson` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '额外第三方参数',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 74 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统事件消息配置消息项' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_message_user
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_message_user`;
CREATE TABLE `dyqc_school_message_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NULL DEFAULT NULL COMMENT '用户id',
  `message_id` int(11) NULL DEFAULT NULL COMMENT '消息id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '已读记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_search_city
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_search_city`;
CREATE TABLE `dyqc_school_search_city`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `address_city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '城市选择',
  `province` int(11) NOT NULL COMMENT '省编号',
  `city` int(11) NOT NULL COMMENT '市编号',
  `district` int(11) NOT NULL COMMENT '县区编号',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '距离搜索展示区域' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_teacher
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_teacher`;
CREATE TABLE `dyqc_school_teacher`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `user_id` int(11) NOT NULL COMMENT '教师前台用户id',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '教师名',
  `head_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '教师头像',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '教师简介',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '机构展示专家信息:1=上架,2=下架',
  `recommend` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '平台首页推荐:0=否,1=是',
  `expert_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '专家头像',
  `expert_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '专家介绍',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  `deletetime` bigint(11) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `teacher_star` decimal(10, 1) NOT NULL DEFAULT 5.0 COMMENT '讲师评分',
  `star_number` int(11) NOT NULL DEFAULT 0 COMMENT '评价数',
  `achievement_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '成就',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `name`(`name`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 130 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构老师' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_verification
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_verification`;
CREATE TABLE `dyqc_school_verification`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `manystore_id` int(11) NOT NULL COMMENT '机构账号id',
  `shop_id` int(11) NOT NULL COMMENT '机构店铺id',
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `classes_lib_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '平台可核销的课程ids',
  `status` enum('1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态:1=开启,2=关闭',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `updatetime` bigint(11) UNSIGNED NULL DEFAULT 0 COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `manystore_id`(`manystore_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `classes_lib_ids`(`classes_lib_ids`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 124 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '机构核销员' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_virtual_head
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_virtual_head`;
CREATE TABLE `dyqc_school_virtual_head`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `head_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `weigh` int(11) NULL DEFAULT 0 COMMENT '权重',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3701 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '虚拟头像表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_virtual_user
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_virtual_user`;
CREATE TABLE `dyqc_school_virtual_user`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `head_image` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `classes_lib_id` int(11) NULL DEFAULT NULL COMMENT '课程id',
  `time` bigint(20) NULL DEFAULT NULL COMMENT '虚拟下单时间',
  `jointype` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '参与中:1=是,0=否',
  `havetype` enum('0','1') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '已报名:1=是,0=否',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `classes_lib_id`(`classes_lib_id`) USING BTREE,
  INDEX `time`(`time`) USING BTREE,
  INDEX `jointype`(`jointype`) USING BTREE,
  INDEX `havetype`(`havetype`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11695 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程虚拟参与者' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_visit
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_visit`;
CREATE TABLE `dyqc_school_visit`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `classes_lib_id` int(11) NULL DEFAULT NULL COMMENT '课程id',
  `classes_activity_id` int(11) NULL DEFAULT NULL COMMENT '活动id',
  `status` enum('1','2','3') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '访问类型:1=课程,2=活动,3=帮助文章',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '访问时间',
  `user_id` int(11) NULL DEFAULT NULL COMMENT '访问用户',
  `shop_id` int(11) NULL DEFAULT NULL COMMENT '机构id',
  `help_article_id` int(11) NULL DEFAULT NULL COMMENT '帮助文章id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15749 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '功能访问记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_school_visit_distribution
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_school_visit_distribution`;
CREATE TABLE `dyqc_school_visit_distribution`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `index` varchar(800) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分布类型:access_source_session_cnt=访问来源分布,access_staytime_info=访问时长分布,access_depth_info=访问深度的分布',
  `ref_date` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日期格式为yyyymmdd',
  `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '场景id',
  `value` bigint(12) NULL DEFAULT NULL COMMENT '该场景id访问pv',
  `begin_date` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开始日期格式为yyyymmdd',
  `end_date` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '结束日期格式为yyyymmdd',
  `statistics_time` int(12) NULL DEFAULT NULL COMMENT '统计时间',
  `miniapp_id` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信小程序id',
  `createtime` bigint(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2278 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信获取用户小程序访问分布数据' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_sms
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_sms`;
CREATE TABLE `dyqc_sms`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `event` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '事件',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '验证码',
  `times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '验证次数',
  `ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'IP',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT 0 COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '短信验证码表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_test
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_test`;
CREATE TABLE `dyqc_test`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(10) NULL DEFAULT 0 COMMENT '会员ID',
  `admin_id` int(10) NULL DEFAULT 0 COMMENT '管理员ID',
  `category_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '分类ID(单选)',
  `category_ids` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类ID(多选)',
  `tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标签',
  `week` enum('monday','tuesday','wednesday') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '星期(单选):monday=星期一,tuesday=星期二,wednesday=星期三',
  `flag` set('hot','index','recommend') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标志(多选):hot=热门,index=首页,recommend=推荐',
  `genderdata` enum('male','female') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'male' COMMENT '性别(单选):male=男,female=女',
  `hobbydata` set('music','reading','swimming') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '爱好(多选):music=音乐,reading=读书,swimming=游泳',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
  `image` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片',
  `images` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '图片组',
  `attachfile` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '附件',
  `keywords` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '关键字',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
  `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '省市',
  `array` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数组:value=值',
  `json` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置:key=名称,value=值',
  `multiplejson` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维数组:title=标题,intro=介绍,author=作者,age=年龄',
  `price` decimal(10, 2) UNSIGNED NULL COMMENT '价格',
  `views` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '点击',
  `workrange` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '时间区间',
  `startdate` date NULL DEFAULT NULL COMMENT '开始日期',
  `activitytime` datetime(0) NULL DEFAULT NULL COMMENT '活动时间(datetime)',
  `year` year NULL DEFAULT NULL COMMENT '年',
  `times` time(0) NULL DEFAULT NULL COMMENT '时间',
  `refreshtime` bigint(16) NULL DEFAULT NULL COMMENT '刷新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) NULL DEFAULT NULL COMMENT '删除时间',
  `weigh` int(10) NULL DEFAULT 0 COMMENT '权重',
  `switch` tinyint(1) NULL DEFAULT 0 COMMENT '开关',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `state` enum('0','1','2') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '状态值:0=禁用,1=正常,2=推荐',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_third
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_third`;
CREATE TABLE `dyqc_third`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `user_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '会员ID',
  `platform` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '第三方应用',
  `apptype` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '应用类型',
  `unionid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '第三方UNIONID',
  `openname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '第三方会员昵称',
  `openid` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '第三方OPENID',
  `access_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'AccessToken',
  `refresh_token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'RefreshToken',
  `expires_in` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '有效期',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `logintime` bigint(16) NULL DEFAULT NULL COMMENT '登录时间',
  `expiretime` bigint(16) NULL DEFAULT NULL COMMENT '过期时间',
  `params_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '额外信息',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `platform`(`platform`, `openid`) USING BTREE,
  INDEX `user_id`(`user_id`, `platform`) USING BTREE,
  INDEX `unionid`(`platform`, `unionid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1024 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '第三方登录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_user
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_user`;
CREATE TABLE `dyqc_user`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `group_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '组别ID',
  `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户名',
  `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '昵称',
  `realname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '真实姓名',
  `work` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '职业',
  `password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码',
  `salt` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码盐',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '电子邮箱',
  `mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
  `level` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '等级',
  `gender` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '性别',
  `birthday` date NULL DEFAULT NULL COMMENT '生日',
  `bio` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '格言',
  `money` decimal(10, 2) NOT NULL COMMENT '余额',
  `score` int(10) NOT NULL DEFAULT 0 COMMENT '积分',
  `successions` int(10) UNSIGNED NOT NULL DEFAULT 1 COMMENT '连续登录天数',
  `maxsuccessions` int(10) UNSIGNED NOT NULL DEFAULT 1 COMMENT '最大连续登录天数',
  `prevtime` bigint(16) NULL DEFAULT NULL COMMENT '上次登录时间',
  `logintime` bigint(16) NULL DEFAULT NULL COMMENT '登录时间',
  `loginip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录IP',
  `loginfailure` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '失败次数',
  `loginfailuretime` bigint(16) NULL DEFAULT NULL COMMENT '最后登录失败时间',
  `joinip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '加入IP',
  `jointime` bigint(16) NULL DEFAULT NULL COMMENT '加入时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `token` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'Token',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态',
  `verification` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '验证',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `username`(`username`) USING BTREE,
  INDEX `email`(`email`) USING BTREE,
  INDEX `mobile`(`mobile`) USING BTREE,
  INDEX `nickname`(`nickname`) USING BTREE,
  INDEX `realname`(`realname`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2969 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_user_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_user_group`;
CREATE TABLE `dyqc_user_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组名',
  `rules` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '权限节点',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '添加时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 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 dyqc_user_money_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_user_money_log`;
CREATE TABLE `dyqc_user_money_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `money` decimal(10, 2) NOT NULL COMMENT '变更余额',
  `before` decimal(10, 2) NOT NULL COMMENT '变更前余额',
  `after` decimal(10, 2) NOT NULL COMMENT '变更后余额',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `ext` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '额外参数',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员余额变动表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_user_rule
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_user_rule`;
CREATE TABLE `dyqc_user_rule`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` int(10) NULL DEFAULT NULL COMMENT '父ID',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题',
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  `ismenu` tinyint(1) NULL DEFAULT NULL COMMENT '是否菜单',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NULL DEFAULT 0 COMMENT '权重',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员规则表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_user_score_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_user_score_log`;
CREATE TABLE `dyqc_user_score_log`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `score` int(10) NOT NULL DEFAULT 0 COMMENT '变更积分',
  `before` int(10) NOT NULL DEFAULT 0 COMMENT '变更前积分',
  `after` int(10) NOT NULL DEFAULT 0 COMMENT '变更后积分',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `ext` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '额外参数',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员积分变动表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_user_token
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_user_token`;
CREATE TABLE `dyqc_user_token`  (
  `token` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'Token',
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '会员ID',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `expiretime` bigint(16) NULL DEFAULT NULL COMMENT '过期时间',
  PRIMARY KEY (`token`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员Token表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_version
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_version`;
CREATE TABLE `dyqc_version`  (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `oldversion` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '旧版本号',
  `newversion` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '新版本号',
  `packagesize` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '包大小',
  `content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '升级内容',
  `downloadurl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '下载地址',
  `enforce` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '强制更新',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `weigh` int(10) NOT NULL DEFAULT 0 COMMENT '权重',
  `status` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' 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 dyqc_webscan_log
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_webscan_log`;
CREATE TABLE `dyqc_webscan_log`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` int(10) NOT NULL,
  `page` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `method` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `rkey` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `rdata` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `user_agent` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `request_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `user_id` int(11) NULL DEFAULT 0,
  `ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 28983 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dyqc_webscan_verifies
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_webscan_verifies`;
CREATE TABLE `dyqc_webscan_verifies`  (
  `nameid` int(32) NOT NULL AUTO_INCREMENT,
  `md5` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
  `method` enum('local','official') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'official',
  `filename` varchar(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
  `mktime` int(11) NOT NULL DEFAULT 0 COMMENT '最后修改时间',
  PRIMARY KEY (`nameid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 36329 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for dyqc_xilufitness_activity_coupon
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_activity_coupon`;
CREATE TABLE `dyqc_xilufitness_activity_coupon`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) NULL DEFAULT NULL COMMENT '所属小程序',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '优惠券名称',
  `meet_amount` decimal(10, 0) UNSIGNED NULL COMMENT '满足金额',
  `discount_amount` decimal(10, 0) UNSIGNED NULL COMMENT '抵扣金额',
  `expire_day` int(3) UNSIGNED NULL DEFAULT 0 COMMENT '有效期',
  `coupon_count` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '发放数量',
  `receive_count` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '领取数量',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `is_activity` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否参与活动',
  `invite_num` tinyint(6) UNSIGNED NULL DEFAULT 0 COMMENT '邀请人数',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `status_title`(`status`, `title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代金券管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_activity_medal
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_activity_medal`;
CREATE TABLE `dyqc_xilufitness_activity_medal`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `medal_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勋章名称',
  `thumb_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '勋章图片',
  `thumb_active_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '解锁勋章图片',
  `class_time` bigint(16) NULL DEFAULT NULL COMMENT '训练时长',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '勋章说明',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '勋章管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_activity_recharge
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_activity_recharge`;
CREATE TABLE `dyqc_xilufitness_activity_recharge`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `recharge_amount` decimal(10, 0) NULL DEFAULT NULL COMMENT '充值金额',
  `account_amount` decimal(10, 0) NULL DEFAULT NULL COMMENT '到账金额',
  `cut_amount` decimal(10, 2) UNSIGNED NULL COMMENT '节省金额',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id_status`(`brand_id`, `status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '充值设置' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_admin_access
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_admin_access`;
CREATE TABLE `dyqc_xilufitness_admin_access`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `admin_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属管理员',
  `brand_id` int(30) NULL DEFAULT NULL COMMENT '所属小程序',
  `account_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '账号类型 1 小程序 2 门店',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `admin_brand_id`(`admin_id`, `brand_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '小程序账号管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_area
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_area`;
CREATE TABLE `dyqc_xilufitness_area`  (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `pid` int(10) NULL DEFAULT NULL COMMENT '父id',
  `shortname` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '简称',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
  `mergename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '全称',
  `level` tinyint(4) NULL DEFAULT NULL COMMENT '层级 0 1 2 省市区县',
  `pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '拼音',
  `code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '长途区号',
  `zip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮编',
  `first` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '首字母',
  `lng` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '经度',
  `lat` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纬度',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3749 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '全国城市表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_auth_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_auth_group`;
CREATE TABLE `dyqc_xilufitness_auth_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `group_id` int(30) NULL DEFAULT NULL COMMENT '所属权限组',
  `is_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '组类型 1 小程序 2 门店',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `group_id`(`group_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '小程序权限组' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_banner
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_banner`;
CREATE TABLE `dyqc_xilufitness_banner`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) NULL DEFAULT NULL COMMENT '所属小程序',
  `title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `thumb_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片',
  `banner_position` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '广告位置',
  `is_redirect` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '是否跳转',
  `data_id` int(10) NULL DEFAULT NULL COMMENT '跳转id',
  `weigh` int(10) NULL DEFAULT NULL COMMENT '排序',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id_position`(`brand_id`, `banner_position`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '轮播图片管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_brand
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_brand`;
CREATE TABLE `dyqc_xilufitness_brand`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录账号',
  `brand_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小程名称',
  `brand_mobile` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小程手机号',
  `brand_email` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小程邮箱',
  `brand_logo_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小程logo',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `brand_key` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小程Key',
  `deletetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  `updatetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_key`(`brand_key`) USING BTREE,
  INDEX `brand_name_mobile`(`brand_name`, `brand_mobile`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '小程序管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_brand_config
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_brand_config`;
CREATE TABLE `dyqc_xilufitness_brand_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变量名',
  `group` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分组',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变量标题',
  `tip` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变量描述',
  `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型:string,text,int,bool,array,datetime,date,file',
  `visible` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '可见条件',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '变量值',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '变量字典数据',
  `rule` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '验证规则',
  `extend` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扩展属性',
  `setting` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '基本配置' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_camp
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_camp`;
CREATE TABLE `dyqc_xilufitness_camp`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动名称',
  `thumb_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缩略图',
  `thumb_images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详情轮播图集',
  `lable_ids` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动标签',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动简介',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '活动详情',
  `tip_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '注意事情',
  `camp_price` decimal(10, 2) UNSIGNED NULL COMMENT '报名单价',
  `write_off_price` decimal(10, 2) UNSIGNED NULL COMMENT '核销收入',
  `market_price` decimal(10, 2) UNSIGNED NULL COMMENT '市场价',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `status_title`(`status`, `title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_cashflow
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_cashflow`;
CREATE TABLE `dyqc_xilufitness_cashflow`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `order_type` tinyint(2) NULL DEFAULT NULL COMMENT '订单类型',
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `pay_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '支付金额',
  `pay_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '支付状态',
  `pay_time` bigint(16) NULL DEFAULT NULL COMMENT '支付时间',
  `pay_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '支付方式',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) NULL DEFAULT NULL COMMENT '删除时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_user_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '支付流水记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_cms
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_cms`;
CREATE TABLE `dyqc_xilufitness_cms`  (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) NULL DEFAULT NULL COMMENT '所属小程序',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `description` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '简介',
  `cms_type` tinyint(2) NULL DEFAULT NULL COMMENT '类型',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详情',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_status`(`brand_id`, `status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '单页管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_coach
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_coach`;
CREATE TABLE `dyqc_xilufitness_coach`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(50) NULL DEFAULT 0 COMMENT '所属小程序',
  `shop_ids` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属门店',
  `coach_group_id` int(10) NULL DEFAULT NULL COMMENT '所属等级',
  `coach_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '教练名称',
  `coach_mobile` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `coach_avatar` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `coach_images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '教练图集',
  `coach_sex` enum('male','female','unknow') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'unknow' COMMENT '性别',
  `lable_ids` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '所属标签',
  `coach_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '教练简介',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `shop_brand_ids`(`shop_ids`, `brand_id`) USING BTREE,
  INDEX `coach_name_mobile`(`coach_name`, `coach_mobile`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '教练列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_coach_account
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_coach_account`;
CREATE TABLE `dyqc_xilufitness_coach_account`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) NULL DEFAULT NULL COMMENT '所属小程序',
  `coach_id` int(30) NULL DEFAULT NULL COMMENT '所属教练',
  `total_account` decimal(10, 2) UNSIGNED NULL COMMENT '总收入',
  `account` decimal(10, 2) UNSIGNED NULL COMMENT '可用余额',
  `withdraw_account` decimal(10, 2) UNSIGNED NULL COMMENT '提现总金额',
  `course_count` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '上课数量',
  `class_duration` int(10) UNSIGNED NULL DEFAULT 0 COMMENT ' 总时长',
  `course_total_count` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '上课总人数',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_coach_id`(`brand_id`, `coach_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '教练账户' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_coach_cash
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_coach_cash`;
CREATE TABLE `dyqc_xilufitness_coach_cash`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `coach_id` int(30) NULL DEFAULT NULL COMMENT '所属教练',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '收入来源',
  `is_type` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '类型',
  `data_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属外建',
  `work_course_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属排期',
  `cash_type` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '资金类型',
  `cash_price` decimal(10, 2) UNSIGNED NULL COMMENT '收入金额',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_coach_id`(`brand_id`, `coach_id`) USING BTREE,
  INDEX `work_course_id`(`work_course_id`, `data_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '教练收入' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_coach_group
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_coach_group`;
CREATE TABLE `dyqc_xilufitness_coach_group`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) NULL DEFAULT NULL COMMENT '所属小程序',
  `group_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级名称',
  `group_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '等级图片',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status_brand_id`(`status`, `brand_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '教练等级管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_coach_report
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_coach_report`;
CREATE TABLE `dyqc_xilufitness_coach_report`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `coach_id` int(30) NULL DEFAULT NULL COMMENT '所属教练',
  `start_at` bigint(16) NULL DEFAULT NULL COMMENT '开始时间',
  `end_at` bigint(16) NULL DEFAULT NULL COMMENT '结束时间',
  `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请假事由',
  `report_status` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `coach_id`(`coach_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '请假报备' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_coach_withdraw
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_coach_withdraw`;
CREATE TABLE `dyqc_xilufitness_coach_withdraw`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `coach_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属教练',
  `order_no` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '提现单号',
  `withdraw_price` decimal(10, 2) UNSIGNED NULL COMMENT '提现金额',
  `withdraw_status` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '状态',
  `deletetime` bigint(16) NULL DEFAULT NULL COMMENT '删除时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_coach_id`(`brand_id`, `coach_id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '教练提现记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_course
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_course`;
CREATE TABLE `dyqc_xilufitness_course`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `course_cate_pid` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '所属课程父级分类',
  `course_cate_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '所属课程分类',
  `course_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '课程类型',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程名称',
  `thumb_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '缩略图',
  `thumb_images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详情轮播图集',
  `lable_ids` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程标签',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '课程详情',
  `tip_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '注意事情',
  `course_price` decimal(10, 2) UNSIGNED NULL COMMENT '课程单价',
  `write_off_price` decimal(10, 2) UNSIGNED NULL COMMENT '教练核销收入',
  `market_price` decimal(10, 2) UNSIGNED NULL COMMENT '市场价',
  `is_index` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '推荐首页',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `status_title`(`status`, `title`) USING BTREE,
  INDEX `course_type`(`course_type`) USING BTREE,
  INDEX `cate_id`(`course_cate_pid`, `course_cate_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_course_cate
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_course_cate`;
CREATE TABLE `dyqc_xilufitness_course_cate`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `pid` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '所属父级',
  `cate_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类名称',
  `weigh` int(10) NULL DEFAULT NULL COMMENT '排序',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id_status`(`brand_id`, `status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程分类' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_lable
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_lable`;
CREATE TABLE `dyqc_xilufitness_lable`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `lable_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标签名称',
  `lable_type` enum('course','coach','camp') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'course' COMMENT '标签类型',
  `weigh` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '排序',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status_lable_type`(`status`, `lable_type`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签管理' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_order
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_order`;
CREATE TABLE `dyqc_xilufitness_order`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `coupon_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属优惠券',
  `coach_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属教练',
  `data_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '业务外间',
  `course_camp_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '课程/活动id',
  `trade_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易订单号',
  `order_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '订单号',
  `re_no` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '退款单号',
  `coupon_amount` decimal(10, 2) UNSIGNED NULL COMMENT '优惠金额',
  `pay_amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '支付金额',
  `total_amount` decimal(10, 2) UNSIGNED NULL COMMENT '总金额',
  `pay_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '支付状态',
  `order_status` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '支付状态',
  `pay_time` bigint(16) NULL DEFAULT NULL COMMENT '支付时间',
  `pay_type` tinyint(1) UNSIGNED NULL DEFAULT 2 COMMENT '支付方式',
  `order_type` tinyint(1) NULL DEFAULT NULL COMMENT '订单类型',
  `code_num` int(3) UNSIGNED NULL DEFAULT 0 COMMENT '核销次数',
  `starttime` bigint(16) NULL DEFAULT NULL COMMENT '开课时间',
  `endtime` bigint(16) NULL DEFAULT NULL COMMENT '开课时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '结束时间',
  `deletetime` bigint(16) NULL DEFAULT NULL COMMENT '删除时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `brand_user_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `pay_order_status`(`order_status`, `pay_status`) USING BTREE,
  INDEX `data_id_type`(`data_id`, `order_type`) USING BTREE,
  INDEX `course_camp_id`(`course_camp_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_order_goods
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_order_goods`;
CREATE TABLE `dyqc_xilufitness_order_goods`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `order_id` int(100) NULL DEFAULT NULL COMMENT '所属订单',
  `order_type` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT '订单类型',
  `goods_id` int(50) NULL DEFAULT NULL COMMENT '所属产品',
  `course_camp_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属课程/活动id',
  `goods_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品名称',
  `thumb_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '产品图片',
  `num` int(4) NULL DEFAULT NULL COMMENT '数量',
  `sale_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '销售单价',
  `total_price` decimal(10, 2) UNSIGNED NULL COMMENT '总金额',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_id_type`(`order_id`, `order_type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单明细' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_order_verification_records
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_order_verification_records`;
CREATE TABLE `dyqc_xilufitness_order_verification_records`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `order_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属订单',
  `coach_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属教练',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `data_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '排课id',
  `check_time` bigint(16) NULL DEFAULT NULL COMMENT '核销时间',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_order_id`(`brand_id`, `order_id`) USING BTREE,
  INDEX `coach_shop_id`(`coach_id`, `shop_id`) USING BTREE,
  INDEX `user_data_id`(`user_id`, `data_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单核销记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_point_rule
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_point_rule`;
CREATE TABLE `dyqc_xilufitness_point_rule`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则名称',
  `rule_type` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '规则类型',
  `point_type` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '积分类型',
  `point_amount` int(6) NULL DEFAULT NULL COMMENT '积分值',
  `point_ratio` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '比例',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `point_ratio_status`(`status`, `point_ratio`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '积分规则' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_shop
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_shop`;
CREATE TABLE `dyqc_xilufitness_shop`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录账号',
  `password` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录密码',
  `shop_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '门店名称',
  `shop_image` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '门店图片',
  `shop_images` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '详情图集',
  `shop_mobile` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '门店电话',
  `province_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '所属省份',
  `city_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '所属市',
  `area_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '所属区',
  `address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '详细地址',
  `lat` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
  `lng` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
  `star` int(2) UNSIGNED NULL DEFAULT 0 COMMENT '评分',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `deletetime` bigint(16) NULL DEFAULT NULL COMMENT '删除时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `status_name`(`status`, `shop_name`) USING BTREE,
  INDEX `shop_mobile`(`shop_mobile`) USING BTREE,
  INDEX `province_city_area_id`(`city_id`, `province_id`, `area_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '门店列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user`;
CREATE TABLE `dyqc_xilufitness_user`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(100) NULL DEFAULT NULL COMMENT '关联用户',
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `nickname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `avatar` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `gender` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别',
  `mobile` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `point` int(9) UNSIGNED NULL DEFAULT 0 COMMENT '积分',
  `account` decimal(10, 2) UNSIGNED NULL COMMENT '余额',
  `train_day` int(6) UNSIGNED NULL DEFAULT 0 COMMENT '训练天数',
  `train_duration` decimal(6, 1) UNSIGNED NULL COMMENT '训练时长',
  `train_count` int(6) UNSIGNED NULL DEFAULT 0 COMMENT '训练次数',
  `is_vip` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '会员',
  `loginip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录ip',
  `status` enum('normal','hidden') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `mobile_nickname`(`mobile`, `nickname`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_account
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_account`;
CREATE TABLE `dyqc_xilufitness_user_account`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属小程序',
  `user_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属用户',
  `data_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '关联表的id',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '变动说明',
  `before_account` decimal(10, 2) UNSIGNED NOT NULL COMMENT '变动之前余额',
  `after_account` decimal(10, 2) UNSIGNED NOT NULL COMMENT '变动之后余额',
  `amount` decimal(10, 2) UNSIGNED NOT NULL COMMENT '余额值',
  `account_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型',
  `amount_type` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '余额变动类型',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_user_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `data_id`(`data_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户余额明细' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_collect
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_collect`;
CREATE TABLE `dyqc_xilufitness_user_collect`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `is_type` tinyint(2) NULL DEFAULT NULL COMMENT '类型',
  `data_id` int(30) NULL DEFAULT NULL COMMENT '所属外健',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_user_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `data_id`(`data_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户收藏' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_comment
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_comment`;
CREATE TABLE `dyqc_xilufitness_user_comment`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `coach_id` int(30) NULL DEFAULT NULL COMMENT '所属教练',
  `course_camp_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属课程/活动 id',
  `order_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属订单',
  `profession_star` int(2) UNSIGNED NULL DEFAULT 0 COMMENT '专业度',
  `affinity_star` int(2) UNSIGNED NULL DEFAULT 0 COMMENT '亲和力',
  `impression_star` int(2) UNSIGNED NULL DEFAULT 0 COMMENT '印象',
  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '评论内容',
  `star` int(2) UNSIGNED NULL DEFAULT 0 COMMENT '星级',
  `status` char(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `course_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '课程类型',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_users_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `shop_id`(`shop_id`) USING BTREE,
  INDEX `coach_id`(`coach_id`) USING BTREE,
  INDEX `course_camp_id`(`course_camp_id`) USING BTREE,
  INDEX `order_id`(`order_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户评论' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_connect
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_connect`;
CREATE TABLE `dyqc_xilufitness_user_connect`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `account_user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `openid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '小程序openid',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_id`(`brand_id`) USING BTREE,
  INDEX `openid_user_id`(`openid`, `account_user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '小程序用户信息' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_coupon
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_coupon`;
CREATE TABLE `dyqc_xilufitness_user_coupon`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属小程序',
  `user_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属用户',
  `coupon_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属优惠券',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '优惠券名称',
  `meet_amount` decimal(10, 0) UNSIGNED NOT NULL COMMENT '满足金额',
  `discount_amount` decimal(10, 0) UNSIGNED NOT NULL COMMENT '抵扣金额',
  `expire_time` bigint(16) NOT NULL COMMENT '有效期',
  `coupon_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态',
  `invite_num` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '邀请人数',
  `updatetime` bigint(16) NOT NULL COMMENT '更新时间',
  `createtime` bigint(16) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_user_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `coupon_id`(`coupon_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户领取优惠券记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_media
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_media`;
CREATE TABLE `dyqc_xilufitness_user_media`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `user_id` int(30) UNSIGNED NULL DEFAULT NULL COMMENT '所属用户',
  `media_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属勋章',
  `train_duration` decimal(10, 1) UNSIGNED NULL COMMENT '训练时长',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT 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 dyqc_xilufitness_user_point
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_point`;
CREATE TABLE `dyqc_xilufitness_user_point`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属小程序',
  `user_id` int(30) UNSIGNED NOT NULL DEFAULT 0 COMMENT '所属用户',
  `data_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '关联表的id',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '变动说明',
  `before_point` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '变动之前积分',
  `after_point` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '变动之后积分',
  `point` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '积分值',
  `rule_type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型',
  `point_type` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '积分变动类型',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_user_id`(`brand_id`, `user_id`) USING BTREE,
  INDEX `data_id`(`data_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户积分明细' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_user_share_record
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_user_share_record`;
CREATE TABLE `dyqc_xilufitness_user_share_record`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属用户',
  `rec_user_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '推荐人id',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_rec_user_id`(`brand_id`, `rec_user_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '推荐记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_work_camp
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_work_camp`;
CREATE TABLE `dyqc_xilufitness_work_camp`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `camp_id` int(30) NULL DEFAULT 0 COMMENT '所属活动',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `coach_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属教练',
  `start_at` bigint(16) NULL DEFAULT NULL COMMENT '开始时间',
  `end_at` bigint(16) NULL DEFAULT NULL COMMENT '结束时间',
  `class_duration` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课时时长',
  `class_count` int(3) UNSIGNED NULL DEFAULT 1 COMMENT '课时数',
  `sign_count` int(2) UNSIGNED NULL DEFAULT 1 COMMENT '用户报名人数',
  `camp_count` int(5) UNSIGNED NULL DEFAULT 0 COMMENT '开营人数',
  `total_count` int(5) UNSIGNED NULL DEFAULT 0 COMMENT '满员人数',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '其他说明',
  `camp_price` decimal(10, 2) UNSIGNED NULL COMMENT '活动价格',
  `write_off_price` decimal(10, 2) UNSIGNED NULL COMMENT '核销收入',
  `market_price` decimal(10, 2) UNSIGNED NULL COMMENT '市场价',
  `status` enum('normal','hidden','complete','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_shop_id`(`brand_id`, `shop_id`) USING BTREE,
  INDEX `camp_coach_id`(`camp_id`, `coach_id`) USING BTREE,
  INDEX `start_end_at`(`start_at`, `end_at`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动排课' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_work_camp_plan
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_work_camp_plan`;
CREATE TABLE `dyqc_xilufitness_work_camp_plan`  (
  `id` int(200) UNSIGNED NOT NULL AUTO_INCREMENT,
  `work_camp_id` int(30) NULL DEFAULT NULL COMMENT '所属活动',
  `day_date` bigint(16) NULL DEFAULT NULL COMMENT '日期',
  `day_start_at` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开始时间',
  `day_end_at` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '结束时间',
  `week` int(2) UNSIGNED NULL DEFAULT NULL COMMENT '周几',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `work_camp_id`(`work_camp_id`) USING BTREE,
  INDEX `start_end_at`(`day_start_at`, `day_end_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动计划' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for dyqc_xilufitness_work_course
-- ----------------------------
DROP TABLE IF EXISTS `dyqc_xilufitness_work_course`;
CREATE TABLE `dyqc_xilufitness_work_course`  (
  `id` int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
  `brand_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属小程序',
  `course_id` int(30) NULL DEFAULT NULL COMMENT '所属课程',
  `shop_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属门店',
  `coach_id` int(30) UNSIGNED NULL DEFAULT 0 COMMENT '所属教练',
  `course_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '课程类型',
  `class_time` bigint(16) UNSIGNED NULL DEFAULT NULL COMMENT '上课日期',
  `start_at` bigint(16) NULL DEFAULT NULL COMMENT '开始时间',
  `end_at` bigint(16) NULL DEFAULT NULL COMMENT '结束时间',
  `course_price` decimal(10, 2) UNSIGNED NULL COMMENT '课程价格',
  `write_off_price` decimal(10, 2) UNSIGNED NULL COMMENT '核销收入',
  `market_price` decimal(10, 2) UNSIGNED NULL COMMENT '市场价',
  `class_count` int(3) UNSIGNED NULL DEFAULT 1 COMMENT '课时数',
  `sign_count` int(5) NULL DEFAULT NULL COMMENT '报名人数',
  `wait_count` int(5) NULL DEFAULT NULL COMMENT '排队人数',
  `status` enum('normal','hidden','complete','failed') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT 'normal' COMMENT '状态',
  `updatetime` bigint(16) NULL DEFAULT NULL COMMENT '更新时间',
  `createtime` bigint(16) NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `brand_shop_id`(`brand_id`, `shop_id`) USING BTREE,
  INDEX `course_coach_id`(`course_id`, `coach_id`) USING BTREE,
  INDEX `start_end_at`(`start_at`, `end_at`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程排课' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for feedback
-- ----------------------------
DROP TABLE IF EXISTS `feedback`;
CREATE TABLE `feedback`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` int(11) NULL DEFAULT NULL,
  `txt` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容',
  `time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 162 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for kecheng
-- ----------------------------
DROP TABLE IF EXISTS `kecheng`;
CREATE TABLE `kecheng`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程名',
  `stime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报名开始时间',
  `etime` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报名结束时间',
  `merchat_id` int(11) NULL DEFAULT NULL COMMENT '商户id',
  `tid` int(11) NULL DEFAULT NULL COMMENT '主讲人',
  `t_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主讲人姓名',
  `kecheng_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程类型: 技能沙龙 文艺沙龙',
  `gongyi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公益体验式、半公益进阶式、商业化定制式',
  `minge` int(11) NULL DEFAULT NULL COMMENT '课程最大人数',
  `ketime` int(11) NULL DEFAULT NULL COMMENT '课时,1',
  `start_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程开始时间',
  `end_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程结束时间（时间戳）',
  `bao_number` int(11) NULL DEFAULT NULL COMMENT '当前报名人数',
  `want_number` int(11) NULL DEFAULT NULL COMMENT '想报名人数',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态1，申请中,2 ，已删除,3,已拒绝,4 已通过,5已经结束,60,删除课程',
  `update_time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新时间',
  `district` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域',
  `blurb` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程介绍',
  `experience` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '教师经历',
  `por` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '推荐课程',
  `hot` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否是热门',
  `shangkedidian` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '补充地址',
  `longitude` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
  `latitude` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
  `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面',
  `top` int(11) NULL DEFAULT NULL COMMENT '最新课程',
  `wx_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 511 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for kecheng_img
-- ----------------------------
DROP TABLE IF EXISTS `kecheng_img`;
CREATE TABLE `kecheng_img`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ke_id` int(11) NULL DEFAULT NULL,
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `sort` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 686 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for kecheng_type
-- ----------------------------
DROP TABLE IF EXISTS `kecheng_type`;
CREATE TABLE `kecheng_type`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '1,生效',
  `keid` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for merchat
-- ----------------------------
DROP TABLE IF EXISTS `merchat`;
CREATE TABLE `merchat`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构名称',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商户表\r\n' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` int(11) NULL DEFAULT NULL COMMENT '用户id',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '报课成功,1 ,审核拒绝,2',
  `data` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息内容',
  `kecheng` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `time` datetime(0) NULL DEFAULT NULL,
  `keid` int(11) NULL DEFAULT NULL COMMENT 'kechengid',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 81 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for shuju
-- ----------------------------
DROP TABLE IF EXISTS `shuju`;
CREATE TABLE `shuju`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型',
  `date` date NULL DEFAULT NULL,
  `value` int(11) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for sys
-- ----------------------------
DROP TABLE IF EXISTS `sys`;
CREATE TABLE `sys`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'img',
  `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `top` int(11) NULL DEFAULT NULL COMMENT '排序',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_mall_cate
-- ----------------------------
DROP TABLE IF EXISTS `tg_mall_cate`;
CREATE TABLE `tg_mall_cate`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `title` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名',
  `image` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类图片',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(1:禁用,2:启用)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `title`(`title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品分类' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_mall_goods
-- ----------------------------
DROP TABLE IF EXISTS `tg_mall_goods`;
CREATE TABLE `tg_mall_goods`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `cate_id` int(11) NULL DEFAULT NULL COMMENT '分类ID',
  `title` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品名称',
  `logo` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品logo',
  `images` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '商品图片 以 | 做分割符号',
  `describe` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '商品描述',
  `market_price` decimal(10, 2) NULL COMMENT '市场价',
  `discount_price` decimal(10, 2) NULL COMMENT '折扣价',
  `sales` int(11) NULL DEFAULT 0 COMMENT '销量',
  `virtual_sales` int(11) NULL DEFAULT 0 COMMENT '虚拟销量',
  `stock` int(11) NULL DEFAULT 0 COMMENT '库存',
  `total_stock` int(11) NULL DEFAULT 0 COMMENT '总库存',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(1:禁用,2:启用)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `cate_id`(`cate_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品列表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_admin
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_admin`;
CREATE TABLE `tg_system_admin`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `auth_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色权限ID',
  `head_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登录名',
  `password` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登录密码',
  `phone` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系手机号',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注说明',
  `login_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '登录次数',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用,)',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE,
  INDEX `phone`(`phone`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_auth
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_auth`;
CREATE TABLE `tg_system_auth`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `title` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限名称',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(1:禁用,2:启用)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `title`(`title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统权限表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_auth_node
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_auth_node`;
CREATE TABLE `tg_system_auth_node`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `auth_id` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '角色ID',
  `node_id` bigint(20) NULL DEFAULT NULL COMMENT '节点ID',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_system_auth_auth`(`auth_id`) USING BTREE,
  INDEX `index_system_auth_node`(`node_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色与节点关系表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_config
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_config`;
CREATE TABLE `tg_system_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '变量名',
  `group` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组',
  `value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '变量值',
  `remark` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注信息',
  `sort` int(10) NULL DEFAULT 0,
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `group`(`group`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 88 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统配置表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_log_202207
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_log_202207`;
CREATE TABLE `tg_system_log_202207`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `admin_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '管理员ID',
  `url` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作页面',
  `method` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '请求方法',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '日志标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'User-Agent',
  `create_time` int(10) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 722 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台操作日志表 - 202207' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_log_202406
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_log_202406`;
CREATE TABLE `tg_system_log_202406`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `admin_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '管理员ID',
  `url` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作页面',
  `method` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '请求方法',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '日志标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'User-Agent',
  `create_time` int(10) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 633 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台操作日志表 - 202406' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_log_202407
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_log_202407`;
CREATE TABLE `tg_system_log_202407`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `admin_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '管理员ID',
  `url` varchar(1500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '操作页面',
  `method` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '请求方法',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '日志标题',
  `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '内容',
  `ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'IP',
  `useragent` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'User-Agent',
  `create_time` int(10) NULL DEFAULT NULL COMMENT '操作时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 632 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '后台操作日志表 - 202407' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_menu
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_menu`;
CREATE TABLE `tg_system_menu`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `pid` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父id',
  `title` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称',
  `icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '菜单图标',
  `href` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '链接',
  `params` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '链接参数',
  `target` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '_self' COMMENT '链接打开方式',
  `sort` int(11) NULL DEFAULT 0 COMMENT '菜单排序',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `title`(`title`) USING BTREE,
  INDEX `href`(`href`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 269 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统菜单表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_node
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_node`;
CREATE TABLE `tg_system_node`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `node` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点代码',
  `title` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点标题',
  `type` tinyint(1) NULL DEFAULT 3 COMMENT '节点类型（1：控制器，2：节点）',
  `is_auth` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否启动RBAC权限控制',
  `create_time` int(10) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(10) NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `node`(`node`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统节点表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_quick
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_quick`;
CREATE TABLE `tg_system_quick`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `title` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '快捷入口名称',
  `icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '图标',
  `href` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '快捷链接',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(1:禁用,2:启用)',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注说明',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统快捷入口表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_system_uploadfile
-- ----------------------------
DROP TABLE IF EXISTS `tg_system_uploadfile`;
CREATE TABLE `tg_system_uploadfile`  (
  `id` int(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `upload_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'local' COMMENT '存储位置',
  `original_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件原名',
  `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物理路径',
  `image_width` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '宽度',
  `image_height` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '高度',
  `image_type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片类型',
  `image_frames` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '图片帧数',
  `mime_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'mime类型',
  `file_size` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '文件大小',
  `file_ext` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `sha1` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '文件 sha1编码',
  `create_time` int(10) NULL DEFAULT NULL COMMENT '创建日期',
  `update_time` int(10) NULL DEFAULT NULL COMMENT '更新时间',
  `upload_time` int(10) NULL DEFAULT NULL COMMENT '上传时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `upload_type`(`upload_type`) USING BTREE,
  INDEX `original_name`(`original_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 305 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '上传文件表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for tg_useradmin
-- ----------------------------
DROP TABLE IF EXISTS `tg_useradmin`;
CREATE TABLE `tg_useradmin`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `auth_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色权限ID',
  `head_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登录名',
  `password` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登录密码',
  `phone` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系手机号',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注说明',
  `login_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '登录次数',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用,)',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE,
  INDEX `phone`(`phone`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for useradmin
-- ----------------------------
DROP TABLE IF EXISTS `useradmin`;
CREATE TABLE `useradmin`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `auth_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色权限ID',
  `auid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色,1,全局，2，区域',
  `head_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登录名',
  `password` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登录密码',
  `phone` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系手机号',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注说明',
  `login_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '登录次数',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用,)',
  `create_time` int(11) NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) NULL DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for userwx
-- ----------------------------
DROP TABLE IF EXISTS `userwx`;
CREATE TABLE `userwx`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色',
  `user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '状态',
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `openid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'openid',
  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '电话',
  `head_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像',
  `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别1 男 2女',
  `birthday` date NULL DEFAULT NULL COMMENT '生日',
  `district` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '区域',
  `career` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职业',
  `organization` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '机构',
  `teacher` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否申请讲师',
  `uptime` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2170 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for wen
-- ----------------------------
DROP TABLE IF EXISTS `wen`;
CREATE TABLE `wen`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名',
  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式',
  `sid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证',
  `jine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '金额',
  `type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '农副产品',
  `cid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址村镇',
  `time` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;
