text: /*
  Navicat MySQL Data Transfer
  
  Source Server         : MySQL3306
  Source Server Version : 80015
  Source Host           : localhost:3306
  Source Database       : lyl
  
  Target Server Type    : MYSQL
  Target Server Version : 80015
  File Encoding         : 65001
  
  Date: 2020-04-12 09:41:20
  */
  
  SET FOREIGN_KEY_CHECKS=0;
  
  -- ----------------------------
  -- Table structure for admin_menu
  -- ----------------------------
  DROP TABLE IF EXISTS `admin_menu`;
  CREATE TABLE `admin_menu` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `path` varchar(64) DEFAULT NULL,
    `name` varchar(64) DEFAULT NULL,
    `name_zh` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `icon_cls` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `component` varchar(64) DEFAULT NULL,
    `parent_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
  
  -- ----------------------------
  -- Table structure for admin_permission
  -- ----------------------------
  DROP TABLE IF EXISTS `admin_permission`;
  CREATE TABLE `admin_permission` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `desc_` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `url` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for admin_role
  -- ----------------------------
  DROP TABLE IF EXISTS `admin_role`;
  CREATE TABLE `admin_role` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `name_zh` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `enabled` tinyint(1) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for admin_role_menu
  -- ----------------------------
  DROP TABLE IF EXISTS `admin_role_menu`;
  CREATE TABLE `admin_role_menu` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `rid` int(11) DEFAULT NULL,
    `mid` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=194 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
  
  -- ----------------------------
  -- Table structure for admin_role_permission
  -- ----------------------------
  DROP TABLE IF EXISTS `admin_role_permission`;
  CREATE TABLE `admin_role_permission` (
    `id` int(20) NOT NULL AUTO_INCREMENT,
    `rid` int(20) DEFAULT NULL,
    `pid` int(20) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_role_permission_role_1` (`rid`),
    KEY `fk_role_permission_permission_1` (`pid`)
  ) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for admin_user_role
  -- ----------------------------
  DROP TABLE IF EXISTS `admin_user_role`;
  CREATE TABLE `admin_user_role` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `uid` int(11) DEFAULT NULL,
    `rid` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_operator_role_operator_1` (`uid`),
    KEY `fk_operator_role_role_1` (`rid`)
  ) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for book
  -- ----------------------------
  DROP TABLE IF EXISTS `book`;
  CREATE TABLE `book` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `cover` varchar(255) DEFAULT '',
    `title` varchar(255) NOT NULL DEFAULT '',
    `author` varchar(255) DEFAULT '',
    `date` varchar(20) DEFAULT '',
    `press` varchar(255) DEFAULT '',
    `abs` varchar(255) DEFAULT NULL,
    `cid` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `fk_book_category_on_cid` (`cid`),
    CONSTRAINT `fk_book_category_on_cid` FOREIGN KEY (`cid`) REFERENCES `category` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
  ) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for category
  -- ----------------------------
  DROP TABLE IF EXISTS `category`;
  CREATE TABLE `category` (
    `id` int(11) NOT NULL,
    `name` varchar(255) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- ----------------------------
  -- Table structure for jotter_article
  -- ----------------------------
  DROP TABLE IF EXISTS `jotter_article`;
  CREATE TABLE `jotter_article` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `article_title` varchar(255) DEFAULT NULL,
    `article_content_html` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
    `article_content_md` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
    `article_abstract` varchar(255) DEFAULT NULL,
    `article_cover` varchar(255) DEFAULT NULL,
    `article_date` datetime DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
  
  -- ----------------------------
  -- Table structure for user
  -- ----------------------------
  DROP TABLE IF EXISTS `user`;
  CREATE TABLE `user` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `username` char(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `password` varchar(255) DEFAULT NULL,
    `salt` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
    `name` varchar(255) DEFAULT NULL,
    `phone` varchar(255) DEFAULT NULL,
    `email` varchar(255) DEFAULT NULL,
    `enabled` tinyint(1) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8;
  