codingplatform

테이블 (23)

contest_pool_filter (Untitled)

  • id — int — 기본 키 — NOT NULL
  • PK (contest_id) — int — 외래 키 → 대회.PK — NOT NULL
  • PK2 (pool_id) — int — 외래 키 → pool.id — NOT NULL
  • level — string

contest_problem

  • PK (Key) — int — 기본 키 — NOT NULL
  • FK (problem_id) — int — 외래 키 → 그룹.id — NOT NULL
  • FK2 (contest_id) — int — 외래 키 → 대회.PK — NOT NULL
  • 표시 id (display_id) — string — NOT NULL
  • 점수 (score) — int — NOT NULL

pool

  • id — int — 기본 키 — NOT NULL
  • PK (created_by) — int — 외래 키 → 사용자.PK — NOT NULL
  • 이름 (name) — string — NOT NULL
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 업데이트 시간 (update_time) — datetime — NOT NULL

pool_problem

  • Key — 기본 키 — NOT NULL
  • FK (problem_id) — int — 외래 키 → 문제.PK — NOT NULL
  • FK2 (pool_id) — int — 외래 키 → pool.id — NOT NULL

pool_share (Untitled2)

  • PK (id) — int — 기본 키 — NOT NULL
  • Field
  • FK (pool_id) — int — 외래 키 → pool.id — NOT NULL
  • FK2 (group_id) — int — 외래 키 → 그룹.id — NOT NULL

problem_tag

  • tag_id — int — 외래 키 → 태그.id — NOT NULL
  • problem_id — int — 외래 키 → 문제.PK — NOT NULL

user-group 소속 (user_group)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK1 (user_id) — int — 외래 키 → 사용자.PK — NOT NULL
  • FK2 (group_id) — int — 외래 키 → 그룹.id — NOT NULL
  • 승인여부 (registered) — boolean — NOT NULL
  • group_manager (is_group_manager) — boolean — NOT NULL

workbook_problem

  • Key — 기본 키 — NOT NULL
  • 점수 (score)
  • FK (workbook_id) — int — 외래 키 → 문제집.PK — NOT NULL
  • FK2 (problem_id) — int — 외래 키 → 문제.PK — NOT NULL
  • 표시 id (display_id) — string — NOT NULL

공지사항 (notice)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK (created_by) — int — 외래 키 → 사용자.PK — NOT NULL
  • FK2 (group_id) — int — 외래 키 → 그룹.id — NOT NULL
  • 제목 (title) — string — NOT NULL
  • 내용 (content) — string — NOT NULL
  • user에게 visible 여부 (visible) — boolean — NOT NULL
  • 상단 고정 여부 (fixed) — booelan — NOT NULL
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 업데이트 시간 (update_time) — datetime

그룹 (group)

  • id — int — 기본 키 — NOT NULL
  • PK (created_by) — int — 외래 키 → 사용자.PK — NOT NULL
  • 그룹 이름 (group_name) — string — NOT NULL
  • 공개 그룹 여부 (private) — boolean — NOT NULL
  • 초대 코드 (invitation_code) — string — 자동 발급
  • 그룹 설명 (description) — string — NOT NULL
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 업데이트 시간 (update_time) — datetime — NOT NULL
  • 그룹 이미지 (group_image) — string(base64) — NOT NULL

그룹 문제 pool (group_problem_pool)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK (group_id) — int — 외래 키 → 그룹.id — NOT NULL
  • FK2 (problem_id) — int — 외래 키 → 문제.PK — NOT NULL

대회 (contest)

  • PK (id) — int — 기본 키 — NOT NULL
  • 참여 대상 그룹(FK1) (group_id) — int — 외래 키 → 그룹.id — NOT NULL
  • 관리 그룹 (manageg_group_id) — int — 외래 키 → 그룹.id — NOT NULL
  • FK2 (created_by) — int — 외래 키 → 사용자.PK — NOT NULL
  • 제목 (title) — string — NOT NULL
  • 설명 (description) — string — NOT NULL
  • description 요약 (description_summary) — string — NOT NULL — 모달 창에서 보임
  • 시작 시각 (start_time) — datetime — NOT NULL
  • 종료 시각 (end_time) — datetime — NOT NULL
  • user에게 visible 여부 (visible) — boolean — NOT NULL
  • 생성 시각 (create_time) — datetime — NOT NULL
  • 마지막 업데이트 시간 (update_time) — datetime
  • user에게 rank page visible 여부 (is_rank_visible) — boolean — NOT NULL
  • 대회 type (type) — string — NOT NULL — ACM, 문제은행, 문제별 점수
  • public여부 (is_public) — boolean — NOT NULL

대회 ACM 랭킹 (contest_rank_acm)

  • id — int — 기본 키 — NOT NULL
  • FK (contest_id) — int — 외래 키 → 대회.PK — NOT NULL
  • FK2 (user_id) — int — 외래 키 → 사용자.PK — NOT NULL — unique
  • 해결한 문제 개수 (accepted_prob_num) — int — NOT NULL — 1st 순위 기준
  • ACM penalty 총합 (total_penalty) — int — NOT NULL — 2nd 순위 기준
  • 문제별 acm 정보 (problem_info) — json

대회 공지사항(clarification) (contest_notice)

  • id — int — 기본 키 — NOT NULL
  • PK (contest_id) — int — 외래 키 → 대회.PK — NOT NULL
  • 제목 (title) — string — NOT NULL
  • 설명 (description) — string — NOT NULL
  • 문제 번호 (problem_id) — string
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 업데이트 시간 (update_time) — datetime — NOT NULL

대회 기록 (contest_record)

  • id — int — 기본 키 — NOT NULL
  • Fk (contest_id) — int — 외래 키 → 대회.PK — NOT NULL
  • FK2 (user_id) — int — 외래 키 → 사용자.PK — NOT NULL
  • 순위 (rank) — int — NOT NULL

문제 (problem)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK2 (created_by) — int — 외래 키 → 사용자.PK — NOT NULL
  • 제목 (title) — string — NOT NULL
  • 설명 (description) — string — NOT NULL
  • 입력 설명 (input_description) — string — NOT NULL
  • 출력 설명 (output_description) — string — NOT NULL
  • 힌트 (hint) — string — NOT NULL
  • 가능 언어 (languages) — json — NOT NULL
  • 시간 제한 (time_limit) — int — NOT NULL
  • 메모리 제한 (memory_limit) — int — NOT NULL
  • 난이도 (difficulty) — string — NOT NULL
  • 출처 (source)
  • 공유가능 여부 (shared) — boolean — NOT NULL
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 업데이트 시간 (update_time) — datetime — NOT NULL
  • 총 제출 수 (submission_number) — int — NOT NULL — 정답률 계산
  • 총 정답 제출 수 (accepted_number) — int — NOT NULL — 정답률 계산
  • Public인지 여부 (is_public) — boolean — NOT NULL

문제집 (workbook)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK (group_id) — int — 외래 키 → 그룹.id — NOT NULL
  • FK2 (created_by) — int — 외래 키 → 사용자.PK — NOT NULL
  • 제목 (title) — string — NOT NULL
  • 설명 (description) — string — NOT NULL
  • 시작 시간 (start_time) — datetime
  • 종료 시간 (end_time) — datetime
  • user에게 visible 여부 (visible) — boolean — NOT NULL
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 마지막 업데이트 시간 (update_time) — datetime
  • 부분점수 (allow_partial_score) — boolean — NOT NULL
  • public 여부 (is_public) — boolean — NOT NULL

사용자 (user)

  • PK (id) — int — 기본 키 — NOT NULL
  • 아이디 (username) — string — NOT NULL
  • 비밀번호 (password) — string — NOT NULL
  • 계층 타입 (role) — string — NOT NULL — user/group_admin/super_admin
  • 이메일 (email) — string — NOT NULL
  • 이메일 인증 여부 (email_authenticated) — boolean — NOT NULL
  • last_login — datetime
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 업데이트 시간 (update_time) — datetime
  • 학번 (student_id) — string — unique

제출 (submission)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK (problem_id) — int — 외래 키 → 문제.PK — NOT NULL
  • FK2 (user_id) — int — 외래 키 → 사용자.PK — NOT NULL
  • workbook_id — int — 외래 키 → 문제집.PK
  • contest_id — int — 외래 키 → 대회.PK
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 코드 (code) — string — NOT NULL
  • 언어 (language) — string — NOT NULL
  • 공개 여부 (shared) — boolean — NOT NULL
  • IP 주소 (ip_addr) — string — NOT NULL

채점 결과 (submission_result)

  • id — NOT NULL — 기본 키 — NOT NULL
  • submission_id — NOT NULL — 외래 키 → 제출.PK — NOT NULL
  • 생성 시간 (create_time) — datetime — NOT NULL
  • 채점 결과 (result) — string — NOT NULL — Accepted, Wrong Answer...
  • 맞춘 테스트케이스 개수 (accepted_num) — int — NOT NULL
  • 총 테스트케이스 개수 (total_testcase_num) — int — NOT NULL

태그 (tag)

  • id — int — 기본 키 — NOT NULL
  • 이름 (name) — string — NOT NULL
  • 타입 (type) — string — NOT NULL — algorithm, source....
  • user에게 보이는지 여부 (visible) — boolean — NOT NULL

테스트케이스 (problem_test_case)

  • id — int — 기본 키 — NOT NULL
  • problem_id — int — 외래 키 → 문제.PK — NOT NULL
  • input — string
  • output — string

프로필 (user_profile)

  • PK (id) — int — 기본 키 — NOT NULL
  • FK (user_id) — int — 외래 키 → 사용자.PK — NOT NULL
  • 본명 (real_name) — string — NOT NULL
  • 전공 (major) — string — NOT NULL