CREATE TABLE `shop_list` (
   `id` int NOT NULL AUTO_INCREMENT,
   `name` VARCHAR(100),
   `lon` DOUBLE,
   `lat` DOUBLE,
   `city` VARCHAR(10),
   `area` VARCHAR(10),
   `rating` DOUBLE,
   `user_ratings_total` DOUBLE,
   `category` VARCHAR(20),
   `price_level` VARCHAR(10),
   `addr` VARCHAR(100),
   `tel` VARCHAR(20),
   
   `services` JSON ,
   `products` JSON ,
   `choices` JSON ,
   `facilities` JSON ,
   `groups` JSON ,
   `plans` JSON ,
   `payments` JSON ,
   `safeties` JSON ,
   `specials` JSON ,
   `barrierlevels` JSON ,
   `items` JSON ,

   `open_now` VARCHAR(10),
   `periods` JSON,
   `weekday_text` JSON,
   
   `reviews` JSON,

   `shop_photo` JSON,
   `menu_photo` JSON,

   `google_url` VARCHAR(200),
   `crawler_date` char(20) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY (`google_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `shop_item_list` (
   `id` int NOT NULL AUTO_INCREMENT,
   `google_url` VARCHAR(200),
   `services` VARCHAR(100),
   `products` VARCHAR(100),
   `choices` VARCHAR(100),
   `facilities` VARCHAR(100),
   `groups` VARCHAR(100),
   `plans` VARCHAR(100),
   `payments` VARCHAR(100),
   `safeties` VARCHAR(100),
   `specials` VARCHAR(100),
   `barrierlevels` VARCHAR(100),
   `items` VARCHAR(100),
   `crawler_date` char(20) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY (`google_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `shop_time_list` (
   `id` int NOT NULL AUTO_INCREMENT,
   `google_url` VARCHAR(200),
   `open_now` VARCHAR(20),
   `day` int,
   `open` VARCHAR(20),
   `close` VARCHAR(20),
   `crawler_date` char(20) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY (`google_url`,`day`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `shop_reviews_list` (
   `id` VARCHAR(30),
   `google_url` VARCHAR(200),
   `author_name` VARCHAR(20),
   `profile_photo_url` VARCHAR(200),
   `rating` int,
   `text` VARCHAR(500),
   `created_at` VARCHAR(20),
   `crawler_date` char(20) NOT NULL,
   UNIQUE KEY (`id`,`google_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE `shop_reviews_photo_list` (
   `id` VARCHAR(30),
   `google_url` VARCHAR(200),
   `path` VARCHAR(200),
   `crawler_date` char(20) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE KEY (`id`,`google_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;