cs473_db

Tables (12)

chat_messages (채팅방 메세지)

  • message_id (메세지 아이디) — string — Primary key — NOT NULL
  • message_content (메세지 본문) — string — NOT NULL
  • generated_at (메세지 생성일) — datetime — NOT NULL
  • expired_at (메세지 만료일) — datetime — NOT NULL
  • likes_count (메세지 좋아요 수) — integer — NOT NULL
  • is_official (공식 메세지 여부) — boolean — NOT NULL
  • fk__chat_messages__chats (채팅방 아이디) — string — Foreign key → chats.chat_id — NOT NULL
  • fk__chat_messages__users (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL

chats (채팅)

  • chat_id (채팅방 아이디) — string — Primary key — NOT NULL
  • generated_at (채팅방 생성일) — string — NOT NULL
  • members_count (채팅방 참가자 수) — string — NOT NULL
  • fk__chats__locations (장소 아이디) — string — Foreign key → locations.location_id — NOT NULL

congestion__feedbacks (사용자 피드백 혼잡도 정보)

  • information_id (정보 아이디) — string — Primary key — NOT NULL
  • congestion_level (혼잡도 수치) — integer — NOT NULL
  • expired_at (만료 시점) — datetime — NOT NULL
  • fk__congestion_feedbacks__users (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL
  • fk__congestion_feedbacks__locations (장소 아이디) — string — Foreign key → locations.location_id — NOT NULL

congestion_officials (공식 혼잡도 정보)

  • information_id (정보 아이디) — string — Primary key — NOT NULL
  • congestion_level (혼잡도 수치) — integer — NOT NULL
  • expired_at (만료 시점) — datetime — NOT NULL
  • fk__congestion_officials__users (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL
  • fk__congestion_officials__locations (장소 아이디) — string — Foreign key → locations.location_id — NOT NULL

hot_events (핫 이벤트)

  • event_id (이벤트 아이디) — string — Primary key — NOT NULL
  • event_title (이벤트 제목) — string — NOT NULL
  • event_content (이벤트 본문) — text — NOT NULL
  • expired_at (만료일) — string — NOT NULL
  • fk__hot_events__locations (연관 장소 아이디) — string — Foreign key → locations.location_id

location_categories (장소 카테고리)

  • location_category_id (장소 카테고리 아이디) — string — Primary key — NOT NULL
  • location_category_name (장소 카테고리 이름) — string — NOT NULL

locations (장소)

  • location_id (장소 아이디) — string — Primary key — NOT NULL
  • location_latitude (장소 위도) — float — NOT NULL
  • location_longitude (장소 경도) — float — NOT NULL
  • location_name (장소명) — stirng — NOT NULL
  • location_description (장소 설명) — string — NOT NULL
  • location_congestion_level (장소 혼잡도 레벨) — integer — NOT NULL
  • last_updated_at (혼잡도 시점) — datetime — NOT NULL
  • current_views_count (현재 장소 조회 사용자수) — integer — NOT NULL
  • near_users_count (주변 사용자수) — string — NOT NULL
  • is_official_user_exist (공식 관리자 존재 여부) — boolean — NOT NULL
  • fk__locations__users (공식 관리 사용자 아이디) — string — Foreign key → users.user_id
  • locations__location_categories (장소 카테고리 아이디) — string — Foreign key → location_categories.location_category_id — NOT NULL

on_plans (플랜 장소)

  • on_plan_id (플랜 아이디) — stirng — Primary key — NOT NULL
  • generated_at (생성 일시) — datetime — NOT NULL
  • expired_at (만료 일시) — datetime — NOT NULL
  • index (인덱스) — integer — NOT NULL
  • fk__users__on_plans (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL
  • fk__locations_on_plans (장소 아이디) — string — Foreign key → locations.location_id — NOT NULL

tips (장소 팁)

  • tip_id (팁 아이디) — string — Primary key — NOT NULL
  • tip_content (팁 본문) — text — NOT NULL
  • likes_count (좋아요 수) — integer — NOT NULL
  • is_official (공식 팁 여부) — boolean — NOT NULL
  • fk__tips__users (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL
  • fk__tps__locations (장소 아이디) — string — Foreign key → locations.location_id — NOT NULL

user_message_likes (사용자 메세지 좋아요 매핑)

  • mapping_id (메핑 아이디) — string — Primary key — NOT NULL
  • mapped_at (매핑 일시) — datetime — NOT NULL
  • fk__user_id (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL
  • fk__message_id (메세지 아이디) — string — Foreign key → chat_messages.message_id — NOT NULL

user_tip_likes (사용자 팁 좋아요 매핑)

  • mapping_id (매핑 아이디) — string — Primary key — NOT NULL
  • mapped_at (매핑 일시) — datetime — NOT NULL
  • fk__user_id (사용자 아이디) — string — Foreign key → users.user_id — NOT NULL
  • fk__tip_id (팁 아이디) — string — Foreign key → tips.tip_id — NOT NULL

users (사용자)

  • user_id (사용자 아이디) — string — Primary key — NOT NULL
  • user_name (사용자 이름) — string — NOT NULL
  • user_password (사용자 비밀번호) — string — NOT NULL
  • is_active (활성화여부) — boolean — NOT NULL
  • generated_at (가입 일시) — datetime — NOT NULL
  • contribution_level (기여도) — integer — NOT NULL
  • feedback_number (피드백 제공 횟수) — integer — NOT NULL
  • is_official_user (공식 사용자 여부) — boolean — NOT NULL