54

Tables (11)

code_programming

  • id — bigint — Primary key — NOT NULL
  • subject_id — int — Foreign key → subject.id
  • question — text — NOT NULL
  • subjective_answer — text — NOT NULL
  • language — varchar(50)
  • difficulty — difficulty_level
  • explanation — text
  • points — int — NOT NULL
  • activated_at — timestamp — NOT NULL
  • deactivated_at — timestamp
  • display_from — timestamp
  • display_until — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

money_user_have

  • id — bigint — Primary key — NOT NULL
  • money — decimal(19,4)
  • currency_type — currency_type_enum — NOT NULL
  • last_earned_at — timestamp
  • last_spent_at — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL
  • id (id2) — bigint — Foreign key → users.id — NOT NULL

problem

  • id — bigint — Primary key — NOT NULL
  • subject_id — int — Foreign key → subject.id — NOT NULL
  • question_type — question_type_enum — NOT NULL
  • difficulty — difficulty_level
  • question — text — NOT NULL
  • subjective_answer — text — NOT NULL
  • option1 — text
  • option2 — text
  • option3 — text
  • option4 — text
  • option5 — text
  • correct_option — int
  • explanation — text
  • points — int — NOT NULL
  • activated_at — timestamp — NOT NULL
  • deactivated_at — timestamp — 문제 비활성화
  • display_from — timestamp — 노출 시작
  • display_until — timestamp — 노출 종료
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

study_session

  • id — bigint — Primary key — NOT NULL
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • subject_id — int — Foreign key → subject.id — NOT NULL
  • status — session_status — NOT NULL
  • type — session_type — NOT NULL
  • started_at — timestamp — NOT NULL
  • ended_at — timestamp
  • abandoned_at — timestamp — 세션 중단
  • duration_seconds — int
  • total_questions — int — NOT NULL
  • correct_count — int — NOT NULL
  • score — decimal(5, 2)
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

subject

  • id — int — Primary key — NOT NULL
  • code — varchar(50) — NOT NULL
  • name — varchar(255) — NOT NULL
  • subject_explain — varchar(1000)
  • sort_order — int — NOT NULL
  • activated_at — timestamp — NOT NULL
  • problem_delete_at — timestamp — 과목 비활성화
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

subject_statistics

  • id — bigint — Primary key — NOT NULL
  • subject_id — int — Foreign key → subject.id — NOT NULL
  • total_users — int — NOT NULL — 총 학습자 수
  • active_users — int — NOT NULL — 활성 학습자 수
  • total_attempted — int — NOT NULL — 총 시도 횟수
  • total_correct — int — NOT NULL — 총 정답 수
  • total_wrong — int — NOT NULL — 총 오답 수
  • average_accuracy_rate — decimal(5, 2) — 평균 정답률
  • average_score — decimal(5, 2) — 평균 점수
  • total_sessions — int — NOT NULL — 총 세션 수
  • completed_sessions — int — NOT NULL — 완료 세션 수
  • abandoned_sessions — int — NOT NULL — 중단 세션 수
  • average_duration_seconds — int — 평균 학습 시간(초)
  • last_calculated_at — timestamp — 마지막 계산 시간
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

subscribe

  • id — bigint — Primary key — NOT NULL
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • trial_started_at — timestamp
  • trial_expires_at — timestamp
  • subscription_started_at — timestamp
  • subscription_expires_at — timestamp
  • cancelled_at — timestamp
  • auto_continue — boolean — NOT NULL
  • payment_method — varchar(50)
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

user_answer_history

  • id — bigint — Primary key — NOT NULL
  • subject_statistics_id (subject_statistics) — bigint — Foreign key → subject_statistics.id — NOT NULL
  • action — action_type — NOT NULL
  • old_answer — text
  • new_answer — text
  • changed_at — timestamp — NOT NULL
  • created_at — timestamp — NOT NULL
  • id (id2) — bigint — Foreign key → users.id — NOT NULL

user_statistics

  • id — bigint — Primary key — NOT NULL
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • subject_id — int — Foreign key → subject.id — NOT NULL
  • subject_explain — varchar(255)
  • total_attempted — int — NOT NULL
  • wrong_count — int — NOT NULL
  • correct_count — int — NOT NULL
  • accuracy_rate — decimal(5, 2)
  • last_studied_at — timestamp
  • jandi_at — timestamp — 연속 학습 시작
  • jandi_days — int — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

users

  • id — bigint — Primary key — NOT NULL
  • google_id — varchar(255)
  • email — varchar(255) — NOT NULL
  • password_hash — varchar(255)
  • username — varchar(255) — NOT NULL
  • nickname — varchar(255)
  • role — user_role — NOT NULL
  • last_login_at — timestamp
  • banned_at — timestamp
  • ban_expires_at — timestamp — 정지 해제 예정
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL
  • problem_delete_at — timestamp — 탈퇴/삭제
  • Field

wrong_answer_bookmark

  • id — bigint — Primary key — NOT NULL
  • users_id — bigint — Foreign key → users.id — NOT NULL
  • item_type — item_type_enum — NOT NULL
  • reference_id — bigint — NOT NULL
  • bookmarked_at — timestamp — NOT NULL
  • review_count — int — NOT NULL
  • last_reviewed_at — timestamp
  • notes — text
  • deleted_at — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL
  • id (id2) — bigint — Foreign key → subject_statistics.id — NOT NULL