new-learn

Tables (24)

assessment_answers

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • attempt_id — BIGINT — Foreign key → assessment_attempts.id — NOT NULL
  • question_id — BIGINT — Foreign key → assessment_questions.id — NOT NULL
  • option_id — BIGINT — Foreign key → assessment_options.id — NOT NULL
  • is_correct — BOOLEAN
  • earned_points — INT

assessment_attempts

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • assessment_id — BIGINT — Foreign key → assessments.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL — 허용값: IN_PROGRESS, SUBMITTED, EXPIRED
  • started_at — DATETIME(6) — NOT NULL
  • submitted_at — DATETIME(6)
  • score — INT

assessment_options

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • question_id — BIGINT — Foreign key → assessment_questions.id — NOT NULL
  • label — VARCHAR(2000) — NOT NULL
  • is_correct — BOOLEAN — NOT NULL

assessment_questions

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • assessment_id — BIGINT — Foreign key → assessments.id — NOT NULL
  • prompt — TEXT — NOT NULL
  • position — INT — NOT NULL
  • points — INT — NOT NULL
  • explanation — TEXT — NOT NULL

assessments

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • title — VARCHAR(160) — NOT NULL
  • description — TEXT — NOT NULL
  • domain — VARCHAR(100) — NOT NULL
  • start_at — DATETIME(6) — NOT NULL
  • end_at — DATETIME(6) — NOT NULL
  • duration_minutes — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL — 허용값: DRAFT, PUBLISHED, CLOSED
  • created_by — BIGINT — Foreign key → users.id — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

assignments

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • author_id — BIGINT — Foreign key → users.id — NOT NULL
  • title — VARCHAR(160) — NOT NULL
  • description — TEXT — NOT NULL
  • due_at — DATETIME(6) — NOT NULL
  • max_score — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

attendance_corrections

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • attendance_id — BIGINT — Foreign key → attendance_records.id — NOT NULL
  • enrollment_id — BIGINT — Foreign key → enrollments.id — NOT NULL
  • requested_status — VARCHAR(20) — NOT NULL — 허용값: PRESENT, LATE, EARLY, ABSENT, EXCUSED
  • reason — VARCHAR(2000) — NOT NULL
  • status — VARCHAR(20) — NOT NULL — 허용값: PENDING, APPROVED, REJECTED
  • reviewed_by — BIGINT — Foreign key → users.id
  • review_note — VARCHAR(2000)
  • created_at — DATETIME(6) — NOT NULL
  • reviewed_at — DATETIME(6)

attendance_records

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • enrollment_id — BIGINT — Foreign key → enrollments.id — NOT NULL
  • attendance_date — DATE — NOT NULL
  • status — VARCHAR(20) — NOT NULL — 허용값: PRESENT, LATE, EARLY, ABSENT, EXCUSED
  • check_in — DATETIME(6)
  • check_out — DATETIME(6)
  • note — VARCHAR(1000)
  • updated_at — DATETIME(6) — NOT NULL

cohorts

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • course_id — BIGINT — Foreign key → courses.id — NOT NULL
  • name — VARCHAR(120) — NOT NULL
  • start_date — DATE — NOT NULL
  • end_date — DATE — NOT NULL
  • classroom_url — VARCHAR(2000)
  • materials_url — VARCHAR(2000)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

comments

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • post_id — BIGINT — Foreign key → posts.id — NOT NULL
  • author_id — BIGINT — Foreign key → users.id — NOT NULL
  • body — TEXT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

courses

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • title — VARCHAR(160) — NOT NULL
  • description — TEXT — NOT NULL
  • total_hours — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

enrollments

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • role — VARCHAR(20) — NOT NULL — 허용값: STUDENT, INSTRUCTOR, MANAGER
  • status — VARCHAR(20) — NOT NULL — 허용값: ACTIVE, WITHDRAWN
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

files

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • uploader_id — BIGINT — Foreign key → users.id — NOT NULL
  • post_id — BIGINT — Foreign key → posts.id
  • assignment_id — BIGINT — Foreign key → assignments.id
  • submission_id — BIGINT — Foreign key → submissions.id
  • original_name — VARCHAR(255) — NOT NULL
  • stored_name — VARCHAR(100) — NOT NULL — UNIQUE
  • content_type — VARCHAR(160) — NOT NULL
  • size_bytes — BIGINT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

notifications

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • cohort_id — BIGINT — Foreign key → cohorts.id
  • type — VARCHAR(40) — NOT NULL
  • title — VARCHAR(160) — NOT NULL
  • body — VARCHAR(2000) — NOT NULL
  • resource_type — VARCHAR(40)
  • resource_id — BIGINT
  • read_at — DATETIME(6)
  • created_at — DATETIME(6) — NOT NULL

posts

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • author_id — BIGINT — Foreign key → users.id — NOT NULL
  • category — VARCHAR(20) — NOT NULL — 허용값: COURSE, SYSTEM, QUESTION, FAQ
  • title — VARCHAR(160) — NOT NULL
  • body — TEXT — NOT NULL
  • pinned — BOOLEAN — NOT NULL
  • views — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

refresh_tokens

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • token_hash — CHAR(64) — NOT NULL — UNIQUE
  • family_id — VARCHAR(36) — NOT NULL
  • expires_at — DATETIME(6) — NOT NULL
  • revoked_at — DATETIME(6)
  • created_at — DATETIME(6) — NOT NULL

roadmap_modules

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • phase_id — BIGINT — Foreign key → roadmap_phases.id — NOT NULL
  • title — VARCHAR(160) — NOT NULL
  • hours — INT — NOT NULL
  • start_date — DATE — NOT NULL
  • end_date — DATE — NOT NULL
  • position — INT — NOT NULL

roadmap_phases

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • title — VARCHAR(160) — NOT NULL
  • description — TEXT — NOT NULL
  • position — INT — NOT NULL
  • hours — INT — NOT NULL
  • start_date — DATE — NOT NULL
  • end_date — DATE — NOT NULL

schedule_events

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • title — VARCHAR(160) — NOT NULL
  • type — VARCHAR(20) — NOT NULL — 허용값: LECTURE, PROJECT, SPECIAL, HOLIDAY
  • start_at — DATETIME(6) — NOT NULL
  • end_at — DATETIME(6) — NOT NULL
  • location — VARCHAR(200) — NOT NULL
  • description — TEXT — NOT NULL
  • created_by — BIGINT — Foreign key → users.id — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

study_group_members

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • group_id — BIGINT — Foreign key → study_groups.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • joined_at — DATETIME(6) — NOT NULL

study_groups

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • cohort_id — BIGINT — Foreign key → cohorts.id — NOT NULL
  • owner_id — BIGINT — Foreign key → users.id — NOT NULL
  • name — VARCHAR(120) — NOT NULL
  • description — TEXT — NOT NULL
  • capacity — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL — 허용값: OPEN, CLOSED
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

submission_reviews

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • submission_id — BIGINT — Foreign key → submissions.id — NOT NULL — UNIQUE
  • reviewer_id — BIGINT — Foreign key → users.id — NOT NULL
  • score — INT — NOT NULL
  • feedback — TEXT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

submissions

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • assignment_id — BIGINT — Foreign key → assignments.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • body — TEXT — NOT NULL
  • repository_url — VARCHAR(2000)
  • submitted_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
  • email — VARCHAR(254) — NOT NULL — UNIQUE
  • password_hash — VARCHAR(255) — NOT NULL
  • name — VARCHAR(80) — NOT NULL
  • phone — VARCHAR(30)
  • role — VARCHAR(20) — NOT NULL — 허용값: ADMIN, INSTRUCTOR, STUDENT
  • status — VARCHAR(20) — NOT NULL — 허용값: ACTIVE, DISABLED
  • token_version — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL