/* Navicat MySQL Data Transfer Source Server : mysql Source Server Version : 50717 Source Host : localhost:3306 Source Database : dboa Target Server Type : MYSQL Target Server Version : 50717 File Encoding : 65001 Date: 2018-02-13 22:43:56 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for calendar -- ---------------------------- DROP TABLE IF EXISTS `calendar`; CREATE TABLE `calendar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `title` varchar(255) DEFAULT NULL, `start_time` datetime NOT NULL, `end_time` datetime NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of calendar -- ---------------------------- -- ---------------------------- -- Table structure for departments -- ---------------------------- DROP TABLE IF EXISTS `departments`; CREATE TABLE `departments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `department` varchar(255) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of departments -- ---------------------------- INSERT INTO `departments` VALUES ('1', '管理员', '2018-02-13 22:28:22', '2018-02-13 22:32:19'); INSERT INTO `departments` VALUES ('2', '人事部', '2018-02-13 22:28:49', null); INSERT INTO `departments` VALUES ('3', '财务部', '2018-02-13 22:28:54', null); INSERT INTO `departments` VALUES ('4', '市场部', '2018-02-13 22:29:10', null); INSERT INTO `departments` VALUES ('5', '开发部', '2018-02-13 22:29:18', null); -- ---------------------------- -- Table structure for messages -- ---------------------------- DROP TABLE IF EXISTS `messages`; CREATE TABLE `messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `message` text, `send_id` int(11) NOT NULL, `receive_id` int(11) NOT NULL, `is_read` varchar(1) NOT NULL, `is_del` varchar(1) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of messages -- ---------------------------- -- ---------------------------- -- Table structure for notices -- ---------------------------- DROP TABLE IF EXISTS `notices`; CREATE TABLE `notices` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `notice` text, `send_id` int(11) NOT NULL, `is_del` varchar(1) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of notices -- ---------------------------- -- ---------------------------- -- Table structure for positions -- ---------------------------- DROP TABLE IF EXISTS `positions`; CREATE TABLE `positions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `position` varchar(255) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of positions -- ---------------------------- INSERT INTO `positions` VALUES ('1', '管理员', '2018-02-13 22:31:17', '2018-02-13 22:32:11'); INSERT INTO `positions` VALUES ('2', '经理', '2018-02-13 22:31:45', null); INSERT INTO `positions` VALUES ('3', '主管', '2018-02-13 22:31:50', null); INSERT INTO `positions` VALUES ('4', '普通', '2018-02-13 22:31:56', null); -- ---------------------------- -- Table structure for userinfo -- ---------------------------- DROP TABLE IF EXISTS `userinfo`; CREATE TABLE `userinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `sex` varchar(255) DEFAULT NULL, `birthday` date DEFAULT NULL, `age` int(11) DEFAULT NULL, `identity_card` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `qq` int(11) DEFAULT NULL, `wechat` varchar(255) DEFAULT NULL, `weibo` varchar(255) DEFAULT NULL, `phone` varchar(255) DEFAULT NULL, `is_del` varchar(1) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`,`user_id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of userinfo -- ---------------------------- INSERT INTO `userinfo` VALUES ('1', '1', null, null, null, null, null, null, null, null, null, null, '2018-02-13 22:32:56', null); -- ---------------------------- -- Table structure for users -- ---------------------------- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(31) NOT NULL, `password` varchar(31) NOT NULL, `realname` varchar(31) NOT NULL, `department_id` int(11) NOT NULL, `position_id` int(11) NOT NULL, `is_del` varchar(1) DEFAULT NULL, `last_login_time` timestamp NULL DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`,`username`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of users -- ---------------------------- INSERT INTO `users` VALUES ('1', 'admin', 'admin', '管理员', '1', '1', '0', null, '2018-02-13 22:32:48', null);