1

Tables (11)

bookmarks

  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

destinations

  • destination_id — INT — Primary key — NOT NULL
  • dest_name — VARCHAR(100) — NOT NULL
  • dest_address — VARCHAR(255)
  • dest_latitude — DECIMAL(12,8) — NOT NULL
  • dest_longitude — DECIMAL(12,8) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

onboardings

  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • destination_type — VARCHAR(20) — NOT NULL
  • destination_id — INT — Foreign key → destinations.destination_id — NOT NULL
  • transport_mode — VARCHAR(20) — NOT NULL
  • max_travel_time — INT — NOT NULL
  • budget_deposit — INT — NOT NULL
  • budget_rent — INT — NOT NULL
  • min_safety_score — INT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

properties

  • property_id — INT — Primary key — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • latitude — DECIMAL(12,8) — NOT NULL
  • longitude — DECIMAL(12,8) — NOT NULL
  • building_type — VARCHAR(30) — NOT NULL
  • room_type — VARCHAR(30) — NOT NULL
  • deposit — INT — NOT NULL
  • monthly_rent — INT — NOT NULL
  • area — DECIMAL(6,2) — NOT NULL
  • floor — VARCHAR(10) — NOT NULL
  • built_year — INT — NOT NULL
  • is_illegal_building — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

property_amenities

  • amenity_type — VARCHAR(50) — Primary key — NOT NULL
  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • distance_meters — INT — NOT NULL
  • walk_time_minutes — INT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

property_comment

  • comment_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • content — VARCHAR(255) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

property_images

  • image_id — INT — Primary key — NOT NULL
  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

property_safety

  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • destination_id — INT — Foreign key → destinations.destination_id — NOT NULL
  • safety_score — INT — NOT NULL
  • cctv_count — INT — NOT NULL
  • street_lamp_count — INT — NOT NULL
  • has_police_station — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP

property_tag

  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • tag_type — VARCHAR(50) — NOT NULL

route_vote

  • vote_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • property_id — INT — Foreign key → properties.property_id — NOT NULL
  • destination_id — INT — Foreign key → destinations.destination_id — NOT NULL
  • vote_type — VARCHAR(10) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

users

  • user_id — INT — Primary key — NOT NULL
  • id — VARCHAR(50) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • birth_date — DATE — NOT NULL
  • gender — CHAR(1) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP