Hotel.sql 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : cyz
  4. Source Server Type : MySQL
  5. Source Server Version : 50720
  6. Source Host : localhost
  7. Source Database : Hotel
  8. Target Server Type : MySQL
  9. Target Server Version : 50720
  10. File Encoding : utf-8
  11. Date: 03/13/2020 17:19:11 PM
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for `Hotel`
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `Hotel`;
  19. CREATE TABLE `Hotel` (
  20. `id` int(11) NOT NULL AUTO_INCREMENT,
  21. `hotelName` varchar(255) NOT NULL,
  22. `hotelDescription` varchar(255) DEFAULT NULL,
  23. `address` varchar(255) DEFAULT NULL,
  24. `bizRegion` varchar(255) DEFAULT NULL,
  25. `hotelStar` varchar(255) DEFAULT NULL,
  26. `phoneNum` varchar(255) DEFAULT NULL,
  27. `rate` double DEFAULT NULL,
  28. `manager_id` int(11) DEFAULT NULL,
  29. PRIMARY KEY (`id`)
  30. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  31. -- ----------------------------
  32. -- Records of `Hotel`
  33. -- ----------------------------
  34. BEGIN;
  35. INSERT INTO `Hotel` VALUES ('1', '汉庭酒店', '欢迎您入住', null, 'XiDan', 'Four', '1829373819', '4.8', '1'), ('2', '儒家酒店', '欢迎您入住', '南京市鼓楼区珠江路268号', 'XiDan', 'Four', '1829373819', '4.8', '2'), ('5', '锦江酒店', '欢迎入住', '北京海淀', 'XiDan', 'Four', '12345678189', '4.8', '6');
  36. COMMIT;
  37. -- ----------------------------
  38. -- Table structure for `OrderList`
  39. -- ----------------------------
  40. DROP TABLE IF EXISTS `OrderList`;
  41. CREATE TABLE `OrderList` (
  42. `id` int(11) NOT NULL AUTO_INCREMENT,
  43. `userId` int(11) DEFAULT NULL,
  44. `hotelId` int(11) DEFAULT NULL,
  45. `hotelName` varchar(255) DEFAULT NULL,
  46. `checkInDate` varchar(255) DEFAULT NULL,
  47. `checkOutDate` varchar(255) DEFAULT NULL,
  48. `roomType` varchar(255) DEFAULT NULL,
  49. `roomNum` int(255) DEFAULT NULL,
  50. `peopleNum` int(255) DEFAULT NULL,
  51. `haveChild` tinytext,
  52. `createDate` varchar(255) DEFAULT NULL,
  53. `price` decimal(65,0) DEFAULT NULL,
  54. `clientName` varchar(255) DEFAULT NULL,
  55. `phoneNumber` varchar(255) DEFAULT NULL,
  56. PRIMARY KEY (`id`)
  57. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
  58. -- ----------------------------
  59. -- Records of `OrderList`
  60. -- ----------------------------
  61. BEGIN;
  62. INSERT INTO `OrderList` VALUES ('1', '4', '1', null, '2020-03-03 00:00:00.000000', '2020-03-04 00:00:00.000000', 'BigBed', '1', '2', '1', '2020-03-03 00:00:00.000000', '199', null, null), ('3', '4', '1', null, null, '2020-03-04 00:00:00.000000', 'BigBed', '1', '1', '0', '2020-03-03 00:00:00.000000', '199', null, null), ('4', '4', '1', null, null, '2020-03-06 00:00:00.000000', 'BigBed', '2', '2', '0', '2020-03-04 00:00:00.000000', '398', null, null), ('5', '4', '1', null, null, '2020-03-06 00:00:00.000000', 'BigBed', '2', '2', '0', '2020-03-04 00:00:00.000000', '398', null, null), ('6', '4', '1', null, null, '2020-03-09 00:00:00.000000', 'BigBed', '2', '2', '0', '2020-03-12 00:00:00.000000', '398', null, null), ('7', '4', '1', null, null, '2020-03-09 00:00:00.000000', 'BigBed', '2', '2', '0', '2020-03-12 00:00:00.000000', '398', null, null), ('8', '4', '1', null, '2020-03-08 00:00:00.000000', '2020-03-09 00:00:00.000000', 'BigBed', '2', '2', '0', '2020-03-12 00:00:00.000000', '398', null, null), ('9', '4', '1', '汉庭酒店', '2020-03-08', '2020-03-09', 'BigBed', '2', '2', '0', '2020-03-12', '398', '测试一号', '12345678919');
  63. COMMIT;
  64. -- ----------------------------
  65. -- Table structure for `Room`
  66. -- ----------------------------
  67. DROP TABLE IF EXISTS `Room`;
  68. CREATE TABLE `Room` (
  69. `id` int(11) NOT NULL AUTO_INCREMENT,
  70. `price` double DEFAULT NULL,
  71. `curNum` int(11) DEFAULT NULL,
  72. `total` int(11) DEFAULT NULL,
  73. `hotel_id` int(11) DEFAULT NULL,
  74. `roomType` varchar(50) DEFAULT NULL,
  75. PRIMARY KEY (`id`)
  76. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  77. -- ----------------------------
  78. -- Records of `Room`
  79. -- ----------------------------
  80. BEGIN;
  81. INSERT INTO `Room` VALUES ('2', '199', '7', '20', '1', 'BigBed'), ('3', '299', '30', '30', '1', 'DoubleBed'), ('4', '399', '10', '10', '1', 'Family');
  82. COMMIT;
  83. -- ----------------------------
  84. -- Table structure for `User`
  85. -- ----------------------------
  86. DROP TABLE IF EXISTS `User`;
  87. CREATE TABLE `User` (
  88. `id` int(11) NOT NULL AUTO_INCREMENT,
  89. `email` varchar(255) DEFAULT NULL,
  90. `password` varchar(11) NOT NULL,
  91. `username` varchar(255) DEFAULT NULL,
  92. `phonenumber` varchar(255) DEFAULT NULL,
  93. `credit` double(255,0) DEFAULT NULL,
  94. `usertype` varchar(255) DEFAULT NULL,
  95. PRIMARY KEY (`id`)
  96. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  97. -- ----------------------------
  98. -- Records of `User`
  99. -- ----------------------------
  100. BEGIN;
  101. INSERT INTO `User` VALUES ('4', '1012681@qq.com', '123456', '测试一号', '12345678919', '100', 'Client'), ('5', '123@qq.com', '123456', '测试二号', '12345678911', '100', 'Client'), ('6', '333@qq.com', '123456', null, null, null, 'HotelManager');
  102. COMMIT;
  103. SET FOREIGN_KEY_CHECKS = 1;