﻿

DROP DATABASE IF EXISTS `zhjd`;
CREATE DATABASE `zhjd` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `zhjd`;

#
# Source for table zhjd_dept
#

DROP TABLE IF EXISTS `zhjd_dept`;
CREATE TABLE `zhjd_dept` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dept_name` varchar(255) DEFAULT NULL COMMENT '部门名称',
  `unit_id` bigint(20) DEFAULT NULL COMMENT '所属单位id',
  `dept_duty` varchar(255) DEFAULT NULL COMMENT '部门职责',
  `dept_tell` varchar(255) DEFAULT NULL COMMENT '部门电话',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='部门表';

#
# Dumping data for table zhjd_dept
#

LOCK TABLES `zhjd_dept` WRITE;
/*!40000 ALTER TABLE `zhjd_dept` DISABLE KEYS */;
INSERT INTO `zhjd_dept` VALUES (1,'中融人力资源',0,'管理','13333333333');
INSERT INTO `zhjd_dept` VALUES (2,'人事部',0,'人事管理','12345');
INSERT INTO `zhjd_dept` VALUES (3,'q',0,'q','q');
INSERT INTO `zhjd_dept` VALUES (4,'2',0,'2','2');
/*!40000 ALTER TABLE `zhjd_dept` ENABLE KEYS */;
UNLOCK TABLES;

#
# Source for table zhjd_message
#

DROP TABLE IF EXISTS `zhjd_message`;
CREATE TABLE `zhjd_message` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `userid` bigint(20) DEFAULT NULL COMMENT '发布人ID',
  `title` varchar(200) DEFAULT NULL COMMENT '标题',
  `totaltype` varchar(10) DEFAULT NULL COMMENT '类别',
  `release_date` varchar(20) DEFAULT NULL COMMENT '发布日期',
  `dept_name` varchar(50) DEFAULT NULL COMMENT '发布来源',
  `memo` text COMMENT '内容',
  `createdate` datetime DEFAULT NULL COMMENT '创建时间',
  `updatedate` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='资讯表';

#
# Dumping data for table zhjd_message
#

LOCK TABLES `zhjd_message` WRITE;
/*!40000 ALTER TABLE `zhjd_message` DISABLE KEYS */;
INSERT INTO `zhjd_message` VALUES (1,1,'qqqq','1','2018-11-16','qqq','<p><img src=\"/upload/image/20181116/1542352779073018915.png\" title=\"1542352779073018915.png\" alt=\"QQ图片20181115184642.png\"/>qqqqq</p>',NULL,NULL);
/*!40000 ALTER TABLE `zhjd_message` ENABLE KEYS */;
UNLOCK TABLES;

#
# Source for table zhjd_news
#

DROP TABLE IF EXISTS `zhjd_news`;
CREATE TABLE `zhjd_news` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `userid` bigint(20) DEFAULT NULL COMMENT '发布人ID',
  `title` varchar(200) DEFAULT NULL COMMENT '标题',
  `totaltype` varchar(10) DEFAULT NULL COMMENT '类别',
  `release_date` varchar(20) DEFAULT NULL COMMENT '发布日期',
  `dept_name` varchar(50) DEFAULT NULL COMMENT '发布来源',
  `memo` text COMMENT '内容',
  `createdate` datetime DEFAULT NULL COMMENT '创建时间',
  `updatedate` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='资讯表';

#
# Dumping data for table zhjd_news
#

LOCK TABLES `zhjd_news` WRITE;
/*!40000 ALTER TABLE `zhjd_news` DISABLE KEYS */;
INSERT INTO `zhjd_news` VALUES (1,1,'qqqq','1','2018-11-16','qqq','<p><img src=\"/upload/image/20181116/1542352779073018915.png\" title=\"1542352779073018915.png\" alt=\"QQ图片20181115184642.png\"/>qqqqq</p>',NULL,NULL);
/*!40000 ALTER TABLE `zhjd_news` ENABLE KEYS */;
UNLOCK TABLES;

#
# Source for table zhjd_role
#

DROP TABLE IF EXISTS `zhjd_role`;
CREATE TABLE `zhjd_role` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `p_id` bigint(20) DEFAULT NULL COMMENT '父类ID',
  `role_code` varchar(40) DEFAULT NULL COMMENT '角色code',
  `role_name` varchar(255) DEFAULT NULL COMMENT '角色名称',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='权限表';

#
# Dumping data for table zhjd_role
#

LOCK TABLES `zhjd_role` WRITE;
/*!40000 ALTER TABLE `zhjd_role` DISABLE KEYS */;
INSERT INTO `zhjd_role` VALUES (999,0,'ROLE_ADMIN','管理员');
/*!40000 ALTER TABLE `zhjd_role` ENABLE KEYS */;
UNLOCK TABLES;

#
# Source for table zhjd_user
#

DROP TABLE IF EXISTS `zhjd_user`;
CREATE TABLE `zhjd_user` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增型主键',
  `LOGIN_ID` varchar(20) NOT NULL DEFAULT '' COMMENT '登录ID',
  `PASSWORD` varchar(32) NOT NULL COMMENT '登录密码(MD5加密)',
  `USER_NAME` varchar(20) DEFAULT NULL COMMENT '姓名',
  `USER_NAME_PY` varchar(20) DEFAULT NULL COMMENT '姓名简拼',
  `GENDER` int(1) DEFAULT NULL COMMENT '性别(0:女, 1:男)',
  `OFFICE_TELL` varchar(20) DEFAULT NULL COMMENT '办公室电话',
  `PHONE_NO` varchar(11) DEFAULT NULL COMMENT '个人电话',
  `HOME_ADDRESS` varchar(120) DEFAULT NULL COMMENT '家庭住址',
  `EMAIL` varchar(40) DEFAULT NULL COMMENT '电子信箱',
  `BIRTHDAY` varchar(10) DEFAULT NULL COMMENT '出生日期(格式:2011-11-22)',
  `ID_NUMBER` varchar(18) DEFAULT NULL COMMENT '身份证号',
  `CARD_NO` varchar(20) DEFAULT NULL COMMENT '卡号',
  `REMARK` varchar(400) DEFAULT NULL COMMENT '备注',
  `DEPT_ID` bigint(20) DEFAULT NULL COMMENT '部门ID(关联部门表)',
  `LEVEL_NAME` varchar(2000) DEFAULT NULL COMMENT '职务名称',
  `SORTING` varchar(20) DEFAULT NULL COMMENT '排序号',
  `OPENID` varchar(200) DEFAULT NULL COMMENT '微信ID',
  PRIMARY KEY (`ID`),
  UNIQUE KEY `AK_LOGIN_ID` (`LOGIN_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=159 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='人员表';

#
# Dumping data for table zhjd_user
#

LOCK TABLES `zhjd_user` WRITE;
/*!40000 ALTER TABLE `zhjd_user` DISABLE KEYS */;
INSERT INTO `zhjd_user` VALUES (1,'admin','c4ca4238a0b923820dcc509a6f75849b','管理员','gly',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,NULL,'1',NULL);
INSERT INTO `zhjd_user` VALUES (158,'test','e10adc3949ba59abbe56e057f20f883e','测试',NULL,1,'1','13333333333','1','1@qq.com','2018-11-09','1',NULL,'1111',1,'1',NULL,NULL);
/*!40000 ALTER TABLE `zhjd_user` ENABLE KEYS */;
UNLOCK TABLES;

#
# Source for table zhjd_user_role
#

DROP TABLE IF EXISTS `zhjd_user_role`;
CREATE TABLE `zhjd_user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `login_id` varchar(20) DEFAULT NULL COMMENT '用户登录ID',
  `role_id` bigint(20) DEFAULT NULL COMMENT '权限ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户权限表';

#
# Dumping data for table zhjd_user_role
#

LOCK TABLES `zhjd_user_role` WRITE;
/*!40000 ALTER TABLE `zhjd_user_role` DISABLE KEYS */;
INSERT INTO `zhjd_user_role` VALUES (1,'admin',999);
/*!40000 ALTER TABLE `zhjd_user_role` ENABLE KEYS */;
UNLOCK TABLES;

