-- test.hotels definition

CREATE TABLE `hotels` (
  `hotel_id` int NOT NULL,
  `hotel_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `link` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `slug` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `district` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `site_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `rooms` json DEFAULT NULL,
  `hotel_presentation` text,
  `meeting_facilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `images` json DEFAULT NULL,
  `total_rooms` int DEFAULT NULL,
  `hotel_free_wifi` tinyint(1) DEFAULT NULL,
  `total_meeting_rooms` int DEFAULT NULL,
  `meeting_room_max_sqm` float DEFAULT NULL,
  `meeting_room_max_height` float DEFAULT NULL,
  `projector_resolution` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `total_restaurants` int DEFAULT NULL,
  `room_quantity` json DEFAULT NULL,
  `meeting_room_quantity` json DEFAULT NULL,
  `meeting_room_facilities` json DEFAULT NULL,
  `restaurant_remark` json DEFAULT NULL,
  `distances` json DEFAULT NULL,
  `brand` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `attachments` json DEFAULT NULL,
  `lon` decimal(12,8) DEFAULT NULL,
  `lat` decimal(12,8) DEFAULT NULL,
  `s_country` varchar(64) DEFAULT NULL,
  `s_province` varchar(64) DEFAULT NULL,
  `s_city` varchar(64) DEFAULT NULL,
  `s_name` varchar(256) DEFAULT NULL,
  `s_address` varchar(512) DEFAULT NULL,
  `s_phone` varchar(64) DEFAULT NULL,
  `hop_id` int DEFAULT NULL,
  `s_id` bigint DEFAULT NULL,
  `s_lon` decimal(12,8) DEFAULT NULL,
  `s_lat` decimal(12,8) DEFAULT NULL,
  `s_loc_type` tinyint DEFAULT NULL,
  PRIMARY KEY (`hotel_id`),
  KEY `hotels_hotel_id_IDX` (`hotel_id`) USING BTREE,
  KEY `hotels_phone_IDX` (`phone`) USING BTREE,
  KEY `hotels_hotel_name_IDX` (`hotel_name`) USING BTREE,
  KEY `hotels_address_IDX` (`address`) USING BTREE,
  KEY `hotels_country_IDX` (`country`) USING BTREE,
  KEY `hotels_city_IDX` (`city`) USING BTREE,
  KEY `hotels_s_id_IDX` (`s_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- test.hotels_temp definition

CREATE TABLE `hotels_temp` (
  `hotel_id` int NOT NULL,
  `hotel_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `link` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `slug` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `district` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `site_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `rooms` json DEFAULT NULL,
  `hotel_presentation` text,
  `meeting_facilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
  `images` json DEFAULT NULL,
  `total_rooms` int DEFAULT NULL,
  `hotel_free_wifi` tinyint(1) DEFAULT NULL,
  `total_meeting_rooms` int DEFAULT NULL,
  `meeting_room_max_sqm` float DEFAULT NULL,
  `meeting_room_max_height` float DEFAULT NULL,
  `projector_resolution` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `total_restaurants` int DEFAULT NULL,
  `room_quantity` json DEFAULT NULL,
  `meeting_room_quantity` json DEFAULT NULL,
  `meeting_room_facilities` json DEFAULT NULL,
  `restaurant_remark` json DEFAULT NULL,
  `distances` json DEFAULT NULL,
  `brand` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `attachments` json DEFAULT NULL,
  `lon` decimal(12,8) DEFAULT NULL,
  `lat` decimal(12,8) DEFAULT NULL,
  `s_country` varchar(64) DEFAULT NULL,
  `s_province` varchar(64) DEFAULT NULL,
  `s_city` varchar(64) DEFAULT NULL,
  `s_name` varchar(256) DEFAULT NULL,
  `s_address` varchar(512) DEFAULT NULL,
  `s_phone` varchar(64) DEFAULT NULL,
  `hop_id` int DEFAULT NULL,
  `s_id` bigint DEFAULT NULL,
  `s_lon` decimal(12,8) DEFAULT NULL,
  `s_lat` decimal(12,8) DEFAULT NULL,
  `s_loc_type` tinyint DEFAULT NULL,
  PRIMARY KEY (`hotel_id`),
  KEY `hotels_hotel_id_IDX` (`hotel_id`) USING BTREE,
  KEY `hotels_phone_IDX` (`phone`) USING BTREE,
  KEY `hotels_hotel_name_IDX` (`hotel_name`) USING BTREE,
  KEY `hotels_address_IDX` (`address`) USING BTREE,
  KEY `hotels_country_IDX` (`country`) USING BTREE,
  KEY `hotels_city_IDX` (`city`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- test.saas_hotel definition

CREATE TABLE `saas_hotel` (
  `id` bigint NOT NULL,
  `hop_id` int NOT NULL,
  `name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `en_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `en_address` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `lon` decimal(12,8) DEFAULT NULL,
  `lat` decimal(12,8) DEFAULT NULL,
  `loc_type` tinyint DEFAULT NULL,
  `country` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `province` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `city` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `saas_hotel_en_name_IDX` (`en_name`) USING BTREE,
  KEY `saas_hotel_phone_IDX` (`phone`) USING BTREE,
  KEY `saas_hotel_en_address_IDX` (`en_address`) USING BTREE,
  KEY `saas_hotel_country_IDX` (`country`) USING BTREE,
  KEY `saas_hotel_city_IDX` (`city`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;