Coremate최종
테이블 (49)
개념 관련 공통 오해 (common_mistake)
- common_mistake_id — BIGINT — 기본 키 — NOT NULL
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id — NOT NULL
- mistake_title — VARCHAR(200) — NOT NULL
- mistake_text — TEXT — NOT NULL
- correction_text — TEXT — NOT NULL
- review_status — VARCHAR(20) — NOT NULL
- review_note — TEXT
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
개념관계 (concept_relation)
- relation_id — BIGINT — 기본 키 — NOT NULL
- source_concept_id — BIGINT — 외래 키 → 하위개념.concept_id — NOT NULL
- target_concept_id — BIGINT — 외래 키 → 하위개념.concept_id — NOT NULL
- relation_type — VARCHAR(30) — NOT NULL
- relation_note — TEXT
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
결제 로그 (payment_logs)
- payment_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- payment_type — VARCHAR(50) — NOT NULL
- target_type — VARCHAR(50) — NOT NULL
- target_id — BIGINT — NOT NULL
- payment_provider — VARCHAR(50)
- provider_transaction_id — VARCHAR(255)
- payment_status — VARCHAR(30) — NOT NULL
- paid_amount_krw — INT — NOT NULL
- paid_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
경험치 로그 (xp_logs)
- xp_log_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- reward_policy_id — BIGINT — 외래 키 → 보상 정책.reward_policy_id
- amount — INT — NOT NULL
- total_xp_after — INT — NOT NULL
- reason — VARCHAR(50) — NOT NULL
- reference_type — VARCHAR(50)
- reference_id — BIGINT
- created_at — TIMESTAMP — NOT NULL
과목명 (subject)
- subject_id — BIGINT — 기본 키 — NOT NULL
- subject_code — VARCHAR(50) — NOT NULL
- subject_name — VARCHAR(100) — NOT NULL
- subject_name_en — VARCHAR(100)
- sort_order — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
광고 리워드 로그 (ad_reward_logs)
- ad_reward_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- ad_provider — VARCHAR(50)
- ad_unit_id — VARCHAR(100)
- provider_transaction_id — VARCHAR(255)
- coin_amount — INT — NOT NULL
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id
- reward_status — VARCHAR(30) — NOT NULL
- rewarded_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
대분류 (category_lv1)
- category_lv1_id — BIGINT — 기본 키 — NOT NULL
- subject_id — BIGINT — 외래 키 → 과목명.subject_id — NOT NULL
- category_lv1_code — VARCHAR(50) — NOT NULL
- category_lv1_name — VARCHAR(100) — NOT NULL
- category_lv1_name_en — VARCHAR(100)
- description — TEXT
- sort_order — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
랜덤박스 마스터 (random_boxes)
- random_box_id — BIGINT — 기본 키 — NOT NULL
- box_name — VARCHAR(100) — NOT NULL
- box_grade — VARCHAR(20) — NOT NULL
- required_level — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
랜덤박스 보상 구성 (random_box_items)
- random_box_item_id — BIGINT — 기본 키 — NOT NULL
- random_box_id — BIGINT — 외래 키 → 랜덤박스 마스터.random_box_id — NOT NULL
- reward_type — VARCHAR(20) — NOT NULL
- item_id — BIGINT — 외래 키 → 아바타 아이템 마스터.item_id
- coin_amount — INT
- probability — DECIMAL(8,6) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
랜덤박스 오픈 로그 (random_box_open_logs)
- random_box_open_log_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- random_box_id — BIGINT — 외래 키 → 랜덤박스 마스터.random_box_id — NOT NULL
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id
- reward_type — VARCHAR(20) — NOT NULL
- reward_item_id — BIGINT — 외래 키 → 아바타 아이템 마스터.item_id
- reward_user_item_id — BIGINT — 외래 키 → 유저 보유 아이템.user_item_id
- reward_coin_amount — INT
- opened_at — TIMESTAMP — NOT NULL
문제 (question)
- question_id — BIGINT — 기본 키 — NOT NULL
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id — NOT NULL
- hint_common_mistake_id — BIGINT — 외래 키 → 개념 관련 공통 오해.common_mistake_id
- question_format — VARCHAR(30) — NOT NULL
- question_type — VARCHAR(30) — NOT NULL
- question_text — TEXT — NOT NULL
- choices_json — JSON
- correct_answer — VARCHAR(255) — NOT NULL
- explanation_text — TEXT — NOT NULL
- difficulty_level — SMALLINT — NOT NULL
- difficulty_source — VARCHAR(20) — NOT NULL
- expected_solve_sec — INT
- content_hash — CHAR(64)
- review_status — VARCHAR(20) — NOT NULL
- review_note — TEXT
- source_type — VARCHAR(20) — NOT NULL
- source_refs — JSON
- is_daily_quiz_eligible — BOOLEAN — NOT NULL
- is_mock_eligible — BOOLEAN — NOT NULL
- is_concept_practice_eligible — BOOLEAN — NOT NULL
- is_active — BOOLEAN — NOT NULL
- version_no — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- approved_at — TIMESTAMP
문제별 풀이 로그 (solve_logs)
- solve_log_id — BIGINT — 기본 키 — NOT NULL
- solve_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- question_id — BIGINT — 외래 키 → 문제.question_id — NOT NULL
- question_order — INT — NOT NULL
- selected_answer — VARCHAR(255)
- correct_answer_snapshot — VARCHAR(255) — NOT NULL
- is_correct — BOOLEAN — NOT NULL
- time_spent_sec — INT — NOT NULL
- expected_solve_sec_snapshot — INT
- hint_used — BOOLEAN — NOT NULL
- hint_count — INT — NOT NULL
- option_change_count — INT — NOT NULL
- is_answer_changed — BOOLEAN — NOT NULL
- is_bookmarked — BOOLEAN — NOT NULL
- solved_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
문제집 완료 상태 (user_problem_set_progress)
- user_problem_set_progress_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- problem_set_type — VARCHAR(30) — NOT NULL
- target_type — VARCHAR(30) — NOT NULL
- target_id — BIGINT — NOT NULL
- subject_id — BIGINT — 외래 키 → 과목명.subject_id
- category_lv1_id — BIGINT — 외래 키 → 대분류.category_lv1_id
- category_lv2_id — BIGINT — 외래 키 → 중분류.category_lv2_id
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id
- last_solve_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id
- is_completed — BOOLEAN — NOT NULL
- completed_count — INT — NOT NULL
- last_completed_at — TIMESTAMP
- updated_at — TIMESTAMP — NOT NULL
문제집 풀이 회차 (solve_sessions)
- solve_session_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- session_type — VARCHAR(30) — NOT NULL
- subject_id — BIGINT — 외래 키 → 과목명.subject_id
- category_lv1_id — BIGINT — 외래 키 → 대분류.category_lv1_id
- category_lv2_id — BIGINT — 외래 키 → 중분류.category_lv2_id
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id
- title — VARCHAR(200) — NOT NULL
- total_question_count — INT — NOT NULL
- correct_count — INT — NOT NULL
- wrong_count — INT — NOT NULL
- correct_rate — DECIMAL(5,2)
- total_time_spent_sec — INT — NOT NULL
- status — VARCHAR(20) — NOT NULL
- started_at — TIMESTAMP — NOT NULL
- completed_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
보상 로그 (reward_logs)
- reward_log_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- reward_policy_id — BIGINT — 외래 키 → 보상 정책.reward_policy_id
- reward_type — VARCHAR(50) — NOT NULL
- reward_source — VARCHAR(50) — NOT NULL
- source_id — BIGINT
- target_type — VARCHAR(50)
- target_id — BIGINT
- solve_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id
- xp_amount — INT — NOT NULL
- coin_amount — INT — NOT NULL
- item_id — BIGINT — 외래 키 → 아바타 아이템 마스터.item_id
- random_box_id — BIGINT — 외래 키 → 랜덤박스 마스터.random_box_id
- reward_status — VARCHAR(20) — NOT NULL
- skip_reason — VARCHAR(100)
- created_at — TIMESTAMP — NOT NULL
보상 정책 (reward_policies)
- reward_policy_id — BIGINT — 기본 키 — NOT NULL
- reward_type — VARCHAR(50) — NOT NULL
- reward_kind — VARCHAR(30) — NOT NULL
- coin_amount — INT — NOT NULL
- xp_amount — INT — NOT NULL
- daily_limit — INT
- monthly_limit — INT
- min_correct_rate — DECIMAL(5,2)
- first_reward_only — BOOLEAN — NOT NULL
- reward_scope — VARCHAR(30)
- description — TEXT
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
사용자 과목별 스탯 (user_subject_stats)
- user_subject_stat_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- subject_id — BIGINT — 외래 키 → 과목명.subject_id — NOT NULL
- solved_question_count — INT — NOT NULL
- correct_question_count — INT — NOT NULL
- wrong_question_count — INT — NOT NULL
- completed_concept_count — INT — NOT NULL
- completed_category_mock_count — INT — NOT NULL
- completed_subject_mock_count — INT — NOT NULL
- stat_score — INT — NOT NULL
- achievement_rate — DECIMAL(5,2) — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
사용자 구독 상태 (user_subscriptions)
- user_subscription_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- subscription_plan_id — BIGINT — 외래 키 → 프리미엄 구독 상품.subscription_plan_id — NOT NULL
- payment_id — BIGINT — 외래 키 → 결제 로그.payment_id
- status — VARCHAR(30) — NOT NULL
- started_at — TIMESTAMP — NOT NULL
- ended_at — TIMESTAMP
- next_daily_coin_at — TIMESTAMP
- auto_renew — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
사용자 약점 분석표 (weakness_analysis_reports)
- analysis_report_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- subject_id — BIGINT — 외래 키 → 과목명.subject_id — NOT NULL
- category_lv1_id — BIGINT — 외래 키 → 대분류.category_lv1_id
- category_lv2_id — BIGINT — 외래 키 → 중분류.category_lv2_id
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id
- analysis_scope_type — VARCHAR(30) — NOT NULL
- analysis_scope_name_snapshot — VARCHAR(200) — NOT NULL
- title — VARCHAR(200) — NOT NULL
- summary_text — TEXT
- analysis_text — TEXT
- report_format — VARCHAR(30) — NOT NULL
- viewer_content_type — VARCHAR(30)
- pdf_file_url — VARCHAR(500)
- pdf_storage_key — VARCHAR(500)
- selected_session_count — INT — NOT NULL
- total_question_count — INT — NOT NULL
- total_wrong_count — INT — NOT NULL
- total_long_time_count — INT — NOT NULL
- total_hint_used_count — INT — NOT NULL
- coin_cost — INT — NOT NULL
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id
- feature_product_id — BIGINT — 외래 키 → 유료 기능 상품/가격 정책.feature_product_id
- ai_model — VARCHAR(100)
- prompt_version — VARCHAR(50)
- view_count — INT — NOT NULL
- first_viewed_at — TIMESTAMP
- last_viewed_at — TIMESTAMP
- status — VARCHAR(20) — NOT NULL
- failed_reason — TEXT
- requested_at — TIMESTAMP — NOT NULL
- generated_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
사용자 월간 유료 기능 사용량 (user_monthly_feature_usage)
- monthly_feature_usage_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- feature_type — VARCHAR(50) — NOT NULL
- usage_month — CHAR(7) — NOT NULL
- usage_count — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
사용자 월간 재화 요약 (user_monthly_economy_summary)
- monthly_summary_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- summary_month — CHAR(7) — NOT NULL
- earned_coin_free — INT — NOT NULL
- earned_coin_ad — INT — NOT NULL
- earned_coin_premium — INT — NOT NULL
- earned_coin_paid — INT — NOT NULL
- spent_coin_total — INT — NOT NULL
- spent_coin_analysis_create — INT — NOT NULL
- spent_coin_shop — INT — NOT NULL
- analysis_create_count — INT — NOT NULL
- analysis_report_view_count — INT — NOT NULL
- ad_reward_count — INT — NOT NULL
- premium_daily_coin_count — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
사용자 유료 기능 생성권 (user_feature_accesses)
- user_feature_access_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- feature_product_id — BIGINT — 외래 키 → 유료 기능 상품/가격 정책.feature_product_id — NOT NULL
- feature_type — VARCHAR(50) — NOT NULL
- access_status — VARCHAR(20) — NOT NULL
- unlock_method — VARCHAR(30) — NOT NULL
- coin_cost — INT — NOT NULL
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id
- used_analysis_report_id — BIGINT — 외래 키 → 사용자 약점 분석표.analysis_report_id
- granted_at — TIMESTAMP — NOT NULL
- used_at — TIMESTAMP
- expires_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
상점 구매 로그 (shop_purchase_logs)
- shop_purchase_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- shop_product_id — BIGINT — 외래 키 → 상점 상품.shop_product_id — NOT NULL
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id
- purchased_at — TIMESTAMP — NOT NULL
상점 상품 (shop_products)
- shop_product_id — BIGINT — 기본 키 — NOT NULL
- product_type — VARCHAR(50) — NOT NULL
- item_id — BIGINT — 외래 키 → 아바타 아이템 마스터.item_id
- random_box_id — BIGINT — 외래 키 → 랜덤박스 마스터.random_box_id
- product_name — VARCHAR(100) — NOT NULL
- price_coin — INT — NOT NULL
- required_level — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
아바타 아이템 마스터 (avatar_items)
- item_id — BIGINT — 기본 키 — NOT NULL
- item_name — VARCHAR(100) — NOT NULL
- item_type — VARCHAR(50) — NOT NULL
- slot — VARCHAR(50)
- rarity — VARCHAR(20) — NOT NULL
- image_url — VARCHAR(255) — NOT NULL
- description — TEXT
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
약점 개념 분석 결과 (weakness_analysis_concepts)
- analysis_concept_id — BIGINT — 기본 키 — NOT NULL
- analysis_report_id — BIGINT — 외래 키 → 사용자 약점 분석표.analysis_report_id — NOT NULL
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id — NOT NULL
- weakness_level — SMALLINT
- sort_order — INT — NOT NULL
- weakness_reason — TEXT — NOT NULL
- evidence_summary — TEXT
- detailed_explanation_text — TEXT — NOT NULL
- recommendation_text — TEXT
- created_at — TIMESTAMP — NOT NULL
약점 분석 근거 로그 (weakness_analysis_evidence_logs)
- evidence_id — BIGINT — 기본 키 — NOT NULL
- analysis_report_id — BIGINT — 외래 키 → 사용자 약점 분석표.analysis_report_id — NOT NULL
- analysis_concept_id — BIGINT — 외래 키 → 약점 개념 분석 결과.analysis_concept_id
- solve_log_id — BIGINT — 외래 키 → 문제별 풀이 로그.solve_log_id — NOT NULL
- evidence_type — VARCHAR(30) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
약점 분석 대상 문제집 (weakness_analysis_sessions)
- analysis_report_session_id — BIGINT — 기본 키 — NOT NULL
- analysis_report_id — BIGINT — 외래 키 → 사용자 약점 분석표.analysis_report_id — NOT NULL
- solve_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id — NOT NULL
- selected_order — INT
- solve_session_title_snapshot — VARCHAR(200)
- wrong_count_snapshot — INT
- created_at — TIMESTAMP — NOT NULL
약점 분석표 조회 로그 (weakness_analysis_report_view_logs)
- report_view_log_id — BIGINT — 기본 키 — NOT NULL
- analysis_report_id — BIGINT — 외래 키 → 사용자 약점 분석표.analysis_report_id — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- view_type — VARCHAR(30) — NOT NULL
- viewed_at — TIMESTAMP — NOT NULL
오늘의 CS 퀴즈 문제 구성 (daily_quiz_sets)
- daily_quiz_set_id — BIGINT — 기본 키 — NOT NULL
- quiz_date — DATE — NOT NULL
- question_id — BIGINT — 외래 키 → 문제.question_id — NOT NULL
- subject_id — BIGINT — 외래 키 → 과목명.subject_id — NOT NULL
- sort_order — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
유료 기능 사용 시도 로그 (feature_access_logs)
- feature_access_log_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- feature_product_id — BIGINT — 외래 키 → 유료 기능 상품/가격 정책.feature_product_id
- feature_type — VARCHAR(50) — NOT NULL
- access_result — VARCHAR(30) — NOT NULL
- access_method — VARCHAR(30) — NOT NULL
- requested_session_count — INT
- created_analysis_report_id — BIGINT — 외래 키 → 사용자 약점 분석표.analysis_report_id
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id
- failure_reason — TEXT
- accessed_at — TIMESTAMP — NOT NULL
유료 기능 상품/가격 정책 (feature_access_products)
- feature_product_id — BIGINT — 기본 키 — NOT NULL
- feature_type — VARCHAR(50) — NOT NULL
- target_type — VARCHAR(50) — NOT NULL
- product_name — VARCHAR(100) — NOT NULL
- price_coin — INT — NOT NULL
- premium_price_coin — INT
- access_policy — VARCHAR(30) — NOT NULL
- free_user_monthly_limit — INT
- premium_monthly_limit — INT
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
유저 (users)
- user_id — BIGINT — 기본 키 — NOT NULL
- email — VARCHAR(255)
- password_hash — VARCHAR(255)
- nickname — VARCHAR(50) — NOT NULL
- role — VARCHAR(20) — NOT NULL
- level — INT — NOT NULL
- total_xp — INT — NOT NULL
- school_name — VARCHAR(100)
- school_email — VARCHAR(255)
- school_verified — BOOLEAN — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- last_login_at — TIMESTAMP
유저 보유 아이템 (user_items)
- user_item_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- item_id — BIGINT — 외래 키 → 아바타 아이템 마스터.item_id — NOT NULL
- quantity — INT — NOT NULL
- acquired_source — VARCHAR(50) — NOT NULL
- source_id — BIGINT
- acquired_at — TIMESTAMP — NOT NULL
유저 아바타 기본 프로필 (user_avatar_profiles)
- user_avatar_profile_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- avatar_gender — VARCHAR(20)
- base_avatar_type — VARCHAR(50)
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
유저 아바타 장착 아이템 (user_avatar_equipped_items)
- equipped_item_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- slot — VARCHAR(50) — NOT NULL
- user_item_id — BIGINT — 외래 키 → 유저 보유 아이템.user_item_id — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
유저 재화 (user_currency)
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- coin — INT — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
일일 보상 제한 (daily_reward_limits)
- daily_reward_limit_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- reward_date — DATE — NOT NULL
- reward_type — VARCHAR(50) — NOT NULL
- reward_count — INT — NOT NULL
- daily_limit — INT
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
재화 로그 (currency_logs)
- currency_log_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- amount — INT — NOT NULL
- balance_after — INT — NOT NULL
- transaction_type — VARCHAR(20) — NOT NULL
- reason — VARCHAR(50) — NOT NULL
- reference_type — VARCHAR(50)
- reference_id — BIGINT
- created_at — TIMESTAMP — NOT NULL
중분류 (category_lv2)
- category_lv2_id — BIGINT — 기본 키 — NOT NULL
- category_lv1_id — BIGINT — 외래 키 → 대분류.category_lv1_id — NOT NULL
- category_lv2_code — VARCHAR(50) — NOT NULL
- category_lv2_name — VARCHAR(100) — NOT NULL
- category_lv2_name_en — VARCHAR(100)
- description — TEXT
- sort_order — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
즐겨찾기 (bookmarks)
- bookmark_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- question_id — BIGINT — 외래 키 → 문제.question_id — NOT NULL
- source_solve_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id
- memo — TEXT
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
출석 (attendance)
- attendance_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- attendance_date — DATE — NOT NULL
- daily_quiz_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id
- reward_claimed — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
친구 관계 (friends)
- friend_id — BIGINT — 기본 키 — NOT NULL
- requester_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- receiver_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- user_low_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- user_high_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- accepted_at — TIMESTAMP
친구 콕 찌르기 (friend_pokes)
- poke_id — BIGINT — 기본 키 — NOT NULL
- from_user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- to_user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- message_type — VARCHAR(50) — NOT NULL
- is_read — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- read_at — TIMESTAMP
코인 패키지 상품 (coin_package_products)
- coin_package_id — BIGINT — 기본 키 — NOT NULL
- package_name — VARCHAR(100) — NOT NULL
- coin_amount — INT — NOT NULL
- bonus_coin_amount — INT — NOT NULL
- price_krw — INT — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
프리미엄 구독 상품 (subscription_plans)
- subscription_plan_id — BIGINT — 기본 키 — NOT NULL
- plan_code — VARCHAR(50) — NOT NULL
- plan_name — VARCHAR(100) — NOT NULL
- price_krw — INT — NOT NULL
- daily_coin_amount — INT — NOT NULL
- monthly_bonus_coin — INT — NOT NULL
- analysis_discount_rate — DECIMAL(5,2) — NOT NULL
- monthly_free_analysis_count — INT — NOT NULL
- description — TEXT
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
프리미엄 일일 코인 지급 로그 (subscription_daily_coin_logs)
- subscription_daily_coin_log_id — BIGINT — 기본 키 — NOT NULL
- user_subscription_id — BIGINT — 외래 키 → 사용자 구독 상태.user_subscription_id — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- reward_date — DATE — NOT NULL
- coin_amount — INT — NOT NULL
- currency_log_id — BIGINT — 외래 키 → 재화 로그.currency_log_id — NOT NULL
- claimed_at — TIMESTAMP — NOT NULL
하위 개념 완료 상태 (user_concept_progress)
- user_concept_progress_id — BIGINT — 기본 키 — NOT NULL
- user_id — BIGINT — 외래 키 → 유저.user_id — NOT NULL
- concept_id — BIGINT — 외래 키 → 하위개념.concept_id — NOT NULL
- is_completed — BOOLEAN — NOT NULL
- completed_solve_session_id — BIGINT — 외래 키 → 문제집 풀이 회차.solve_session_id
- completed_at — TIMESTAMP
- updated_at — TIMESTAMP — NOT NULL
하위개념 (concept)
- concept_id — BIGINT — 기본 키 — NOT NULL
- concept_code — VARCHAR(100) — NOT NULL
- category_lv2_id — BIGINT — 외래 키 → 중분류.category_lv2_id — NOT NULL
- concept_name — VARCHAR(150) — NOT NULL
- concept_name_en — VARCHAR(150)
- aliases_json — JSON
- one_line_definition — TEXT — NOT NULL
- core_summary — TEXT — NOT NULL
- core_keywords_json — JSON — NOT NULL
- key_properties_json — JSON — NOT NULL
- source_refs — JSON
- sort_order — INT — NOT NULL
- review_status — VARCHAR(20) — NOT NULL
- review_note — TEXT
- is_active — BOOLEAN — NOT NULL
- version_no — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- approved_at — TIMESTAMP