create_table.sql 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. -- test.hotels definition
  2. CREATE TABLE `hotels` (
  3. `hotel_id` int NOT NULL,
  4. `hotel_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  5. `link` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  6. `slug` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  7. `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  8. `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  9. `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  10. `district` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  11. `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  12. `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  13. `site_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  14. `rooms` json DEFAULT NULL,
  15. `hotel_presentation` text,
  16. `meeting_facilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  17. `images` json DEFAULT NULL,
  18. `total_rooms` int DEFAULT NULL,
  19. `hotel_free_wifi` tinyint(1) DEFAULT NULL,
  20. `total_meeting_rooms` int DEFAULT NULL,
  21. `meeting_room_max_sqm` float DEFAULT NULL,
  22. `meeting_room_max_height` float DEFAULT NULL,
  23. `projector_resolution` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  24. `total_restaurants` int DEFAULT NULL,
  25. `room_quantity` json DEFAULT NULL,
  26. `meeting_room_quantity` json DEFAULT NULL,
  27. `meeting_room_facilities` json DEFAULT NULL,
  28. `restaurant_remark` json DEFAULT NULL,
  29. `distances` json DEFAULT NULL,
  30. `brand` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  31. `attachments` json DEFAULT NULL,
  32. `lon` decimal(12,8) DEFAULT NULL,
  33. `lat` decimal(12,8) DEFAULT NULL,
  34. `s_country` varchar(64) DEFAULT NULL,
  35. `s_province` varchar(64) DEFAULT NULL,
  36. `s_city` varchar(64) DEFAULT NULL,
  37. `s_name` varchar(256) DEFAULT NULL,
  38. `s_address` varchar(512) DEFAULT NULL,
  39. `s_phone` varchar(64) DEFAULT NULL,
  40. `hop_id` int DEFAULT NULL,
  41. `s_id` bigint DEFAULT NULL,
  42. `s_lon` decimal(12,8) DEFAULT NULL,
  43. `s_lat` decimal(12,8) DEFAULT NULL,
  44. `s_loc_type` tinyint DEFAULT NULL,
  45. PRIMARY KEY (`hotel_id`),
  46. KEY `hotels_hotel_id_IDX` (`hotel_id`) USING BTREE,
  47. KEY `hotels_phone_IDX` (`phone`) USING BTREE,
  48. KEY `hotels_hotel_name_IDX` (`hotel_name`) USING BTREE,
  49. KEY `hotels_address_IDX` (`address`) USING BTREE,
  50. KEY `hotels_country_IDX` (`country`) USING BTREE,
  51. KEY `hotels_city_IDX` (`city`) USING BTREE,
  52. KEY `hotels_s_id_IDX` (`s_id`) USING BTREE
  53. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  54. -- test.hotels_temp definition
  55. CREATE TABLE `hotels_temp` (
  56. `hotel_id` int NOT NULL,
  57. `hotel_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  58. `link` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  59. `slug` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  60. `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  61. `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  62. `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  63. `district` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  64. `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  65. `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  66. `site_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  67. `rooms` json DEFAULT NULL,
  68. `hotel_presentation` text,
  69. `meeting_facilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  70. `images` json DEFAULT NULL,
  71. `total_rooms` int DEFAULT NULL,
  72. `hotel_free_wifi` tinyint(1) DEFAULT NULL,
  73. `total_meeting_rooms` int DEFAULT NULL,
  74. `meeting_room_max_sqm` float DEFAULT NULL,
  75. `meeting_room_max_height` float DEFAULT NULL,
  76. `projector_resolution` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  77. `total_restaurants` int DEFAULT NULL,
  78. `room_quantity` json DEFAULT NULL,
  79. `meeting_room_quantity` json DEFAULT NULL,
  80. `meeting_room_facilities` json DEFAULT NULL,
  81. `restaurant_remark` json DEFAULT NULL,
  82. `distances` json DEFAULT NULL,
  83. `brand` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  84. `attachments` json DEFAULT NULL,
  85. `lon` decimal(12,8) DEFAULT NULL,
  86. `lat` decimal(12,8) DEFAULT NULL,
  87. `s_country` varchar(64) DEFAULT NULL,
  88. `s_province` varchar(64) DEFAULT NULL,
  89. `s_city` varchar(64) DEFAULT NULL,
  90. `s_name` varchar(256) DEFAULT NULL,
  91. `s_address` varchar(512) DEFAULT NULL,
  92. `s_phone` varchar(64) DEFAULT NULL,
  93. `hop_id` int DEFAULT NULL,
  94. `s_id` bigint DEFAULT NULL,
  95. `s_lon` decimal(12,8) DEFAULT NULL,
  96. `s_lat` decimal(12,8) DEFAULT NULL,
  97. `s_loc_type` tinyint DEFAULT NULL,
  98. PRIMARY KEY (`hotel_id`),
  99. KEY `hotels_hotel_id_IDX` (`hotel_id`) USING BTREE,
  100. KEY `hotels_phone_IDX` (`phone`) USING BTREE,
  101. KEY `hotels_hotel_name_IDX` (`hotel_name`) USING BTREE,
  102. KEY `hotels_address_IDX` (`address`) USING BTREE,
  103. KEY `hotels_country_IDX` (`country`) USING BTREE,
  104. KEY `hotels_city_IDX` (`city`) USING BTREE
  105. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  106. -- test.saas_hotel definition
  107. CREATE TABLE `saas_hotel` (
  108. `id` bigint NOT NULL,
  109. `hop_id` int NOT NULL,
  110. `name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  111. `en_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  112. `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  113. `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  114. `en_address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  115. `lon` decimal(12,8) DEFAULT NULL,
  116. `lat` decimal(12,8) DEFAULT NULL,
  117. `loc_type` tinyint DEFAULT NULL,
  118. `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  119. `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  120. `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  121. PRIMARY KEY (`id`),
  122. KEY `saas_hotel_en_name_IDX` (`en_name`) USING BTREE,
  123. KEY `saas_hotel_phone_IDX` (`phone`) USING BTREE,
  124. KEY `saas_hotel_en_address_IDX` (`en_address`) USING BTREE,
  125. KEY `saas_hotel_country_IDX` (`country`) USING BTREE,
  126. KEY `saas_hotel_city_IDX` (`city`) USING BTREE
  127. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;