NIEDU 수정본

테이블 (30)

Course_News_Mapping

  • courses_id — BIGINT — 기본 키 — NOT NULL
  • news_id — BIGINT — 기본 키 — NOT NULL
  • sequence — INT — NOT NULL

Course_Sub_Topics

  • course_id — BIGINT — 기본 키 — NOT NULL
  • sub_topic_id — INT — 기본 키 — NOT NULL

Course_Topics

  • course_id — BIGINT — 기본 키 — NOT NULL
  • topic_id — INT — NOT NULL

Courses

  • courses_id — BIGINT
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT
  • thumbnail_url — VARCHAR(2048)
  • difficulty — ENUM('N', 'I', 'E') — NOT NULL
  • updated_at — TIMESTAMP
  • view_count — INT

Essay_Questions

  • essay_question_id — BIGINT
  • question — TEXT — NOT NULL

Favorite_Courses

  • user_id — BIGINT — 기본 키 — NOT NULL
  • courses_id — BIGINT — 기본 키 — NOT NULL
  • created_at — TIMESTAMP

Learning_Session_Steps

  • id — BIGINT
  • session_id — BIGINT — NOT NULL
  • step_id — BIGINT — NOT NULL
  • status — ENUM('NOT_STARTED','IN_PROGRESS','COMPLETED')
  • started_at — TIMESTAMP
  • completed_at — TIMESTAMP

Learning_Sessions

  • session_id — BIGINT
  • courses_id — BIGINT — NOT NULL
  • news_id — BIGINT — NOT NULL
  • user_id — BIGINT — NOT NULL
  • status — ENUM('IN_PROGRESS','COMPLETED') — NOT NULL
  • started_at — TIMESTAMP
  • completed_at — TIMESTAMP

Learning_Steps

  • step_id — BIGINT
  • courses_id — BIGINT — NOT NULL
  • news_id — BIGINT
  • step_type — ENUM('CONTEXT', 'SUMMARY', 'TERM_CARD', 'OX_QUIZ', 'MCQ', 'FILL_IN_THE_BLANK', 'ESSAY', 'REFLECTION') — NOT NULL
  • title — VARCHAR(255)
  • sequence — INT — NOT NULL
  • content_id — BIGINT

News

  • news_id — BIGINT
  • title — VARCHAR(255) — NOT NULL
  • content — LONGTEXT — NOT NULL
  • original_url — VARCHAR(2048)
  • published_at — DATE
  • summary — TEXT — 관련 콘텐츠 ID
  • infographic_url — VARCHAR(2048)

News_Terms

  • news_id — BIGINT — 기본 키 — NOT NULL
  • term_id — BIGINT — 기본 키 — NOT NULL

Quiz_Options

  • option_id — BIGINT
  • quiz_id — BIGINT — NOT NULL
  • content — VARCHAR(255) — NOT NULL
  • is_correct — BOOLEAN — NOT NULL

Quizzes

  • quiz_id — BIGINT
  • quiz_type — ENUM('OX','MCQ','FILL_IN_THE_BLANK') — NOT NULL
  • question — TEXT — NOT NULL
  • feedback — TEXT

Reflection_Questions

  • reflection_question_id — BIGINT
  • question — TEXT — NOT NULL

Saved_Terms

  • user_id — BIGINT — 기본 키 — NOT NULL
  • term_id — BIGINT — 기본 키 — NOT NULL
  • saved_at — TIMESTAMP

Search_History

  • id — BIGINT
  • user_id — BIGINT — NOT NULL
  • keyword — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP

Step_Essay_Map

  • step_id — BIGINT
  • essay_question_id — BIGINT — NOT NULL

Step_Quiz_Map

  • step_id — BIGINT
  • quiz_id — BIGINT — NOT NULL

Step_Reflection_Map

  • step_id — BIGINT
  • reflection_question_id — BIGINT — NOT NULL

Sub_Topics

  • sub_topic_id — INT
  • topic_id — INT — NOT NULL
  • name — VARCHAR(50) — NOT NULL — 난이도(초/중/고)

Terms

  • term_id — BIGINT
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT — NOT NULL

Topics

  • topic_id — INT
  • name — VARCHAR(50) — NOT NULL — N 인포그래픽

User

  • user_id — BIGINT — 사용자 고유 식별자
  • kakao_id — VARCHAR(255) — NOT NULL — 카카오 고유 ID
  • email — VARCHAR(255) — 사용자 이메일
  • nickname — VARCHAR(50) — NOT NULL — 사용자 닉네임
  • profile_image_url — VARCHAR(2048) — 프로필 이미지 URL
  • status — ENUM('ACTIVE', 'DORMANT', 'WITHDRAWN') — NOT NULL — 계정 상태
  • subscription_tier — ENUM('FREE', 'PREMIUM') — NOT NULL — 구독 등급
  • push_notification_enabled — BOOLEAN — NOT NULL — 푸시 알림 수신 여부
  • notification_time — TIME — 기본 알림 시간
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

User_Attendance

  • user_id — BIGINT — 기본 키 — NOT NULL
  • attend_date — DATE — 기본 키 — NOT NULL
  • streak_count — INT — 세부 토픽명

User_Essay_Answers

  • id — BIGINT
  • session_id — BIGINT — NOT NULL
  • step_id — BIGINT — NOT NULL
  • essay_question_id — BIGINT — NOT NULL
  • answer_text — TEXT — NOT NULL
  • answered_at — TIMESTAMP

User_Notification_Times

  • id — BIGINT
  • user_id — BIGINT — NOT NULL
  • notify_time — TIME — NOT NULL — 요일 비트마스크(1=일, 127=매일)
  • day_of_week_mask — TINYINT — 연속 출석일
  • created_at — TIMESTAMP

User_Quiz_Answers

  • id — BIGINT
  • session_id — BIGINT — NOT NULL
  • step_id — BIGINT — NOT NULL
  • quiz_id — BIGINT — NOT NULL
  • selected_option_id — BIGINT
  • answer_text — TEXT
  • is_correct — BOOLEAN
  • answered_at — TIMESTAMP

User_Reflection_Answers

  • id — BIGINT
  • session_id — BIGINT — NOT NULL
  • step_id — BIGINT — NOT NULL
  • reflection_question_id — BIGINT — NOT NULL
  • answer_text — TEXT — NOT NULL
  • answered_at — TIMESTAMP

User_Subscriptions

  • id — BIGINT
  • user_id — BIGINT — NOT NULL
  • tier — ENUM('FREE','PREMIUM') — NOT NULL
  • is_trial — BOOLEAN
  • started_at — TIMESTAMP
  • expires_at — TIMESTAMP

User_Topic_Preferences

  • user_id — BIGINT — 기본 키 — NOT NULL
  • topic_id — INT — 기본 키 — NOT NULL