text: /*
   Navicat Premium Data Transfer
  
   Source Server         : localhost
   Source Server Type    : MySQL
   Source Server Version : 50720
   Source Host           : localhost:3306
   Source Schema         : gre.boost
  
   Target Server Type    : MySQL
   Target Server Version : 50720
   File Encoding         : 65001
  
   Date: 27/04/2021 10:16:10
  */
  
  SET NAMES utf8mb4;
  SET FOREIGN_KEY_CHECKS = 0;
  
  -- ----------------------------
  -- Table structure for auth_assignment
  -- ----------------------------
  DROP TABLE IF EXISTS `auth_assignment`;
  CREATE TABLE `auth_assignment`  (
    `item_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `created_at` int(11) NULL DEFAULT NULL,
    PRIMARY KEY (`item_name`, `user_id`) USING BTREE,
    INDEX `user_id`(`user_id`) USING BTREE,
    INDEX `created_at`(`created_at`) USING BTREE,
    INDEX `item_name`(`item_name`) USING BTREE,
    CONSTRAINT `auth_assignment_ibfk_2` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '管理员授权表' ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for auth_item
  -- ----------------------------
  DROP TABLE IF EXISTS `auth_item`;
  CREATE TABLE `auth_item`  (
    `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `type` int(11) NOT NULL,
    `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `rule_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `created_at` int(11) NULL DEFAULT NULL,
    `updated_at` int(11) NULL DEFAULT NULL,
    PRIMARY KEY (`name`) USING BTREE,
    INDEX `rule_name`(`rule_name`) USING BTREE,
    INDEX `type`(`type`) USING BTREE,
    INDEX `name`(`name`) USING BTREE,
    INDEX `created_at`(`created_at`) USING BTREE,
    CONSTRAINT `auth_item_ibfk_2` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '管理权权限条目' ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for auth_item_child
  -- ----------------------------
  DROP TABLE IF EXISTS `auth_item_child`;
  CREATE TABLE `auth_item_child`  (
    `parent` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `child` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    PRIMARY KEY (`parent`, `child`) USING BTREE,
    INDEX `child`(`child`) USING BTREE,
    INDEX `parent`(`parent`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '管理员权限关系表' ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for auth_rule
  -- ----------------------------
  DROP TABLE IF EXISTS `auth_rule`;
  CREATE TABLE `auth_rule`  (
    `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `created_at` int(11) NULL DEFAULT NULL,
    `updated_at` int(11) NULL DEFAULT NULL,
    PRIMARY KEY (`name`) USING BTREE,
    INDEX `name`(`name`) USING BTREE,
    INDEX `created_at`(`created_at`) USING BTREE,
    INDEX `updated_at`(`updated_at`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '管理员权限规则表' ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for category
  -- ----------------------------
  DROP TABLE IF EXISTS `category`;
  CREATE TABLE `category`  (
    `cat_id` int(10) NOT NULL AUTO_INCREMENT,
    `cat_parent` int(10) NULL DEFAULT NULL,
    `cat_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `status` int(3) NULL DEFAULT NULL,
    `create_at` int(10) NULL DEFAULT NULL,
    PRIMARY KEY (`cat_id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for curriculum
  -- ----------------------------
  DROP TABLE IF EXISTS `curriculum`;
  CREATE TABLE `curriculum`  (
    `id` int(20) NOT NULL AUTO_INCREMENT,
    `name` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `show_time` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `show_teachers` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    `show_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `cat_id` int(10) NULL DEFAULT NULL,
    `show_year` int(8) NULL DEFAULT NULL,
    `show_day` int(4) NULL DEFAULT NULL,
    `show_month` int(4) NULL DEFAULT NULL,
    `show_order` int(10) NOT NULL DEFAULT 0,
    `status` int(3) NULL DEFAULT NULL,
    `create_at` int(10) NULL DEFAULT NULL,
    `update_at` int(10) NULL DEFAULT NULL,
    `user_id` int(10) NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for menu
  -- ----------------------------
  DROP TABLE IF EXISTS `menu`;
  CREATE TABLE `menu`  (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `parent` int(11) NULL DEFAULT NULL,
    `route` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `order` int(11) NULL DEFAULT NULL,
    `data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
    PRIMARY KEY (`id`) USING BTREE,
    INDEX `parent`(`parent`) USING BTREE,
    INDEX `name`(`name`) USING BTREE,
    INDEX `route`(`route`(255)) USING BTREE,
    INDEX `order`(`order`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统管理员菜单权限表\r\n' ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for migration
  -- ----------------------------
  DROP TABLE IF EXISTS `migration`;
  CREATE TABLE `migration`  (
    `version` varchar(180) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `apply_time` int(11) NULL DEFAULT NULL,
    PRIMARY KEY (`version`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for posts
  -- ----------------------------
  DROP TABLE IF EXISTS `posts`;
  CREATE TABLE `posts`  (
    `post_id` int(25) NOT NULL AUTO_INCREMENT,
    `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',
    `author` int(25) NULL DEFAULT NULL COMMENT '作者',
    `content` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '内容',
    `status` int(5) NULL DEFAULT NULL COMMENT '状态',
    `created_at` int(10) NULL DEFAULT NULL COMMENT '创建时间',
    `updated_at` int(10) NULL DEFAULT NULL COMMENT '编辑时间',
    PRIMARY KEY (`post_id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for route
  -- ----------------------------
  DROP TABLE IF EXISTS `route`;
  CREATE TABLE `route`  (
    `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `alias` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `type` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `status` smallint(6) NOT NULL DEFAULT 1,
    PRIMARY KEY (`name`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for seo
  -- ----------------------------
  DROP TABLE IF EXISTS `seo`;
  CREATE TABLE `seo`  (
    `seo_id` int(100) NOT NULL AUTO_INCREMENT,
    `seo_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
    `seo_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `seo_title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
    `seo_keywords` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
    `seo_host` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
    `seo_file` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
    `seo_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
    `seo_user` int(200) NULL DEFAULT NULL,
    `create_at` int(10) NULL DEFAULT NULL,
    `update_at` int(10) NULL DEFAULT NULL,
    PRIMARY KEY (`seo_id`, `seo_url`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for user
  -- ----------------------------
  DROP TABLE IF EXISTS `user`;
  CREATE TABLE `user`  (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `auth_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `password_hash` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `password_reset_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
    `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
    `status` smallint(6) NOT NULL DEFAULT 10,
    `created_at` int(11) NOT NULL,
    `updated_at` int(11) NOT NULL,
    `verification_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  SET FOREIGN_KEY_CHECKS = 1;
  