text: /*
   Navicat Premium Data Transfer
  
   Source Server         : 数据库
   Source Server Type    : MySQL
   Source Server Version : 50732
   Source Host           : 127.0.0.1:3306
   Source Schema         : yc-framework
  
   Target Server Type    : MySQL
   Target Server Version : 50732
   File Encoding         : 65001
  */
  
  CREATE DATABASE `yc-framework`;
  USE `yc-framework`;
  SET NAMES utf8mb4;
  SET FOREIGN_KEY_CHECKS = 0;
  
  -- ----------------------------
  -- Table structure for yc_category
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_category`;
  CREATE TABLE `yc_category`  (
    `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
    `category_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名称',
    `status` int(1) NOT NULL COMMENT '分类状态，0正常，2删除',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创新时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    `company_id` bigint(11) NULL DEFAULT NULL COMMENT '公司ID',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 1459467364716167170 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_comment
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_comment`;
  CREATE TABLE `yc_comment`  (
    `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键ID',
    `comment_post_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论文章ID',
    `comment_author` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论用户ID',
    `comment_email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论用户邮箱',
    `comment_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论用户URL',
    `comment_ip` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '评论用户IP',
    `comment_status` int(1) NULL DEFAULT NULL COMMENT '评论状态',
    `comment_content` longblob NULL COMMENT '评论内容',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    `company_id` bigint(11) NULL DEFAULT NULL COMMENT '公司ID',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_company
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_company`;
  CREATE TABLE `yc_company`  (
    `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '公司ID',
    `company_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公司名称',
    `company_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '统一社会信用码',
    `contact` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '法人代表',
    `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司电话',
    `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司地址',
    `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司官网',
    `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司邮箱',
    `count` bigint(11) NULL DEFAULT NULL COMMENT '公司总人数',
    `status` tinyint(1) UNSIGNED ZEROFILL NULL DEFAULT 0 COMMENT '状态(0为存在，1为删除)',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_company_menu
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_company_menu`;
  CREATE TABLE `yc_company_menu`  (
    `company_id` bigint(11) NOT NULL COMMENT '公司id',
    `menu_id` bigint(11) NOT NULL COMMENT '菜单id'
  ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_file
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_file`;
  CREATE TABLE `yc_file`  (
    `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键ID',
    `file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '文件名称',
    `file_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件访问URL',
    `file_size` decimal(10, 0) NULL DEFAULT NULL COMMENT '文件大小',
    `file_type` int(1) NULL DEFAULT NULL COMMENT '文件类型',
    `file_status` int(1) NULL DEFAULT NULL COMMENT '文件状态',
    `upload_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上传用户ID',
    `company_id` bigint(11) NULL DEFAULT NULL COMMENT '公司ID',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '文件上传时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '文件更新时间',
    `file_password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件访问密码',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_menu
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_menu`;
  CREATE TABLE `yc_menu`  (
    `id` bigint(11) NOT NULL,
    `menu_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称',
    `menu_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单key',
    `menu_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单类型',
    `parent_id` bigint(11) NULL DEFAULT NULL COMMENT '父级菜单',
    `menu_sort` bigint(11) NULL DEFAULT NULL COMMENT '排序',
    `status` int(1) NULL DEFAULT NULL COMMENT '菜单状态(0正常，1待启用，2删除)',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_post
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_post`;
  CREATE TABLE `yc_post`  (
    `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键ID',
    `post_author` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户ID',
    `post_title` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
    `post_content` longblob NULL COMMENT '文章内容',
    `post_excerpt` longblob NULL COMMENT '文章摘录',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    `comment_status` int(1) NULL DEFAULT NULL COMMENT '是否开启评论',
    `company_id` bigint(11) NULL DEFAULT NULL COMMENT '公司ID',
    `post_status` int(1) NULL DEFAULT NULL COMMENT '文章状态',
    `post_password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章密码',
    `category_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分类ID',
    `tag_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标签ID',
    `origin_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原文章访问URL',
    `url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章访问URL',
    `backgroup_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文章背景图片',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_role
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_role`;
  CREATE TABLE `yc_role`  (
    `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色ID',
    `role_key` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色key',
    `role_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名称',
    `status` int(1) NULL DEFAULT NULL COMMENT '角色状态(0启用，1未启用)',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_role_menu
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_role_menu`;
  CREATE TABLE `yc_role_menu`  (
    `role_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色ID',
    `menu_id` bigint(11) NOT NULL COMMENT '菜单ID'
  ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_tag
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_tag`;
  CREATE TABLE `yc_tag`  (
    `id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
    `tag_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标签名称',
    `status` int(1) NOT NULL COMMENT '状态(0正常，2删除)',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    `company_id` bigint(11) NOT NULL COMMENT '公司ID',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_user
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_user`;
  CREATE TABLE `yc_user`  (
    `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
    `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
    `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
    `phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '手机号码',
    `nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户昵称或真实姓名',
    `company_id` bigint(11) NULL DEFAULT NULL COMMENT '公司ID',
    `sex` int(1) UNSIGNED ZEROFILL NULL DEFAULT 0 COMMENT '性别(0为男，1为女，2为其它)',
    `status` int(1) UNSIGNED ZEROFILL NULL DEFAULT 0 COMMENT '用户状态(0正常，1禁止，2删除)',
    `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
    `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_user_role
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_user_role`;
  CREATE TABLE `yc_user_role`  (
    `user_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID',
    `role_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色ID'
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_zq_aqa_city_hour
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_zq_aqa_city_hour`;
  CREATE TABLE `yc_zq_aqa_city_hour`  (
    `city` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `aqi` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `pm2_5` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `pm10` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `so2` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `no2` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `co` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `o3` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `day` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `hour` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `create_time` datetime(0) NULL DEFAULT NULL,
    PRIMARY KEY (`city`, `day`, `hour`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  -- ----------------------------
  -- Table structure for yc_zq_city
  -- ----------------------------
  DROP TABLE IF EXISTS `yc_zq_city`;
  CREATE TABLE `yc_zq_city`  (
    `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    `city_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
  
  SET FOREIGN_KEY_CHECKS = 1;
  