/*
 Navicat Premium Dump SQL

 Source Server         : NN2024010801
 Source Server Type    : MySQL
 Source Server Version : 50644 (5.6.44-log)
 Source Host           : 47.112.222.163:63306
 Source Schema         : nn2025081602

 Target Server Type    : MySQL
 Target Server Version : 50644 (5.6.44-log)
 File Encoding         : 65001

 Date: 27/09/2025 07:38:42
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for lev_account_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_account_logs`;
CREATE TABLE `lev_account_logs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL DEFAULT 0 COMMENT '用户ID/司机ID',
  `source_order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '关联订单号',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '交易类型：1-开通VIP，2-视频课付费',
  `money` decimal(12, 2) NOT NULL DEFAULT 0.00 COMMENT '金额',
  `before_money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '更改前金额',
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `create_time` int(11) NOT NULL DEFAULT 0,
  `update_time` int(11) NOT NULL DEFAULT 0,
  `remark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-已完成，2-待处理，3-失败/取消',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否有效：1-是，0-否',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `create_time`(`create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '账户明细表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_action_log_2025_08
-- ----------------------------
DROP TABLE IF EXISTS `lev_action_log_2025_08`;
CREATE TABLE `lev_action_log_2025_08`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人用户名',
  `method` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求类型',
  `module` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模型',
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作方法',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作页面',
  `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求参数(JSON格式)',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志标题',
  `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作类型：1-后台 2-APP',
  `content` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
  `ip` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IP地址',
  `user_agent` varchar(360) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'User-Agent',
  `create_user` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统行为日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_action_log_2025_09
-- ----------------------------
DROP TABLE IF EXISTS `lev_action_log_2025_09`;
CREATE TABLE `lev_action_log_2025_09`  (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `username` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作人用户名',
  `method` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求类型',
  `module` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '模型',
  `action` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作方法',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作页面',
  `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求参数(JSON格式)',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '日志标题',
  `type` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '操作类型：1-后台 2-APP',
  `content` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '内容',
  `ip` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'IP地址',
  `user_agent` varchar(360) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'User-Agent',
  `create_user` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 52 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统行为日志表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_ad
-- ----------------------------
DROP TABLE IF EXISTS `lev_ad`;
CREATE TABLE `lev_ad`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '广告标题',
  `position` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告位置：1-主页轮播图，2-会员中心占位图',
  `cover` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '广告图片',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告访问：1-站内链接，2-站外链接，3-其他小程序，4-微信视频号',
  `description` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '广告描述',
  `url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '广告链接/小程序链接/视频号链接',
  `width` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告宽度',
  `height` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告高度',
  `start_time` int(10) UNSIGNED NOT NULL COMMENT '开始时间',
  `end_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束时间',
  `view_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告点击次数',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1在用 2停用',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '排序',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `title`(`title`) USING BTREE,
  INDEX `ad_sort_id`(`position`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '广告管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_article
-- ----------------------------
DROP TABLE IF EXISTS `lev_article`;
CREATE TABLE `lev_article`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `title` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文章标题',
  `cover` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '首张图片编号',
  `tags` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文章标签',
  `cate_id` int(11) NULL DEFAULT 0 COMMENT '分类ID',
  `author` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '发布作者',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型：1-文章资讯，2-注册协议，3-隐私策略，4-VIP购买协议，9-智能问答',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序：倒序',
  `view_num` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '浏览次数',
  `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '文章描述',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '内容',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 COMMENT '状态：1-发布，2-待发布',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `title`(`title`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `cate_id`(`cate_id`) USING BTREE,
  INDEX `description`(`description`(191)) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 182 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文章管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_article_cates
-- ----------------------------
DROP TABLE IF EXISTS `lev_article_cates`;
CREATE TABLE `lev_article_cates`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称',
  `type` tinyint(1) NULL DEFAULT 2 COMMENT '类别：1-文章，2-客服回复',
  `sort` int(11) NULL DEFAULT 0 COMMENT '排序',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文章分类表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_balance_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_balance_logs`;
CREATE TABLE `lev_balance_logs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NULL DEFAULT 0 COMMENT '用户ID',
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '订单号',
  `money` decimal(10, 2) NULL DEFAULT NULL COMMENT '金额',
  `before_money` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '交易前账户金额',
  `type` tinyint(1) NULL DEFAULT 1 COMMENT '类型：1-充值，2-提现',
  `pay_type` tinyint(1) NULL DEFAULT 0 COMMENT '支付方式：0-通用，10-微信，20-支付宝',
  `pay_status` tinyint(1) NULL DEFAULT 1 COMMENT '支付状态：1-待支付，2-已支付',
  `pay_at` timestamp NULL DEFAULT NULL COMMENT '支付时间',
  `pay_img` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '打款凭证',
  `transaction_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '交易单号',
  `confirm_admin_id` int(10) NOT NULL DEFAULT 0 COMMENT '审核人ID',
  `create_time` int(11) NULL DEFAULT 0 COMMENT '下单时间',
  `update_time` int(11) NULL DEFAULT 0,
  `realname` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '姓名',
  `account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '提现账号',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注说明',
  `confirm_remark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '审核备注',
  `status` tinyint(1) NULL DEFAULT 0 COMMENT '审核状态：1-待支付（待审核），2-已审核（已支付），3-审核失败，4-已打款',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `pay_status`(`pay_status`) USING BTREE,
  INDEX `create_time`(`create_time`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `transaction_id`(`transaction_id`) USING BTREE,
  INDEX `realname`(`realname`) USING BTREE,
  INDEX `confirm_admin_id`(`confirm_admin_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '接单保证（充值/退保）订单记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_city
-- ----------------------------
DROP TABLE IF EXISTS `lev_city`;
CREATE TABLE `lev_city`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '编号',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级编号',
  `level` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '城市级别：1省 2市 3区',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '城市名称',
  `citycode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '城市编号（区号）',
  `p_adcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '父级地理编号',
  `adcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '地理编号',
  `lng` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '城市坐标中心点经度（* 1e6）：如果是中国，此值是 1e7',
  `lat` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '城市坐标中心点纬度（* 1e6）',
  `sort` tinyint(3) UNSIGNED NOT NULL DEFAULT 125 COMMENT '排序号',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标记',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_name`(`name`) USING BTREE COMMENT '城市名称'
) ENGINE = InnoDB AUTO_INCREMENT = 3215 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '行政区划表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_complaint
-- ----------------------------
DROP TABLE IF EXISTS `lev_complaint`;
CREATE TABLE `lev_complaint`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `type` tinyint(2) NOT NULL DEFAULT 1 COMMENT '分类：1-功能BUG，2-题库问题，3-产品问题，4-VIP问题，5-费用相关，99-其他',
  `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '联系方式',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '主题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '反馈内容',
  `albums` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `create_time` int(10) NOT NULL,
  `update_time` int(10) NOT NULL,
  `handler_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '处理人ID（后台）',
  `handler_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '处理人姓名（后台）',
  `handle_time` int(10) NOT NULL DEFAULT 0 COMMENT '处理时间(时间戳)',
  `internal_note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内部备注（仅后台可见）',
  `process_result` tinyint(1) NOT NULL DEFAULT 0 COMMENT '处理结果：0-未处理,1-已解决,2-无需处理,3-转交',
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '处理备注',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-待处理，2-已处理',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '投诉建议记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_config
-- ----------------------------
DROP TABLE IF EXISTS `lev_config`;
CREATE TABLE `lev_config`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置标题',
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置编码',
  `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置值',
  `options` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置项',
  `config_group_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '配置分组ID',
  `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '配置类型',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1正常 2停用',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
  `note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '配置说明',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_title`(`title`) USING BTREE,
  INDEX `index_code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 114 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '配置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_config_group
-- ----------------------------
DROP TABLE IF EXISTS `lev_config_group`;
CREATE TABLE `lev_config_group`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分组名称',
  `sort` tinyint(4) NOT NULL COMMENT '排序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '配置分组表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_exam_access_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_access_logs`;
CREATE TABLE `lev_exam_access_logs`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `date` date NULL DEFAULT NULL COMMENT '日期',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '模块：1-职高单招，2-职高对口，3-专升本',
  `scene_count1` tinyint(1) NOT NULL DEFAULT 1 COMMENT '每日一练日访问数量',
  `scene_count2` int(10) NOT NULL DEFAULT 0 COMMENT '历年真题日访问数量',
  `scene_count3` int(10) NOT NULL DEFAULT 0 COMMENT '模拟试题日访问量',
  `scene_count4` int(10) NOT NULL DEFAULT 0 COMMENT '模拟考试日访问数量',
  `scene_count5` int(10) NOT NULL DEFAULT 0 COMMENT '复习资料日访问数量',
  `scene_count6` int(10) NOT NULL DEFAULT 0 COMMENT '考前冲刺日访问数量',
  `scene_count7` int(10) NOT NULL DEFAULT 0 COMMENT '院校直达日访问数量（待定）',
  `scene_count20` int(10) NOT NULL DEFAULT 0 COMMENT '视频课程日访问数量',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `date`(`date`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户各模块日访问量统计数据' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_exam_answers
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_answers`;
CREATE TABLE `lev_exam_answers`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '答题用户ID',
  `paper_id` int(10) NOT NULL DEFAULT 0 COMMENT '试卷ID',
  `score` int(10) NOT NULL DEFAULT 0 COMMENT '获得总分',
  `accurate_count` int(10) NOT NULL DEFAULT 0 COMMENT '对题数',
  `answer_times` int(10) NOT NULL DEFAULT 0 COMMENT '本卷答题累计时间',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `paper_id`(`paper_id`) USING BTREE,
  INDEX `score`(`score`) USING BTREE,
  INDEX `answer_times`(`answer_times`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户答题记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_exam_answers_topics
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_answers_topics`;
CREATE TABLE `lev_exam_answers_topics`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '答题用户ID',
  `answer_log_id` int(10) NOT NULL DEFAULT 0 COMMENT '答题记录ID',
  `topic_id` int(10) NOT NULL DEFAULT 0 COMMENT '所答题目ID',
  `answer` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '提交答案内容：多选则为JSON',
  `answer_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '提交答案内容类型：1-单选，2-文本，3-图片，4-多选',
  `score` int(10) NOT NULL COMMENT '得分',
  `accurate` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否答对（选择判断题）：1-是，0-否',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `answer_log_id`(`answer_log_id`) USING BTREE,
  INDEX `topic_id`(`topic_id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户答题-题目记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_exam_errors
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_errors`;
CREATE TABLE `lev_exam_errors`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '类型：1-题型错误，2-题干错误，3-图片缺少，4-图片错误，5-选项错误，6-有错别字，7-知识点错误，8-解析错误，9-答案错误，10-答案识别错误 ',
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `paper_id` int(10) NOT NULL DEFAULT 0 COMMENT '试卷ID',
  `module_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '板块类型：1-职高单招，2-职高对口，3-专升本',
  `image_url` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '错误截图',
  `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '错误描述',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-待处理，2-已处理',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `paper_id`(`paper_id`) USING BTREE,
  INDEX `module_type`(`module_type`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `create_time`(`create_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题库纠错记录表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_exam_papers
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_papers`;
CREATE TABLE `lev_exam_papers`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '试卷名称',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '试卷类型：1-单招题，2-对口题，3-专升本题',
  `scene_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '答题场景类型：1-每日一练，2-历年真题，3-模拟试题，4-模拟考试，5-复习资料，6-考前冲刺',
  `subject_id` int(10) NOT NULL DEFAULT 0 COMMENT '课程类型ID',
  `score_total` int(10) NOT NULL DEFAULT 0 COMMENT '试卷总分',
  `topic_count` int(10) NOT NULL DEFAULT 0 COMMENT '题目数量',
  `is_charge` tinyint(1) NULL DEFAULT 0 COMMENT '是否收费：1-是（真题等列表显示的子模块才需要配置）',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `scene_type`(`scene_type`) USING BTREE,
  INDEX `subject_id`(`subject_id`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题库-试卷表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_exam_subjects
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_subjects`;
CREATE TABLE `lev_exam_subjects`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `subject_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程名称',
  `pid` int(10) NOT NULL DEFAULT 0 COMMENT '上级ID（暂时做1级）',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '所属栏目：1-单招，2-对口，3-专升本',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NULL DEFAULT 0,
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `subject_name`(`subject_name`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题库课程表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_exam_topics
-- ----------------------------
DROP TABLE IF EXISTS `lev_exam_topics`;
CREATE TABLE `lev_exam_topics`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `paper_id` int(10) NOT NULL DEFAULT 0 COMMENT '所属试卷ID',
  `topic_name` varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '题目名称或内容/题目图片',
  `topic_image_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '传到AI图片返回的图片资源ID',
  `show_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '题目内容显示方式：1-文本，2-图片（选择图片则所有内容：题目、解析、答案都是图片）',
  `answer_type` tinyint(1) NOT NULL DEFAULT 2 COMMENT '是否可以提交图片答案（图片方式的才可以提交，且需要同步题目图片到AI平台）：1-是，2-否',
  `topic_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '题目类型',
  `score` int(10) NOT NULL DEFAULT 0 COMMENT '分数',
  `sort` int(10) NULL DEFAULT 0 COMMENT '排序：倒序',
  `topic_analysis` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '题目答案解析内容/图片',
  `correct_answer` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '正确答案（内容为图片类型的大题答案非必填，其他必填）',
  `answer_A` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '答案A',
  `answer_B` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '答案B',
  `answer_C` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '答案C',
  `answer_D` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '答案D',
  `answer_E` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '答案E',
  `answer_F` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '答案F',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NULL DEFAULT 0,
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `show_type`(`show_type`) USING BTREE,
  INDEX `paper_id`(`paper_id`) USING BTREE,
  INDEX `topic_type`(`topic_type`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  FULLTEXT INDEX `topic_name`(`topic_name`)
) ENGINE = InnoDB AUTO_INCREMENT = 330 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题库-试卷题目表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_link
-- ----------------------------
DROP TABLE IF EXISTS `lev_link`;
CREATE TABLE `lev_link`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '唯一性标识',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '友链名称',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '类型：1友情链接 2合作伙伴',
  `url` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '友链地址',
  `item_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '站点ID',
  `cate_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '栏目ID',
  `platform` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '平台：1PC站 2WAP站 3微信小程序 4APP应用',
  `form` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '友链形式：1文字链接 2图片链接',
  `image` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '友链图片',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1在用 2停用',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '显示顺序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '友链管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_member
-- ----------------------------
DROP TABLE IF EXISTS `lev_member`;
CREATE TABLE `lev_member`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `openid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户唯一标识',
  `unionid` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '关联unionid',
  `mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '手机号',
  `user_type` tinyint(1) NULL DEFAULT 1 COMMENT '账号类型：用户',
  `password` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '密码（默认手机后6位）',
  `realname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '真实姓名',
  `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户昵称',
  `gender` tinyint(3) UNSIGNED NULL DEFAULT 3 COMMENT '性别（1男 2女 3未知）',
  `avatar` varchar(180) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '用户头像',
  `birthday` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '出生日期',
  `balance` decimal(10, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '账户余额',
  `is_zg_vip` tinyint(1) NOT NULL DEFAULT 2 COMMENT '是否职高VIP：1-是，2-否',
  `zg_vip_expired` timestamp NULL DEFAULT NULL,
  `is_zsb_vip` tinyint(1) NOT NULL DEFAULT 2 COMMENT '是否专升本VIP：1-是，2-否',
  `zsb_vip_expired` timestamp NULL DEFAULT NULL,
  `is_video_vip` tinyint(1) NOT NULL DEFAULT 2 COMMENT '视频VIP：1-是，2-否',
  `video_vip_expired` timestamp NULL DEFAULT NULL,
  `answer_type` tinyint(1) NOT NULL DEFAULT 2 COMMENT '用户答题模式：1-背题模式，2-练习模式，3-快答模式，4-考试计时模式',
  `entry_type` tinyint(1) NOT NULL DEFAULT 0 COMMENT '注册所选刷题类型：0-未设置，1-单招，2-对口，3-专升本',
  `need_paper` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否需要纸质资料：1-需要，2-不需要，0-未设置',
  `member_level` smallint(6) NULL DEFAULT 0 COMMENT '会员等级',
  `province_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '户籍省份编号',
  `city_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '户籍城市编号',
  `district_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '户籍区/县编号',
  `intro` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '个人简介',
  `signature` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '个性签名',
  `device` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '设备类型：1苹果 2安卓 3WAP站 4PC站 5后台添加',
  `device_code` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '推送的别名',
  `push_alias` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '推送的别名',
  `app_uuid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT 'UUID',
  `source` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '来源：1、APP注册；2、后台添加；',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-正常，2-冻结（不可登录），3-注销',
  `app_version` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '客户端版本号',
  `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '我的推广码',
  `login_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上次登录时间',
  `login_ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '最近登录IP',
  `login_region` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '上次登录地点',
  `login_count` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录总次数',
  `create_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '审核人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识：1正常 0删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `mobile`(`mobile`) USING BTREE,
  INDEX `user_type`(`user_type`) USING BTREE,
  INDEX `unionid`(`unionid`) USING BTREE,
  INDEX `openid`(`openid`) USING BTREE,
  INDEX `nickname`(`nickname`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1023 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_member_answer_ranks
-- ----------------------------
DROP TABLE IF EXISTS `lev_member_answer_ranks`;
CREATE TABLE `lev_member_answer_ranks`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '答题用户ID',
  `answer_time` int(10) NOT NULL DEFAULT 0 COMMENT '答题累计时间（秒）',
  `answer_count` int(10) NOT NULL DEFAULT 0 COMMENT '做题数量',
  `date` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '日期（按日统计）',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `answer_time`(`answer_time`) USING BTREE,
  INDEX `answer_count`(`answer_count`) USING BTREE,
  INDEX `date`(`date`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 71 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户答题统计数据表（排行榜）' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_member_level
-- ----------------------------
DROP TABLE IF EXISTS `lev_member_level`;
CREATE TABLE `lev_member_level`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '级别名称',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '显示顺序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员级别表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_member_vips
-- ----------------------------
DROP TABLE IF EXISTS `lev_member_vips`;
CREATE TABLE `lev_member_vips`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '套餐名称',
  `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '类型：1-职高VIP，2-专升本VIP，3-视频VIP',
  `price` decimal(10, 1) NULL DEFAULT 0.0 COMMENT 'VIP价格',
  `day` int(10) NOT NULL DEFAULT 0 COMMENT 'VIP时长（天数）',
  `remark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  `create_time` int(10) NULL DEFAULT 0,
  `update_time` int(10) NULL DEFAULT 0,
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员VIP类型' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_menu
-- ----------------------------
DROP TABLE IF EXISTS `lev_menu`;
CREATE TABLE `lev_menu`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `pid` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '父级ID',
  `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '菜单标题',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '图标',
  `path` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '菜单路径',
  `component` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '菜单组件',
  `target` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '目标',
  `permission` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '权限标识',
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '类型：0菜单 1节点',
  `status` tinyint(3) UNSIGNED NULL DEFAULT 1 COMMENT '是否显示：1显示 2不显示',
  `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) UNSIGNED NULL DEFAULT 125 COMMENT '显示顺序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_pid`(`pid`) USING BTREE,
  INDEX `index_name`(`title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 451 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统菜单表' ROW_FORMAT = COMPACT;

-- ----------------------------
-- Table structure for lev_message
-- ----------------------------
DROP TABLE IF EXISTS `lev_message`;
CREATE TABLE `lev_message`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '消息标题',
  `type` tinyint(4) NOT NULL DEFAULT 1 COMMENT '消息类型：1-客服消息，2-抢单消息，3-缴纳保证金消息,4-退保申请消息,5-抢单消息，6-提现申请消息',
  `msg_type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '消息内容类型：1-文字，2-图片，3-文章列表，4-JSON数据',
  `description` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '描述',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '消息内容',
  `from_uid` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '来源用户ID',
  `to_uid` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '接收用户ID',
  `chat_key` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '对话组key(聊天类型，发送接收用户ID)',
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '关联订单号',
  `create_time` int(11) NOT NULL DEFAULT 0,
  `update_time` int(11) NOT NULL DEFAULT 0,
  `is_read` tinyint(1) NOT NULL DEFAULT 2 COMMENT '是否已读：1-是，2-否',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-已发送，2-待发送，3-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `to_uid`(`to_uid`) USING BTREE,
  INDEX `from_uid`(`from_uid`) USING BTREE,
  INDEX `is_read`(`is_read`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `msg_type`(`msg_type`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `chat_key`(`chat_key`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '客服聊天消息记录' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_notice
-- ----------------------------
DROP TABLE IF EXISTS `lev_notice`;
CREATE TABLE `lev_notice`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '通知ID',
  `title` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '通知标题',
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '通知内容',
  `author` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '发布人',
  `source` tinyint(1) NULL DEFAULT NULL COMMENT '来源：1内部通知 2外部新闻',
  `is_top` tinyint(3) UNSIGNED NULL DEFAULT 2 COMMENT '是否置顶：1是 2否',
  `browse` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '阅读量',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 COMMENT '状态：1已发布 2待发布',
  `create_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `index_title`(`title`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '通知公告表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_orders
-- ----------------------------
DROP TABLE IF EXISTS `lev_orders`;
CREATE TABLE `lev_orders`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '单号',
  `user_id` int(11) NULL DEFAULT 0 COMMENT '用户ID',
  `goods_id` int(10) NOT NULL DEFAULT 0 COMMENT 'VIP的ID',
  `total` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
  `transaction_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付交易单号',
  `pay_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '支付时间',
  `expired_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'VIP有效时间（有效时间内才可退款）',
  `create_time` int(11) NULL DEFAULT 0,
  `update_time` int(11) NULL DEFAULT 0,
  `refund_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '退款状态：0-无，1-待审核，2-通过，3-拒绝',
  `refund_confirm_at` timestamp NULL DEFAULT NULL COMMENT '退款审核时间',
  `refund_confirm_admin_id` int(10) NULL DEFAULT 0 COMMENT '退款审核/操作人ID',
  `refund_remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '退款审核备注',
  `remark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '操作审核备注',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-待支付，2-支付成功',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `goods_id`(`goods_id`) USING BTREE,
  INDEX `pay_at`(`pay_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'VIP开通订单表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_payment_logs
-- ----------------------------
DROP TABLE IF EXISTS `lev_payment_logs`;
CREATE TABLE `lev_payment_logs`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(10) NOT NULL DEFAULT 0 COMMENT '用户ID',
  `out_trade_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '订单号',
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '源支付订单号',
  `total_fee` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '付款金额',
  `pay_type` tinyint(1) NOT NULL DEFAULT 10 COMMENT '支付方式：10-微信，20-支付宝',
  `transaction_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '交易单号',
  `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求参数',
  `result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '请求结果',
  `remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '交易结果备注',
  `create_time` int(11) NULL DEFAULT 0,
  `update_time` int(10) NULL DEFAULT 0,
  `pay_at` timestamp NULL DEFAULT NULL COMMENT '支付时间',
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `status` tinyint(1) NULL DEFAULT 2 COMMENT '状态：1-已支付，2-待支付，3-支付失败',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `out_trade_no`(`out_trade_no`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `transaction_id`(`transaction_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_role
-- ----------------------------
DROP TABLE IF EXISTS `lev_role`;
CREATE TABLE `lev_role`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色名称',
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色标签',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1正常 2禁用',
  `note` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '排序',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `lev_role_menu`;
CREATE TABLE `lev_role_menu`  (
  `role_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色ID',
  `menu_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '菜单ID',
  INDEX `role_id`(`menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '角色菜单关联表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_user
-- ----------------------------
DROP TABLE IF EXISTS `lev_user`;
CREATE TABLE `lev_user`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `realname` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '真实姓名',
  `nickname` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '昵称',
  `gender` tinyint(3) UNSIGNED NOT NULL DEFAULT 3 COMMENT '性别:1男 2女 3保密',
  `avatar` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '头像',
  `mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '手机号码',
  `email` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '邮箱地址',
  `birthday` date NULL DEFAULT NULL COMMENT '出生日期',
  `dept_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '部门ID',
  `level_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '职级ID',
  `position_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '岗位ID',
  `province_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '省份ID',
  `city_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '市区ID',
  `district_id` smallint(5) UNSIGNED NULL DEFAULT 0 COMMENT '区县ID',
  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '详细地址',
  `city_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '所属城市',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '登录用户名',
  `password` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '登录密码',
  `salt` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '盐加密',
  `intro` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '个人简介',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态：1正常 2禁用',
  `note` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '备注',
  `sort` smallint(5) UNSIGNED NOT NULL DEFAULT 125 COMMENT '显示顺序',
  `login_num` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '登录次数',
  `login_ip` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '最近登录IP',
  `login_time` datetime NULL DEFAULT NULL COMMENT '最近登录时间',
  `create_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '添加人',
  `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_user` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新人',
  `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `mark` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '有效标识(1正常 0删除)',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `realname`(`realname`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '后台用户管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_user_role
-- ----------------------------
DROP TABLE IF EXISTS `lev_user_role`;
CREATE TABLE `lev_user_role`  (
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '人员ID',
  `role_id` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '角色ID',
  INDEX `admin_id`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '人员角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for lev_videos
-- ----------------------------
DROP TABLE IF EXISTS `lev_videos`;
CREATE TABLE `lev_videos`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `video_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程集名称',
  `category_id` int(10) NOT NULL DEFAULT 0 COMMENT '类型ID',
  `type` tinyint(1) NULL DEFAULT 1 COMMENT '课程类型：1-单招，2-对口',
  `poster` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程集封面',
  `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程集描述',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `is_recommend` tinyint(1) NULL DEFAULT 2 COMMENT '是否推荐首页：1-是，2-否',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-发布，2-待发布',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `video_name`(`video_name`) USING BTREE,
  INDEX `category_id`(`category_id`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE,
  INDEX `type`(`type`) USING BTREE,
  INDEX `is_recommend`(`is_recommend`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频集表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_videos_categorys
-- ----------------------------
DROP TABLE IF EXISTS `lev_videos_categorys`;
CREATE TABLE `lev_videos_categorys`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程分类名称',
  `pid` int(10) NOT NULL DEFAULT 0 COMMENT '上级ID：默认做一级',
  `icon` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '分类图标',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-有效，2-无效',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `pid`(`pid`) USING BTREE,
  INDEX `name`(`name`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频课分类表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_videos_courses
-- ----------------------------
DROP TABLE IF EXISTS `lev_videos_courses`;
CREATE TABLE `lev_videos_courses`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `video_id` int(10) NOT NULL DEFAULT 0 COMMENT '所属视频课ID',
  `course_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程视频名称',
  `course_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程视频地址（阿里云OSS地址）',
  `fee` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '课程费用（元）：0-免费',
  `poster` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '视频封面',
  `description` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '课程描述',
  `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序：倒序',
  `create_time` int(10) NOT NULL DEFAULT 0,
  `update_time` int(10) NOT NULL DEFAULT 0,
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态：1-发布，2-待发布',
  `mark` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0-删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `video_name`(`course_name`) USING BTREE,
  INDEX `status`(`status`, `mark`) USING BTREE,
  INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '视频课课程表' ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for lev_videos_orders
-- ----------------------------
DROP TABLE IF EXISTS `lev_videos_orders`;
CREATE TABLE `lev_videos_orders`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '单号',
  `user_id` int(11) NULL DEFAULT 0 COMMENT '用户ID',
  `goods_id` int(10) NOT NULL DEFAULT 0 COMMENT '视频课course表ID',
  `total` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '订单金额',
  `transaction_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付交易单号',
  `pay_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '支付时间',
  `create_time` int(11) NULL DEFAULT 0,
  `update_time` int(11) NULL DEFAULT 0,
  `remark` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '操作审核备注',
  `status` tinyint(1) NULL DEFAULT 1 COMMENT '状态：1-待支付，2-支付成功',
  `mark` tinyint(1) NULL DEFAULT 1 COMMENT '删除：0-是',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `order_no`(`order_no`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `status`(`status`) USING BTREE,
  INDEX `mark`(`mark`) USING BTREE,
  INDEX `goods_id`(`goods_id`) USING BTREE,
  INDEX `pay_at`(`pay_at`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '视频课购买订单表' ROW_FORMAT = Compact;

SET FOREIGN_KEY_CHECKS = 1;
