Ziply

Tables (11)

base_location

  • base_location_id — BIGINT — Primary key — NOT NULL
  • card_id — BIGINT — Foreign key → housing_search_card.card_id — NOT NULL
  • name — VARCHAR(255) — NOT NULL
  • type — VARCHAR(50) — NOT NULL
  • latitude — DECIMAL(10,7) — NOT NULL
  • longitude — DECIMAL(10,7) — NOT NULL
  • is_primary — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

card_checklist_item

  • card_checklist_id — BIGINT — Primary key — NOT NULL
  • card_id (card_id2) — BIGINT — Foreign key → housing_search_card.card_id — NOT NULL
  • user_id — BIGINT — Foreign key → housing_search_card.user_id — NOT NULL
  • template_id — BIGINT
  • label — VARCHAR(255) — NOT NULL
  • type — VARCHAR(50) — NOT NULL
  • is_required — BOOLEAN — NOT NULL
  • order_index — INT — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

checklist_template

  • template_id — BIGINT — Primary key — NOT NULL
  • item_name — VARCHAR(255) — NOT NULL
  • description — VARCHAR(1000)
  • is_active — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

housing_search_card

  • card_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • search_start_date — DATE — NOT NULL
  • search_end_date — DATE
  • space_count — INT
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

housing_space

  • space_id — BIGINT — Primary key — NOT NULL
  • card_id — BIGINT — Foreign key → housing_search_card.card_id — NOT NULL
  • user_id (user_id2) — BIGINT — Foreign key → housing_search_card.user_id — NOT NULL
  • road_address — VARCHAR(500) — NOT NULL
  • jibun_address — VARCHAR(500) — NOT NULL
  • planned_visit_date — DATE
  • status — VARCHAR(50) — NOT NULL
  • is_final_candidate — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

photo

  • photo_id — BIGINT — Primary key — NOT NULL
  • visit_id (visit_id2) — BIGINT — Foreign key → visit.visit_id — NOT NULL
  • space_id (space_id2) — BIGINT — Foreign key → visit.space_id — NOT NULL
  • card_id — BIGINT — Foreign key → visit.card_id — NOT NULL
  • user_id (user_id2) — BIGINT — Foreign key → visit.user_id — NOT NULL
  • image_url — VARCHAR(1000) — NOT NULL
  • description — VARCHAR(1000)
  • taken_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

space_commute_info

  • commute_id — BIGINT — Primary key — NOT NULL
  • space_id (space_id2) — BIGINT — Foreign key → housing_space.space_id — NOT NULL
  • card_id — BIGINT — Foreign key → housing_space.card_id — NOT NULL
  • user_id (user_id2) — BIGINT — Foreign key → housing_space.user_id — NOT NULL
  • base_location_id — BIGINT — NOT NULL
  • commute_time_min — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

space_report

  • report_id — BIGINT — Primary key — NOT NULL
  • space_id (space_id2) — BIGINT — Foreign key → housing_space.space_id — NOT NULL
  • card_id — BIGINT — Foreign key → housing_space.card_id — NOT NULL
  • user_id (user_id2) — BIGINT — Foreign key → housing_space.user_id — NOT NULL
  • noise_score — INT
  • noise_factors — VARCHAR(1000)
  • direction_report — TEXT
  • light_report — TEXT
  • overall_score — INT
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

user

  • user_id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

visit

  • visit_id — BIGINT — Primary key — NOT NULL
  • space_id (space_id2) — BIGINT — Foreign key → housing_space.space_id — NOT NULL
  • card_id — BIGINT — Foreign key → housing_space.card_id — NOT NULL
  • user_id (user_id2) — BIGINT — Foreign key → housing_space.user_id — NOT NULL
  • visit_date — DATE — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

visit_measurement

  • measurement_id — BIGINT — Primary key — NOT NULL
  • visit_id — BIGINT — Foreign key → visit.visit_id — NOT NULL
  • space_id (space_id2) — BIGINT — Foreign key → visit.space_id — NOT NULL
  • card_id — BIGINT — Foreign key → visit.card_id — NOT NULL
  • user_id (user_id2) — BIGINT — Foreign key → visit.user_id — NOT NULL
  • direction_degree — DECIMAL(6,2)
  • direction_measure_success — BOOLEAN — NOT NULL
  • outdoor_lux — DECIMAL(10,2)
  • indoor_lux — DECIMAL(10,2)
  • light_measure_success — BOOLEAN — NOT NULL
  • measured_at — DATETIME — NOT NULL