interview-fit
Tables (17)
ai_conversations
- id — BIGINT — Primary key — NOT NULL
- battle_id — BIGINT — Foreign key → battles.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- role — VARCHAR(10) — NOT NULL — ai | user
- message — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
analysis_session_points
- id — BIGINT — Primary key — NOT NULL
- analysis_id — BIGINT — Foreign key → battle_analyses.id — NOT NULL
- time_sec — SMALLINT — NOT NULL — 배틀 시작부터 경과 시간(초)
- silence_pct — TINYINT — NOT NULL — 해당 구간 침묵 비율 0–100
- logic_score — TINYINT — NOT NULL — 논리성 점수 0–100
analysis_stagnant_zones
- id — BIGINT — Primary key — NOT NULL
- analysis_id — BIGINT — Foreign key → battle_analyses.id — NOT NULL
- zone_no — TINYINT — NOT NULL
- start_sec — SMALLINT — NOT NULL
- end_sec — SMALLINT — NOT NULL
- silence_peak — TINYINT — NOT NULL
- logic_dip — TINYINT — NOT NULL
- cause — TEXT — AI가 분석한 원인
battle_analyses
- id — BIGINT — Primary key — NOT NULL
- battle_id — BIGINT — Foreign key → battles.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- avg_silence_sec — SMALLINT — NOT NULL — 평균 침묵 시간(초)
- peak_silence_sec — SMALLINT — NOT NULL — 최대 침묵 시간(초)
- avg_logic_score — TINYINT — NOT NULL — 평균 논리성 점수 0–100
- min_logic_score — TINYINT — NOT NULL
- stagnant_count — TINYINT — NOT NULL — 정체 구간 수
- created_at — DATETIME — NOT NULL
battles
- id — BIGINT — Primary key — NOT NULL
- problem_id — BIGINT — Foreign key → problems.id — NOT NULL
- player1_id — BIGINT — Foreign key → users.id — NOT NULL
- player2_id — BIGINT — Foreign key → users.id — NOT NULL
- difficulty — VARCHAR(10) — NOT NULL
- topic — VARCHAR(30)
- status — VARCHAR(20) — NOT NULL — waiting | in_progress | finished | abandoned
- winner_id — BIGINT — Foreign key → users.id — NULL = 진행 중 또는 무승부
- started_at — DATETIME
- finished_at — DATETIME
- time_limit_sec — SMALLINT — NOT NULL
- created_at — DATETIME — NOT NULL
matchmaking_queue
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- difficulty — VARCHAR(10) — NOT NULL — easy | medium | hard
- topic — VARCHAR(30) — NULL = 전체
- joined_at — DATETIME — NOT NULL
- status — VARCHAR(20) — NOT NULL — waiting | matched | cancelled
oauth_accounts
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- provider — VARCHAR(20) — NOT NULL — github | google
- provider_uid — VARCHAR(255) — NOT NULL — 외부 provider 고유 ID
- access_token — TEXT
- refresh_token — TEXT
- token_expires_at — DATETIME
- created_at — DATETIME — NOT NULL
problem_examples
- id — BIGINT — Primary key — NOT NULL
- problem_id — BIGINT — Foreign key → problems.id — NOT NULL
- example_no — TINYINT — NOT NULL
- input_data — TEXT
- output_data — TEXT — NOT NULL
- explanation — TEXT
problem_tags
- problem_id — BIGINT — Foreign key → problems.id — NOT NULL
- tag_id — INT — Foreign key → tags.id — NOT NULL
problems
- id — BIGINT — Primary key — NOT NULL
- title — VARCHAR(200) — NOT NULL
- description — TEXT — NOT NULL
- constraints — TEXT — 시간·공간 복잡도 조건 등
- difficulty — VARCHAR(10) — NOT NULL — easy | medium | hard
- difficulty_score — TINYINT — NOT NULL — 1–5 시각 점수
- time_limit_sec — SMALLINT — NOT NULL — 제한 시간(초)
- created_at — DATETIME — NOT NULL
rating_history
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- battle_id — BIGINT — 원인 배틀 (NULL = 초기 설정)
- rating_before — INT — NOT NULL
- rating_after — INT — NOT NULL
- delta — INT — NOT NULL — 양수=획득, 음수=손실
- recorded_at — DATETIME — NOT NULL
stagnant_zone_guides
- id — BIGINT — Primary key — NOT NULL
- zone_id — BIGINT — Foreign key → analysis_stagnant_zones.id — NOT NULL
- title — VARCHAR(100) — NOT NULL
- description — TEXT — NOT NULL
submissions
- id — BIGINT — Primary key — NOT NULL
- battle_id — BIGINT — Foreign key → battles.id — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- language — VARCHAR(20) — NOT NULL — Python | JavaScript | Java | C++
- source_code — LONGTEXT — NOT NULL
- is_final — BOOLEAN — NOT NULL — TRUE = 최종 제출
- tests_passed — TINYINT — NOT NULL
- tests_total — TINYINT — NOT NULL
- progress_pct — TINYINT — NOT NULL — 0–100 진행률
- verdict — VARCHAR(20) — AC | WA | TLE | RE | CE | NULL(미채점)
- submitted_at — DATETIME — NOT NULL
tags
- id — INT — Primary key — NOT NULL
- name — VARCHAR(30) — NOT NULL — DP | 그래프 | 문자열 | 정렬 | BFS/DFS | 이진탐색 | 그리디 등
test_cases
- id — BIGINT — Primary key — NOT NULL
- problem_id — BIGINT — Foreign key → problems.id — NOT NULL
- is_sample — BOOLEAN — NOT NULL — TRUE = 예제, FALSE = 숨김 채점용
- input_data — TEXT
- expected — TEXT — NOT NULL
user_stats
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- rating — INT — NOT NULL
- badge — VARCHAR(20) — NOT NULL — Bronze | Silver | Gold | Platinum | Diamond
- wins — INT — NOT NULL
- losses — INT — NOT NULL
- draws — INT — NOT NULL
- updated_at — DATETIME — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255) — OAuth 전용 계정은 NULL
- nickname — VARCHAR(50) — NOT NULL
- profile_img — VARCHAR(500)
- preferred_lang — VARCHAR(20) — NOT NULL — Python | JavaScript | Java | C++
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL