길동무

테이블 (19)

place_age_visit_stats

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • reference_month — DATE — NOT NULL
  • age_group — VARCHAR(30) — NOT NULL
  • gender — VARCHAR(10) — NOT NULL
  • visit_score — NUMERIC(10, 4) — NOT NULL
  • ranking — INTEGER
  • source — VARCHAR(30) — NOT NULL
  • synced_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_bookmarks

  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_external_ids

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • provider — VARCHAR(30) — NOT NULL
  • id_type — VARCHAR(50) — NOT NULL
  • external_id — VARCHAR(255) — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_facilities

  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • wheelchair_accessible — BOOLEAN
  • accessible_parking — BOOLEAN
  • accessible_restroom — BOOLEAN
  • stroller_accessible — BOOLEAN
  • pet_allowed — BOOLEAN
  • parking_available — BOOLEAN
  • restroom_available — BOOLEAN
  • facility_note — TEXT
  • raw_detail_json — JSONB
  • synced_at — TIMESTAMP WITH TIME ZONE
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_images

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • image_url — VARCHAR(1000) — NOT NULL
  • thumbnail_url — VARCHAR(1000)
  • source — VARCHAR(30) — NOT NULL
  • is_primary — BOOLEAN — NOT NULL
  • sort_order — INTEGER — NOT NULL
  • copyright_text — VARCHAR(500)
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_popularity_snapshots

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • metric_type — VARCHAR(50) — NOT NULL
  • target_date — DATE — NOT NULL
  • score — NUMERIC(10, 4) — NOT NULL
  • ranking — INTEGER
  • source — VARCHAR(30) — NOT NULL
  • synced_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_relations

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • source_place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • related_place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • relation_category — VARCHAR(30) — NOT NULL
  • relation_rank — INTEGER
  • relation_score — NUMERIC(10, 4)
  • reference_start_date — DATE — NOT NULL
  • reference_end_date — DATE — NOT NULL
  • source — VARCHAR(30) — NOT NULL
  • synced_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL

place_themes

  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • theme_id — BIGINT — 외래 키 → themes.id — NOT NULL
  • relevance_score — SMALLINT — NOT NULL
  • source — VARCHAR(30) — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

places

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • name — VARCHAR(200) — NOT NULL
  • description — TEXT
  • address — VARCHAR(500)
  • latitude — NUMERIC(10, 7) — NOT NULL
  • longitude — NUMERIC(10, 7) — NOT NULL
  • area_code — VARCHAR(20)
  • sigungu_code — VARCHAR(20)
  • content_type_id — VARCHAR(30)
  • category1 — VARCHAR(50)
  • category2 — VARCHAR(50)
  • category3 — VARCHAR(50)
  • telephone — VARCHAR(50)
  • homepage_url — VARCHAR(1000)
  • opening_hours_text — VARCHAR(1000)
  • operation_notice — VARCHAR(500)
  • status — VARCHAR(30) — NOT NULL
  • source — VARCHAR(30) — NOT NULL
  • synced_at — TIMESTAMP WITH TIME ZONE
  • operation_info_synced_at — TIMESTAMP WITH TIME ZONE
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

post_likes

  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • post_id — BIGINT — 외래 키 → posts.id — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL

post_media

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • post_id — BIGINT — 외래 키 → posts.id — NOT NULL
  • file_key — VARCHAR(1000) — NOT NULL
  • thumbnail_file_key — VARCHAR(1000)
  • width — INTEGER
  • height — INTEGER
  • file_size_bytes — BIGINT
  • content_type — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

posts

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • visit_session_id — BIGINT — 외래 키 → visit_sessions.id — NOT NULL
  • caption — VARCHAR(300)
  • visibility — VARCHAR(20) — NOT NULL
  • taken_at — TIMESTAMP WITH TIME ZONE
  • like_count — INTEGER — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

themes

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • code — VARCHAR(50) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • theme_type — VARCHAR(30) — NOT NULL
  • description — VARCHAR(500)
  • is_active — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

tour_api_sync_logs

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • provider — VARCHAR(30) — NOT NULL
  • sync_type — VARCHAR(30) — NOT NULL
  • content_type_id — VARCHAR(30)
  • area_code — VARCHAR(20)
  • sigungu_code — VARCHAR(20)
  • received_count — INTEGER — NOT NULL
  • inserted_count — INTEGER — NOT NULL
  • updated_count — INTEGER — NOT NULL
  • skipped_count — INTEGER — NOT NULL
  • failed_count — INTEGER — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • error_code — VARCHAR(100)
  • error_message — TEXT
  • started_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • finished_at — TIMESTAMP WITH TIME ZONE

user_interactions

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id
  • post_id — BIGINT — 외래 키 → posts.id
  • interaction_type — VARCHAR(30) — NOT NULL
  • source_screen — VARCHAR(30)
  • session_key — VARCHAR(100)
  • metadata_json — JSONB
  • occurred_at — TIMESTAMP WITH TIME ZONE — NOT NULL

user_preferences

  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • preferred_radius_km — INTEGER — NOT NULL
  • avoid_crowded_place — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

user_preferred_themes

  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • theme_id — BIGINT — 외래 키 → themes.id — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL

users

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • email — VARCHAR(255)
  • nickname — VARCHAR(50) — NOT NULL
  • profile_image_url — VARCHAR(1000)
  • birth_year — SMALLINT
  • login_provider — VARCHAR(20) — NOT NULL
  • provider_user_id — VARCHAR(255) — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL

visit_sessions

  • id — BIGSERIAL — 기본 키 — NOT NULL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • place_id — BIGINT — 외래 키 → places.id — NOT NULL
  • status — VARCHAR(30) — NOT NULL
  • started_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • moving_expires_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • arrived_at — TIMESTAMP WITH TIME ZONE
  • upload_available_at — TIMESTAMP WITH TIME ZONE
  • upload_expires_at — TIMESTAMP WITH TIME ZONE
  • completed_at — TIMESTAMP WITH TIME ZONE
  • cancelled_at — TIMESTAMP WITH TIME ZONE
  • cancel_reason — VARCHAR(30)
  • last_location_at — TIMESTAMP WITH TIME ZONE
  • arrival_distance_m — INTEGER
  • created_at — TIMESTAMP WITH TIME ZONE — NOT NULL
  • updated_at — TIMESTAMP WITH TIME ZONE — NOT NULL