cs-arena
Tables (11)
categories
- id — bigint — Primary key — NOT NULL
- parent_id — bigint — Foreign key → categories.id
- name — varchar
category_questions
- id — bigint — Primary key — NOT NULL
- category_id — bigint — Foreign key → categories.id — NOT NULL
- question_id — bigint — Foreign key → questions.id — NOT NULL
matches
- id — bigint — Primary key — NOT NULL
- player1_id — bigint — Foreign key → users.id — NOT NULL
- player2_id — bigint — Foreign key → users.id
- winner_id — bigint — Foreign key → users.id
- match_type — enum (multi, single)
questions
- id — bigint — Primary key — NOT NULL
- question_type — enum(multiple, short, essay)
- content — jsonb — NOT NULL
- correct_answer — text — NOT NULL — 모범답안
- difficulty — int
- model_name — varchar
- is_active — boolean
- quality_score — int
- usage_count — int
round_answers
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- round_id — bigint — Foreign key → rounds.idi — NOT NULL
- user_answer — text
- score — int
- answer_status — enum (correct, incorrect, partial)
- ai_feedback — text
- Field (grading_criteria) — jsonb
- Field (grading_details) — jsonb
rounds
- idi (id) — bigint — Primary key — NOT NULL
- match_id — bigint — Foreign key → matches.id — NOT NULL
- question_id — bigint — Foreign key → questions.id — NOT NULL
- round_number — int
- Field
tiers
- id — bigint — Primary key — NOT NULL
- name — varchar
- min_points — int
- max_points — int
- icon_url — varchar
user_problem_banks
- id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
- question_id — bigint — Foreign key → questions.id — NOT NULL
- match_id — bigint — Foreign key → matches.id — NOT NULL
- is_bookmarked — boolean
- user_answer — text
- answer_status — enum (correct, incorrect, partial)
- ai_feedback — text
user_statistics
- id — bigint — Primary key — NOT NULL
- win_count — int
- lose_count — int
- tier_point — int
- total_matches — int
- exp_point — int — 싱글플레이용(레벨로 변환 필요)
- user_id — bigint — Foreign key → users.id — NOT NULL
user_tier_histories (user_tier_hisotries)
- id — bigint — Primary key — NOT NULL
- tier_point — int
- updated_at — datetime
- tier_id — bigint — Foreign key → tiers.id — NOT NULL
- user_id — bigint — Foreign key → users.id — NOT NULL
users
- id — bigint — Primary key — NOT NULL
- email — varchar
- nickname — varchar — NOT NULL
- user_profile — text
- oauth_provider — enum
- oauth_id — varchar
- Field (created_at) — datetime