iroom

Tables (8)

exam (시험)

  • exam_id — BIGINT — Primary key — NOT NULL
  • exam_paper_id — BIGINT — Foreign key → exam_paper.exam_paper_id — NOT NULL
  • exam_name — VARCHAR(100) — NOT NULL
  • grade — TINYINT — NOT NULL
  • start_at — DATETIME — NOT NULL
  • end_at — DATETIME — NOT NULL
  • notes — TEXT
  • created_by — BIGINT — Foreign key — NOT NULL
  • status — ENUM('DRAFT', 'OPEN', 'CLOSED', 'ARCHIVED') — NOT NULL
  • INDEX — `idx_exam_paper_grade_time`
  • INDEX — `fk_exam_creator`

exam_paper (시험지)

  • exam_paper_id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • grade — TINYINT — NOT NULL
  • created_by — BIGINT — Foreign key — NOT NULL
  • is_finalized — TINYINT(1) — NOT NULL
  • max_questions — INT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • INDEX — `idx_ep_grade`
  • INDEX — `fk_ep_creator`

exam_paper_item (시험지 문항)

  • paper_item_id — BIGINT — Primary key — NOT NULL
  • exam_paper_id — BIGINT — Foreign key → exam_paper.exam_paper_id — NOT NULL
  • question_id — BIGINT — Foreign key → question.question_id — NOT NULL
  • seq_no — INT — NOT NULL
  • points — INT — NOT NULL
  • snapshot_json — JSON — NOT NULL
  • INDEX — `fk_epi_paper`
  • INDEX — `fk_epi_question`

grading_result (채점 결과)

  • grading_result_id — BIGINT — Primary key — NOT NULL
  • submission_answer_id — BIGINT — Foreign key → submission_answer.submission_answer_id — NOT NULL
  • is_correct — TINYINT(1) — NOT NULL
  • score — INT — NOT NULL
  • correct_answer — TEXT
  • explanation — TEXT
  • theory — TEXT
  • feedback — TEXT

question (문제)

  • question_id — BIGINT — Primary key — NOT NULL
  • unit_id — BIGINT — Foreign key → unit.unit_id — NOT NULL
  • q_type — ENUM('MC', 'SA') — NOT NULL
  • difficulty — ENUM('HIGH', 'MID', 'LOW') — NOT NULL
  • stem — TEXT — NOT NULL
  • choices_json — JSON
  • answer_key — TEXT
  • solution_text — TEXT
  • theory_ref — TEXT
  • source — VARCHAR(100)
  • vector_ref — VARCHAR(64)
  • is_active — TINYINT(1) — NOT NULL
  • INDEX — `idx_question_unit_type_diff`

submission (제출)

  • submission_id — BIGINT — Primary key — NOT NULL
  • exam_id — BIGINT — Foreign key → exam.exam_id — NOT NULL
  • student_user_id — BIGINT — Foreign key — NOT NULL
  • submitted_at — DATETIME
  • status — ENUM('DRAFT', 'SUBMITTED', 'GRADED') — NOT NULL
  • total_score — INT
  • objective_score — INT
  • subjective_score — INT
  • graded_at — DATETIME
  • grading_method — ENUM('AUTO', 'MANUAL', 'MIX')
  • INDEX — `idx_sub_exam_student_status`
  • INDEX — `fk_sub_exam`
  • INDEX — `fk_sub_student`

submission_answer (제출 답안)

  • submission_answer_id — BIGINT — Primary key — NOT NULL
  • submission_id — BIGINT — Foreign key → submission.submission_id — NOT NULL
  • paper_item_id — BIGINT — Foreign key → exam_paper_item.paper_item_id — NOT NULL
  • question_id — BIGINT — Foreign key → question.question_id — NOT NULL
  • response_type — ENUM('MC', 'SA') — NOT NULL
  • mc_choice — VARCHAR(20)
  • subj_work_image_url — VARCHAR(255)
  • subj_work_text — TEXT
  • answer_text — TEXT
  • updated_at — DATETIME — NOT NULL
  • INDEX — `fk_sa_submission`
  • INDEX — `fk_sa_paper_item`
  • INDEX — `fk_sa_question`

unit (단원)

  • unit_id — BIGINT — Primary key — NOT NULL
  • grade — TINYINT — NOT NULL
  • unit_name — VARCHAR(100) — NOT NULL
  • unit_code — VARCHAR(50)
  • sort_order — INT — NOT NULL
  • is_active — TINYINT(1) — NOT NULL
  • INDEX — `idx_unit_grade`