petitel

Tables (10)

hotel_facilities

  • id — BIGINT — Primary key — NOT NULL
  • hotel_id — BIGINT — Foreign key → hotels.id — NOT NULL
  • facility_type — VARCHAR(30) — NOT NULL

hotels

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(200) — NOT NULL
  • latitude — DOUBLE
  • longitude — DOUBLE
  • description — TEXT
  • phone — VARCHAR(20)
  • thumbnail_url — VARCHAR(500)
  • rating — DOUBLE — NOT NULL
  • review_count — INT — NOT NULL
  • active — BOOLEAN — NOT NULL

pets

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • breed — VARCHAR(50)
  • age — INT
  • weight — DOUBLE
  • gender — VARCHAR(10)
  • has_chip — BOOLEAN — NOT NULL
  • special_notes — VARCHAR(500)

reservation_pets

  • id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.id — NOT NULL
  • pet_id — BIGINT — Foreign key → pets.id — NOT NULL

reservations

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.id — NOT NULL
  • check_in_date — DATE — NOT NULL
  • check_out_date — DATE — NOT NULL
  • check_in_time — TIME — NOT NULL
  • check_out_time — TIME — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • total_price — INT — NOT NULL
  • special_requests — VARCHAR(500)
  • created_at — TIMESTAMP — NOT NULL

reviews

  • id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • hotel_id — BIGINT — Foreign key → hotels.id — NOT NULL
  • rating — INT — NOT NULL
  • content — TEXT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

room_images

  • id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL

rooms

  • id — BIGINT — Primary key — NOT NULL
  • hotel_id — BIGINT — Foreign key → hotels.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • price_per_night — INT — NOT NULL
  • price_per_hour — INT
  • max_capacity — INT — NOT NULL
  • max_weight — DOUBLE
  • active — BOOLEAN — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(100)
  • name — VARCHAR(50) — NOT NULL
  • phone — VARCHAR(20)
  • provider — VARCHAR(20)
  • provider_id — VARCHAR(100)
  • terms_agreed — BOOLEAN — NOT NULL
  • privacy_agreed — BOOLEAN — NOT NULL
  • marketing_agreed — BOOLEAN — NOT NULL
  • agreed_at — TIMESTAMP — NOT NULL

wishlists

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL
  • hotel_id — BIGINT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL