55

Tables (9)

code_programming

  • id — bigserial
  • subject_id — integer — Foreign key → subject.id
  • question — text — NOT NULL
  • subjective_answer — text — NOT NULL
  • language — text
  • difficulty — text
  • explanation — text
  • points — integer — NOT NULL
  • is_active — boolean — NOT NULL
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

money_user_have

  • id — bigserial
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • money — numeric(19,4)
  • currency_type — text — NOT NULL
  • last_earned_at — timestamptz
  • last_spent_at — timestamptz
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

problem

  • id — bigserial
  • subject_id — integer — Foreign key → subject.id — NOT NULL
  • question_type — text — NOT NULL
  • difficulty — text
  • question — text — NOT NULL
  • subjective_answer — text — NOT NULL
  • option1 — text
  • option2 — text
  • option3 — text
  • option4 — text
  • option5 — text
  • correct_option — integer — 정답
  • explanation — text — 문제
  • points — integer — NOT NULL
  • is_active — boolean — NOT NULL
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

study_session

  • id — bigserial
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • subject_id — integer — Foreign key → subject.id — NOT NULL
  • status — text — NOT NULL
  • type — text — NOT NULL
  • started_at — timestamptz — NOT NULL
  • ended_at — timestamptz
  • duration_seconds — integer
  • total_questions — integer — NOT NULL
  • correct_count — integer — NOT NULL
  • score — numeric(5,2) — 점수
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

subject

  • id — serial
  • code — text — NOT NULL
  • name — text — NOT NULL
  • description — text
  • parent_id — integer — Foreign key → subject.id — 상위
  • sort_order — integer — NOT NULL
  • is_active — boolean — NOT NULL
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

subscribe

  • id — bigserial
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • status — text — NOT NULL
  • trial_started_at — timestamptz
  • trial_expires_at — timestamptz
  • subscription_started_at — timestamptz
  • subscription_expires_at — timestamptz — 구독
  • auto_renew — boolean — NOT NULL
  • payment_method — text
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

user_statistics

  • id — bigserial
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • subject_id — integer — Foreign key → subject.id — NOT NULL
  • branch — text
  • total_attempted — integer — NOT NULL
  • wrong_count — integer — NOT NULL
  • correct_count — integer — NOT NULL
  • accuracy_rate — numeric(5,2)
  • last_studied_at — timestamptz
  • streak_days — integer — NOT NULL — 연속
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL

users

  • id — bigserial
  • google_id — text
  • email — text — NOT NULL — 사용자
  • password_hash — text — 비밀번호
  • username — text — NOT NULL
  • nickname — text
  • role — text — NOT NULL — 사용자
  • status — text — NOT NULL — 계정
  • last_login_at — timestamptz
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL
  • deleted_at — timestamptz — 소프트

wrong_answer_bookmark

  • id — bigserial
  • user_id — bigint — Foreign key → users.id — NOT NULL
  • item_type — text — NOT NULL
  • reference_id — bigint — NOT NULL
  • bookmarked_at — timestamptz — NOT NULL
  • review_count — integer — NOT NULL — 복습
  • last_reviewed_at — timestamptz
  • notes — text — 사용자
  • created_at — timestamptz — NOT NULL
  • updated_at — timestamptz — NOT NULL