conference_room.sql 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : localhost_3306
  4. Source Server Version : 50635
  5. Source Host : localhost:3306
  6. Source Database : conference_room
  7. Target Server Type : MYSQL
  8. Target Server Version : 50635
  9. File Encoding : 65001
  10. Date: 2019-02-12 22:28:13
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for reservation
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `reservation`;
  17. CREATE TABLE `reservation` (
  18. `id` int(11) NOT NULL AUTO_INCREMENT,
  19. `room_id` int(11) DEFAULT NULL,
  20. `user` varchar(32) DEFAULT NULL,
  21. `mobile` varchar(20) DEFAULT NULL,
  22. `date` date DEFAULT NULL,
  23. `begintime` time DEFAULT NULL,
  24. `endtime` time DEFAULT NULL,
  25. `mark` varchar(10) DEFAULT NULL,
  26. PRIMARY KEY (`id`),
  27. KEY `fk_reservation_room` (`room_id`),
  28. CONSTRAINT `fk_reservation_room` FOREIGN KEY (`room_id`) REFERENCES `room` (`id`)
  29. ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
  30. -- ----------------------------
  31. -- Records of reservation
  32. -- ----------------------------
  33. INSERT INTO `reservation` VALUES ('1', '1', 'ordinary', '13988888888', '2018-01-02', '13:30:00', '15:00:00', '审核通过');
  34. INSERT INTO `reservation` VALUES ('2', '2', 'ordinary', '13988888888', '2018-01-06', '15:00:00', '16:30:00', '审核通过');
  35. INSERT INTO `reservation` VALUES ('3', '1', 'ordinary', '13988888888', '2018-01-08', '09:00:00', '11:00:00', '审核通过');
  36. INSERT INTO `reservation` VALUES ('4', '1', 'ordinary', '13988888888', '2018-01-09', '15:00:00', '16:30:00', '审核通过');
  37. INSERT INTO `reservation` VALUES ('5', '3', 'ordinary', '13988888888', '2018-01-12', '10:00:00', '12:00:00', '审核通过');
  38. INSERT INTO `reservation` VALUES ('6', '2', 'ordinary', '13988888888', '2018-01-12', '13:00:00', '15:00:00', '审核通过');
  39. INSERT INTO `reservation` VALUES ('8', '1', 'ordinary', '13988888888', '2018-01-22', '09:00:00', '10:00:00', '取消申请');
  40. INSERT INTO `reservation` VALUES ('9', '1', 'ordinary', '13988888888', '2018-01-22', '10:30:00', '11:30:00', '待审核');
  41. INSERT INTO `reservation` VALUES ('10', '2', 'ordinary', '13988888888', '2018-01-22', '15:00:00', '17:00:00', '审核通过');
  42. INSERT INTO `reservation` VALUES ('11', '3', 'ordinary', '13988888888', '2018-01-22', '10:00:00', '12:00:00', '待审核');
  43. INSERT INTO `reservation` VALUES ('12', '3', 'ordinary', '13988888888', '2018-01-23', '09:00:00', '10:00:00', '审核通过');
  44. INSERT INTO `reservation` VALUES ('13', '1', 'ordinary', '13988888888', '2018-01-24', '09:00:00', '10:00:00', '取消申请');
  45. INSERT INTO `reservation` VALUES ('14', '1', 'ordinary', '13988888888', '2018-02-02', '09:00:00', '10:00:00', '审核通过');
  46. INSERT INTO `reservation` VALUES ('15', '1', '201801', '13988888888', '2018-02-10', '09:00:00', '10:00:00', '待审核');
  47. INSERT INTO `reservation` VALUES ('16', '3', '201801', '13988888888', '2018-02-10', '10:00:00', '11:00:00', '待审核');
  48. INSERT INTO `reservation` VALUES ('17', '1', '201801', '13988888888', '2018-02-10', '00:30:00', '13:30:00', '审核通过');
  49. -- ----------------------------
  50. -- Table structure for role
  51. -- ----------------------------
  52. DROP TABLE IF EXISTS `role`;
  53. CREATE TABLE `role` (
  54. `role_id` int(11) NOT NULL,
  55. `role_name` varchar(50) DEFAULT NULL,
  56. PRIMARY KEY (`role_id`)
  57. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  58. -- ----------------------------
  59. -- Records of role
  60. -- ----------------------------
  61. INSERT INTO `role` VALUES ('1', 'admin');
  62. INSERT INTO `role` VALUES ('2', 'ordinary');
  63. -- ----------------------------
  64. -- Table structure for room
  65. -- ----------------------------
  66. DROP TABLE IF EXISTS `room`;
  67. CREATE TABLE `room` (
  68. `id` int(11) NOT NULL AUTO_INCREMENT,
  69. `name` varchar(60) NOT NULL,
  70. `message` varchar(200) DEFAULT NULL,
  71. PRIMARY KEY (`id`)
  72. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  73. -- ----------------------------
  74. -- Records of room
  75. -- ----------------------------
  76. INSERT INTO `room` VALUES ('1', 'J305', '大型会议室,可使用多媒体,适合开会、讲座');
  77. INSERT INTO `room` VALUES ('2', '第一会议室327', '能够使用多媒体,适合组会,论文答辩');
  78. INSERT INTO `room` VALUES ('3', '第三会议室329', '能够使用多媒体,适合开组会,硕/博士毕业论文答辩');
  79. INSERT INTO `room` VALUES ('4', 'J123', '大型会议室,可容纳200人,适合举办讲座');
  80. INSERT INTO `room` VALUES ('5', 'J226', '小包间会议室,适合小组讨论');
  81. INSERT INTO `room` VALUES ('6', 'J211', '小会议室,适合二十人小型会议,含多媒体');
  82. -- ----------------------------
  83. -- Table structure for user
  84. -- ----------------------------
  85. DROP TABLE IF EXISTS `user`;
  86. CREATE TABLE `user` (
  87. `id` varchar(32) NOT NULL,
  88. `password` varchar(32) NOT NULL,
  89. `role` int(11) DEFAULT NULL,
  90. PRIMARY KEY (`id`),
  91. KEY `fk_user_role` (`role`),
  92. CONSTRAINT `fk_user_role` FOREIGN KEY (`role`) REFERENCES `role` (`role_id`)
  93. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  94. -- ----------------------------
  95. -- Records of user
  96. -- ----------------------------
  97. INSERT INTO `user` VALUES ('201801', '123', '2');
  98. INSERT INTO `user` VALUES ('admin', 'emadmin', '1');
  99. INSERT INTO `user` VALUES ('ordinary', '123456', '2');