58
Tables (7)
code_programming
- id — BIGSERIAL
- subject_id — INTEGER — Foreign key → subject.id
- question — TEXT — NOT NULL
- subjective_answer — TEXT
- language — TEXT
- difficulty — difficulty_type
- 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) — NOT NULL
- currency_type — currency_type_enum — NOT NULL
- last_earned_at — TIMESTAMPTZ
- last_spent_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- UNIQUE(user_id, — currency_type)
problem
- id — BIGSERIAL
- subject_id — INTEGER — Foreign key → subject.id — NOT NULL
- question_type — question_type_enum — NOT NULL
- difficulty — difficulty_type
- question — TEXT — NOT NULL
- subjective_answer — TEXT
- 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 — session_status_type — NOT NULL
- type — session_type — 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 — subscribe_status_type — 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
users
- id — BIGSERIAL
- google_id — TEXT
- email — TEXT — NOT NULL
- password_hash — TEXT — 비밀번호
- username — TEXT — NOT NULL
- nickname — TEXT
- role — user_role_type — NOT NULL — 사용자
- status — user_status_type — NOT NULL — 계정
- last_login_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ — 소프트