/*
Navicat Premium Data Transfer
Source Server : 127.0.0.1
Source Server Type : MySQL
Source Server Version : 50727
Source Host : localhost:3306
Source Schema : myproject
Target Server Type : MySQL
Target Server Version : 50727
File Encoding : 65001
Date: 14/07/2021 16:57:26
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for back_late
-- ----------------------------
DROP TABLE IF EXISTS `back_late`;
CREATE TABLE `back_late` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`student_id` bigint(20) NULL DEFAULT NULL,
`back_date` datetime NULL DEFAULT NULL,
`reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_s_s`(`student_id`) USING BTREE,
CONSTRAINT `fk_s_s` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for building
-- ----------------------------
DROP TABLE IF EXISTS `building`;
CREATE TABLE `building` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_id` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_pid`(`parent_id`) USING BTREE,
CONSTRAINT `fk_pid` FOREIGN KEY (`parent_id`) REFERENCES `building` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of building
-- ----------------------------
INSERT INTO `building` VALUES (1, '清华大学', NULL);
INSERT INTO `building` VALUES (2, '宿舍楼A', 1);
INSERT INTO `building` VALUES (3, '宿舍楼B', 1);
INSERT INTO `building` VALUES (5, '宿舍楼C', 1);
INSERT INTO `building` VALUES (6, 'A1入口', 2);
INSERT INTO `building` VALUES (13, 'A2入口', 2);
INSERT INTO `building` VALUES (14, 'A3入口', 2);
INSERT INTO `building` VALUES (15, 'B1入口', 3);
INSERT INTO `building` VALUES (16, 'B2入口', 3);
INSERT INTO `building` VALUES (17, 'B3入口', 3);
INSERT INTO `building` VALUES (18, 'C1入口', 5);
INSERT INTO `building` VALUES (19, 'C2入口', 5);
INSERT INTO `building` VALUES (20, '北京大学', NULL);
INSERT INTO `building` VALUES (21, '宿舍楼A', 20);
-- ----------------------------
-- Table structure for depart_application
-- ----------------------------
DROP TABLE IF EXISTS `depart_application`;
CREATE TABLE `depart_application` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`apply_user_id` bigint(20) NULL DEFAULT NULL,
`reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`time` datetime NULL DEFAULT NULL,
`student_id` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_oui`(`apply_user_id`) USING BTREE,
INDEX `fk_si`(`student_id`) USING BTREE,
CONSTRAINT `fk_oui` FOREIGN KEY (`apply_user_id`) REFERENCES `system_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_si` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 29 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of depart_application
-- ----------------------------
INSERT INTO `depart_application` VALUES (16, 23, '退学了', '2021-02-10 00:21:25', 2075);
INSERT INTO `depart_application` VALUES (17, 41, NULL, '2021-02-10 10:56:11', 2073);
INSERT INTO `depart_application` VALUES (18, 41, '不想住了', '2021-02-10 13:42:08', 2073);
INSERT INTO `depart_application` VALUES (19, 23, '不想住了', '2021-02-10 13:46:45', 2073);
INSERT INTO `depart_application` VALUES (20, 1, NULL, '2021-02-10 13:48:20', 2075);
INSERT INTO `depart_application` VALUES (21, 41, '哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈', '2021-02-10 14:55:34', 2053);
INSERT INTO `depart_application` VALUES (22, 41, NULL, '2021-02-10 15:07:00', 2050);
INSERT INTO `depart_application` VALUES (23, 1, NULL, '2021-03-10 16:29:47', 2074);
INSERT INTO `depart_application` VALUES (25, 37, '不住了', '2021-03-13 12:08:26', 2050);
INSERT INTO `depart_application` VALUES (27, 29, NULL, '2021-03-18 13:47:14', 2069);
INSERT INTO `depart_application` VALUES (28, 24, '.....', '2021-05-07 14:08:31', 2033);
-- ----------------------------
-- Table structure for depart_application_user
-- ----------------------------
DROP TABLE IF EXISTS `depart_application_user`;
CREATE TABLE `depart_application_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`operate_user_id` bigint(20) NULL DEFAULT NULL,
`is_agree` tinyint(1) NULL DEFAULT NULL,
`operate_time` datetime NULL DEFAULT NULL,
`reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`application_id` bigint(20) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_op_uid`(`operate_user_id`) USING BTREE,
INDEX `fk_dpId`(`application_id`) USING BTREE,
CONSTRAINT `fk_dpId` FOREIGN KEY (`application_id`) REFERENCES `depart_application` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `fk_op_uid` FOREIGN KEY (`operate_user_id`) REFERENCES `system_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of depart_application_user
-- ----------------------------
INSERT INTO `depart_application_user` VALUES (16, 1, 0, '2021-02-10 10:53:20', '不通过', 16);
INSERT INTO `depart_application_user` VALUES (17, 43, 1, '2021-02-10 10:56:49', NULL, 17);
INSERT INTO `depart_application_user` VALUES (18, 23, 1, '2021-02-10 10:57:11', NULL, 17);
INSERT INTO `depart_application_user` VALUES (19, 1, 0, '2021-02-10 13:31:04', '没有申请理由', 17);
INSERT INTO `depart_application_user` VALUES (20, 43, 0, '2021-02-10 13:45:32', '不同意', 18);
INSERT INTO `depart_application_user` VALUES (21, 1, 1, '2021-02-10 13:47:26', NULL, 19);
INSERT INTO `depart_application_user` VALUES (22, 43, 1, '2021-02-10 15:02:57', NULL, 21);
INSERT INTO `depart_application_user` VALUES (23, 23, 1, '2021-02-10 15:03:22', NULL, 21);
INSERT INTO `depart_application_user` VALUES (24, 1, 1, '2021-02-10 15:04:28', '通过', 21);
INSERT INTO `depart_application_user` VALUES (25, 43, 0, '2021-03-13 12:09:17', '滚', 22);
INSERT INTO `depart_application_user` VALUES (26, 43, 1, '2021-03-13 12:09:30', '好', 25);
INSERT INTO `depart_application_user` VALUES (27, 23, 1, '2021-03-13 12:10:11', '行', 25);
INSERT INTO `depart_application_user` VALUES (28, 1, 0, '2021-03-13 12:10:38', '不行', 25);
INSERT INTO `depart_application_user` VALUES (30, 23, 1, '2021-03-18 13:47:51', NULL, 27);
INSERT INTO `depart_application_user` VALUES (31, 1, 0, '2021-03-18 13:48:28', NULL, 27);
INSERT INTO `depart_application_user` VALUES (32, 29, 1, '2021-05-07 14:12:56', '通过', 28);
INSERT INTO `depart_application_user` VALUES (33, 23, NULL, NULL, NULL, 28);
-- ----------------------------
-- Table structure for faculty
-- ----------------------------
DROP TABLE IF EXISTS `faculty`;
CREATE TABLE `faculty` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_id` bigint(20) NULL DEFAULT NULL,
`order_num` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_parent`(`parent_id`) USING BTREE,
CONSTRAINT `fk_parent` FOREIGN KEY (`parent_id`) REFERENCES `faculty` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of faculty
-- ----------------------------
INSERT INTO `
- 1
- 2
前往页