-- MySQL Script generated by MySQL Workbench
-- Thu Apr 25 09:27:18 2019
-- Model: New Model    Version: 1.0
-- MySQL Workbench Forward Engineering

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

-- -----------------------------------------------------
-- Schema aroad
-- -----------------------------------------------------

-- -----------------------------------------------------
-- Schema aroad
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `aroad` DEFAULT CHARACTER SET utf8 ;
USE `aroad` ;

-- -----------------------------------------------------
-- Table `aroad`.`emergency_plan`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `aroad`.`emergency_plan` ;

CREATE TABLE IF NOT EXISTS `aroad`.`emergency_plan` (
  `plan_id` INT NOT NULL AUTO_INCREMENT COMMENT '预案id',
  `plan_name` VARCHAR(45) NOT NULL COMMENT '预案名称',
  `plan_type` VARCHAR(30) NOT NULL COMMENT '预案类型',
  `plan_level` VARCHAR(20) NOT NULL COMMENT '预案级别',
  `plan_doc_name` VARCHAR(45) NOT NULL COMMENT '预案文档名称',
  `plan_doc_url` VARCHAR(100) NOT NULL COMMENT '预案文档地址',
  `plan_keyword` VARCHAR(100) NOT NULL COMMENT '预案关键字',
  `publish_dept` VARCHAR(45) NOT NULL COMMENT '发布单位',
  `publish_time` DATETIME NOT NULL COMMENT '发布时间',
  `publisher` VARCHAR(15) NOT NULL COMMENT '发布人',
  `publisher_id` INT NOT NULL COMMENT '发布人id',
  PRIMARY KEY (`plan_id`))
ENGINE = InnoDB
COMMENT = '应急预案表';


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;


INSERT INTO `sys_menu` (
	`parent_id`,
	`component`,
	`permission`,
	`type`,
	`path`,
	`icon`,
	`menu_id`,
	`del_flag`,
	`create_time`,
	`sort`,
	`update_time`,
	`name`
)
VALUES
	(
		'-1',
		'views/emergencyplan/emergencyplan/index',
		'',
		'0',
		'/emergencyplan',
		'icon-bangzhushouji',
		'9000',
		'0',
		'2018-01-20 13:17:19',
		'9',
		'2018-07-29 13:38:19',
		'应急预案'
	);
	
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
    values ( '9000', null, 'plan_add', '1', null, '1', '9001', '0', '2018-05-15 21:35:18', '0', '2018-07-29 13:38:59', '新增');
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
    values ( '9000', null, 'plan_edit', '1', null, '1', '9002', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '修改');
insert into `sys_menu` ( `parent_id`, `component`, `permission`, `type`, `path`, `icon`, `menu_id`, `del_flag`, `create_time`, `sort`, `update_time`, `name`)
    values ( '9000', null, 'plan_del', '1', null, '1', '9003', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '删除');	
