sassy

Tables (8)

Activity

  • Key (id) — Primary key — NOT NULL
  • Field (name)
  • Field2 (location)
  • Field3 (available_date)
  • Field4 (price)
  • Field5 (category)
  • Field6 (rating)
  • Field (api_source)
  • Field2 (updated_at)
  • Key (id2) — Foreign key → Favorite.Key — NOT NULL
  • Key (user_id) — Foreign key → Favorite.Key — NOT NULL

Favorite

  • Key (id) — Primary key — NOT NULL
  • Key (user_id) — Foreign key → user.Key — NOT NULL
  • Field (item_type)
  • Field (rating)
  • Field (content)
  • Field2 (created_at)
  • Key (id2) — Foreign key → Flight.Key — NOT NULL
  • Key (id3) — Foreign key → Activity.Key — NOT NULL
  • Key (id4) — Foreign key → Hotel.Key — NOT NULL

Flight

  • Key (id) — Primary key — NOT NULL
  • Field (airline)
  • Field (departure_city)
  • Field (arrival_city)
  • Field (departure_date)
  • Field (return_date)
  • Field (price)
  • Field (seat_type)
  • Field (stops)
  • Field (api_source)
  • Field (updated_at)
  • Key (id2) — Foreign key → Favorite.Key — NOT NULL
  • Key (user_id) — Foreign key → Favorite.Key — NOT NULL

Hotel

  • Key (id) — Primary key — NOT NULL
  • Field (name)
  • Field (location)
  • Field (check_in_date)
  • Field2 (check_out_date)
  • Field3 (room_type)
  • Field4 (price)
  • Field5 (rating)
  • Field (api_source)
  • Field2 (updated_at)
  • Key (id2) — Foreign key → Favorite.Key — NOT NULL
  • Key (user_id) — Foreign key → Favorite.Key — NOT NULL

PriceHistory

  • Key (id) — Primary key — NOT NULL
  • Key (id2) — Foreign key → Flight.Key — NOT NULL
  • Key (id3) — Foreign key → Hotel.Key — NOT NULL
  • Field (item_type)
  • Field (date)
  • Field (price)

Review

  • Key (id) — Primary key — NOT NULL
  • Key (id2) — Foreign key → user.Key — NOT NULL
  • Field (item_type)
  • Field (rating)
  • Field (content)
  • Field (created_at)

SearchHistory

  • Key (id) — Primary key — NOT NULL
  • Key (user_id) — Foreign key → user.Key — NOT NULL
  • Field (search_type)
  • Field (keyword)
  • Field (created_at)

user (User)

  • Key (id) — Primary key — NOT NULL
  • Field (email)
  • Field (password)
  • Field (name)
  • Field (role)
  • Field (created_at)