LXP-demo-erd
Tables (31)
assignment_submissions (과제 제출)
- submission_id (제출ID) — bigint — Primary key — NOT NULL
- assignment_id (과제 id) — bigint — Foreign key → assignments.assignment_id — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- media_asset_id (자산 ID) — bigint — Foreign key → media_assets.media_asset_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → assignments.media_asset_id — NOT NULL
- submission_content (제출 내용) — bigint
- media_asset_id (제출 파일)
- submitted_at (제출 시간) — timestamp
assignments (CopyOf과제)
- assignment_id (과제 id) — bigint — Primary key — NOT NULL
- modules_id (모듈 id) — bigint — Foreign key → content_modules.modules_id — NOT NULL
- title (과제 제목) — varchar
- instructions (과제 설명 및 안내) — text
- due_date (timestamp) — 제출 마감일
assignments (과제)
- assignment_id (과제 id) — bigint — Primary key — NOT NULL
- modules_id (모듈 id) — bigint — Foreign key → content_modules.modules_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → content_modules.media_asset_id — NOT NULL
- title (과제 제목) — varchar
- instructions (과제 설명 및 안내) — text
- due_date (timestamp) — 제출 마감일
certificates (수료증 관리)
- certificate_id (수료증id) — bigint — Primary key — NOT NULL
- enrollments_id (등록 id) — bigint — Foreign key → enrollments.enrollment_id — NOT NULL
- verification_code' (검증 코드) — varchar
- issued_at (발급일) — timestamp
content_modules (CopyOf학습 콘텐츠)
- modules_id (모듈 id) — bigint — Primary key — NOT NULL
- title (모듈 제목) — varchar
- content_type (콘텐츠 유형 ('video', 'text', 'quiz')) — varchar
- media_asset_id (참조 미디어 자산 ID) — bigint
- content_body (텍스트 본문) — text
- module_order (섹션 내 순서) — int
content_modules (학습 콘텐츠)
- modules_id (모듈 id) — bigint — Primary key — NOT NULL
- section_id (섹션_id) — bigint — Foreign key → course_sections.section_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → media_assets.media_asset_id — NOT NULL
- title (모듈 제목) — varchar
- content_type (콘텐츠 유형 ('video', 'text', 'quiz')) — varchar
- media_asset_id (참조 미디어 자산 ID) — bigint
- content_body (텍스트 본문) — text
- module_order (섹션 내 순서) — int
course_sections (과정 내의 커리큘럼)
- section_id (섹션_id) — bigint — Primary key — NOT NULL
- course_id (소속된 과정 ID) — bigint — Foreign key → courses.course_id — NOT NULL
- title (섹션 제목) — varchar
- section_order (섹션 순서) — int
course_tag (link 테이블)
- tag_id (태그 ID) — bigint — Foreign key → tags.tag_id — NOT NULL
- course_id (과정 고유 id) — bigint — Foreign key → courses.course_id — NOT NULL
courses (CopyOf과정)
- course_id (과정 고유 id) — bigint — Primary key — NOT NULL
- title (과정제목) — varchar
- description (과정 상세 설명) — text
- status (과정 상태('drft','published')) — varchar
courses (과정)
- course_id (과정 고유 id) — bigint — Primary key — NOT NULL
- author_id (과정 개설자(교육자()_id) — bigint — Foreign key → users.user_id — NOT NULL
- title (과정제목) — varchar
- description (과정 상세 설명) — text
- status (과정 상태('drft','published')) — varchar
courses_history (과정 히스토리)
- history_id (히스토리 id) — bigint — Primary key — NOT NULL
- course_id (과정 고유 id) — bigint — Foreign key → courses.course_id — NOT NULL
- old_title (과정제목) — varchar
- new_title (과정 상세 설명) — text
- old_status (과정 상태('drft','published')) — varchar
- new_status (Field)
- action_type ('UPDATE', 'DELETE')
- changed_at (Field3)
- changed_by (변경을 수행한 관리자)
enrollments (수강 신청)
- enrollment_id (등록 id) — bigint — Primary key — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- course_id (과정 고유 id) — bigint — Foreign key → courses.course_id — NOT NULL
- status (수강 상태 ('active', 'completed')) — varchar
- enrolled_at (등록일) — timestamp
- completed_at (수료일) — timestamp
forum_posts (댓글)
- forum_post_id (댓글 ID) — bigint — Primary key — NOT NULL
- author_id (댓글 작성자 ID) — bigint — Foreign key → users.user_id — NOT NULL
- thread_id (원본 스레드 id) — bigint — Foreign key → forum_threads.forum_id — NOT NULL
- content (글 내용) — text
- parent_post_id (대댓글 ID) — bigint — Foreign key → forum_posts.forum_post_id — NOT NULL
forum_threads (게시물 스레드)
- thread_id (스레드_id) — bigint — Primary key — NOT NULL
- forum_id (포럼_id) — bigint — Foreign key → forums.forum_id — NOT NULL
- author_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- title (글 제목) — varchar
- content (글 내용) — text
forums (커뮤니티 게시판)
- forum_id (포럼_id) — bigint — Primary key — NOT NULL
- course_id (과정 고유 id) — bigint — Foreign key → courses.course_id — NOT NULL
- title (포럼 제목) — varchar
grades (성적 통합)
- grade_id (성적_id) — bigint — Primary key — NOT NULL
- user_id (학생 ID) — bigint — Foreign key → users.user_id — NOT NULL
- grader_id (평가자 ID) — bigint
- gradable_item_type (평가 a평가 항목 타입 ('assignment', 'quiz') 타입) — varchar
- gradable_item_id (평가 항목 ID) — bigint
- score (점수) — bigint
- feedback (피드백) — text
learning_roadmaps (개인 학습 커리큘럼)
- rodmap_id (로드맵id) — bigint — Primary key — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- title (로드맵 제목) — varchar
media_assets (미디어 파일 메타데이터)
- media_asset_id (자산 ID) — bigint — Primary key — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- uploader_id (업로더 ID) — bigint
- file_path (저장 경로) — varchar
- file_type (파일 MIME 타입) — varchar
- origin_file_name (원본 파일명) — varchar
- converted_file_name (변경 파일명) — varchar
quiz_attempts (퀴즈 응시)
- attempt_id (응시 기록 ID) — bigint — Primary key — NOT NULL
- quizze_id (퀴즈 ID) — bigint — Foreign key → quizzes.quizze_id — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → quizzes.media_asset_id — NOT NULL
- score (최종 점수) — decimal(5,2)
- completed_at (응시 완료시간) — timestamp
quiz_questions (각 퀴즈별 문항)
- question_id (Key) — bigint — Primary key — NOT NULL
- quizze_id (퀴즈 ID) — bigint — Foreign key → quizzes.quizze_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → quizzes.media_asset_id — NOT NULL
- question_text (문항 내용) — text
- question_type (문항 유형 ('multiple_choice')) — varchar
- options (보기 (객관식)) — jsonb
- correct_answer (정답) — text
quizzes (CopyOf퀴즈)
- quizze_id (퀴즈 ID) — bigint — Primary key — NOT NULL
- modules_id (모듈 id) — bigint — Foreign key → content_modules.modules_id — NOT NULL
- title (퀴즈 제목) — varchar
quizzes (퀴즈)
- quizze_id (퀴즈 ID) — bigint — Primary key — NOT NULL
- modules_id (모듈 id) — bigint — Foreign key → content_modules.modules_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → content_modules.media_asset_id — NOT NULL
- title (퀴즈 제목) — varchar
roadmap_modules (로드맵 모듈)
- rodmap_id (로드맵id) — bigint — Foreign key → learning_roadmaps.rodmap_id — NOT NULL
- modules_id (모듈 id) — bigint — Foreign key → content_modules.modules_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → content_modules.media_asset_id — NOT NULL
- step_order (학습 순서) — int
roles (권한)
- role_id (역할 ID) — int — Primary key — NOT NULL
- name (역할 이름) — varchar
tags (콘텐츠 분류 및 관리)
- tag_id (태그 ID) — bigint — Primary key — NOT NULL
- name (태그 이름) — varchar
user_auth_providers (소셜 로그인 인증 지원)
- provider_id (식별자) — bigint — Primary key — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- provider (소셜 미디어 종류) — varchar
- provider_user_id (소셜 미디어 내 사용자 고유 ID) — varchar
user_profiles (사용자 프로필)
- user_id (사용자 번호2) — bigint — Foreign key → users.user_id — NOT NULL
- bio (자기소개) — text
- avatar_url (프로필이미지) — varchar
- learning_goal (학습목표) — text
user_progress (학습 이력)
- progress_id (Key) — bigint — Primary key — NOT NULL
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- modules_id (모듈 id) — bigint — Foreign key → content_modules.modules_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → content_modules.media_asset_id — NOT NULL
- status (진행 상태 ('started', 'completed')) — varchar
- completed_at (완료 일시) — timestamp
user_quiz_answers (응시답변)
- answer_id (답변id) — bigint — Primary key — NOT NULL
- attempt_id (응시 기록 ID) — bigint — Foreign key → quiz_attempts.attempt_id — NOT NULL
- question_id (Key) — bigint — Foreign key → quiz_questions.question_id — NOT NULL
- quizze_id (퀴즈 ID) — bigint — Foreign key → quiz_questions.quizze_id — NOT NULL
- media_asset_id (자산 ID2) — bigint — Foreign key → quiz_attempts.media_asset_id — NOT NULL
- Field
user_roles (사용자 권한)
- user_id (사용자 번호) — bigint — Foreign key → users.user_id — NOT NULL
- role_id (역할 ID) — int — Foreign key → roles.role_id — NOT NULL
users (사용자 테이블)
- user_id (사용자 번호) — bigint — Primary key — NOT NULL
- email (사용자 아이디) — varchar
- password (비밀번호) — varchar
- name (이름) — varchar
- status (상태) — varchar
- last_login_at (로그인 일자) — timestamp
- created_at (생성일) — timestamp