65-첫

테이블 (12)

learning_card

  • id — BIGSERIAL
  • subject_id — BIGINT — 외래 키 → subject.id — NOT NULL
  • card_type — VARCHAR(32) — NOT NULL
  • front_text — VARCHAR(4000) — NOT NULL
  • back_text — VARCHAR(4000)
  • answer_text — VARCHAR(2000)
  • explanation — VARCHAR(4000)
  • is_ai_generated — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

problem

  • id — BIGSERIAL
  • subject_id — INTEGER — 외래 키 → subject.id — NOT NULL
  • question — VARCHAR(2000) — NOT NULL
  • answer — VARCHAR(2000) — NOT NULL
  • explanation — VARCHAR(4000)
  • type — VARCHAR(32) — NOT NULL
  • difficulty — INTEGER
  • option1 — VARCHAR(2000)
  • option2 — VARCHAR(2000)
  • option3 — VARCHAR(2000)
  • option4 — VARCHAR(2000)
  • option5 — VARCHAR(2000)
  • is_ai_generated — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

programming_language_problems

  • id — BIGSERIAL
  • subject_id — INTEGER — 외래 키 → subject.id
  • prog_language — VARCHAR(64) — NOT NULL
  • question — VARCHAR(1000) — NOT NULL
  • answer — VARCHAR(500) — NOT NULL
  • explanation — VARCHAR(2000)
  • difficulty — INTEGER
  • is_ai_generated — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

statistics

  • id — BIGSERIAL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • is_correct — BOOLEAN — NOT NULL
  • problem_type — VARCHAR(32) — NOT NULL
  • reference_id — BIGINT — NOT NULL
  • submitted_at — TIMESTAMP

study_session

  • id — BIGSERIAL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • subject_id — INTEGER — 외래 키 → subject.id — NOT NULL
  • session_type — VARCHAR(32) — NOT NULL
  • status — VARCHAR(32)

study_session_item

  • id — BIGSERIAL
  • session_id — BIGINT — 외래 키 → study_session.id — NOT NULL
  • item_type — VARCHAR(32) — NOT NULL
  • reference_id — BIGINT — NOT NULL
  • subject_id — BIGINT — 외래 키 → subject.id — NOT NULL
  • item_order — INTEGER — NOT NULL
  • presented_at — TIMESTAMP — NOT NULL
  • answered_at — TIMESTAMP
  • is_answered — BOOLEAN — NOT NULL
  • is_correct — BOOLEAN
  • user_submitted_answer — VARCHAR(4000)
  • bookmarked_wrong — BOOLEAN — NOT NULL

subject

  • id — BIGSERIAL
  • name — VARCHAR(255) — NOT NULL
  • description — VARCHAR(1000)
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

subjective_problems

  • id — BIGSERIAL
  • subject_id — INTEGER — 외래 키 → subject.id
  • question — VARCHAR(1000) — NOT NULL
  • answer — VARCHAR(500) — NOT NULL
  • explanation — VARCHAR(2000)
  • difficulty — INTEGER
  • is_ai_generated — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP

user_answer

  • id — BIGSERIAL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • session_id — VARCHAR(255) — NOT NULL
  • item_type — VARCHAR(32) — NOT NULL
  • reference_id — BIGINT — NOT NULL
  • submitted_answer — VARCHAR(4000)
  • is_correct — BOOLEAN — NOT NULL
  • submitted_at — TIMESTAMP — NOT NULL

user_statistics

  • id — BIGSERIAL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • subject_id — BIGINT — 외래 키 → subject.id — NOT NULL
  • branch — VARCHAR(32) — NOT NULL
  • total_attempted — INTEGER — NOT NULL
  • correct_count — INTEGER — NOT NULL
  • incorrect_count — INTEGER — NOT NULL
  • last_studied_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

users

  • id — BIGSERIAL
  • google_id — VARCHAR(255)
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255)
  • username — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(255)
  • role — VARCHAR(32) — NOT NULL
  • trial_started_at — TIMESTAMP — NOT NULL
  • trial_expires_at — TIMESTAMP — NOT NULL
  • subscription_started_at — TIMESTAMP
  • subscription_expires_at — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

wrong_answer_bookmark

  • id — BIGSERIAL
  • user_id — BIGINT — 외래 키 → users.id — NOT NULL
  • item_type — VARCHAR(32) — NOT NULL
  • reference_id — BIGINT — NOT NULL
  • bookmarked_at — TIMESTAMP
  • review_count — INTEGER