OMT_AI + APP_SERVER +
Tables (19)
ai_daily_summary
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- summary_date — DATE — NOT NULL
- summary_text — TEXT — NOT NULL
- score_adherence — TINYINT
- score_fatigue — TINYINT
- score_mood — TINYINT
- source_run_id — BIGINT — Foreign key → ai_run_log.id — NOT NULL
- created_at — DATETIME — NOT NULL
ai_feedback
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- run_id — BIGINT — Foreign key → ai_run_log.id — NOT NULL
- target_type — ENUM('REPLY', 'MISSION', 'SUMMARY', 'REPORT') — NOT NULL
- rating — TINYINT — NOT NULL
- comment — VARCHAR(255)
- created_at — DATETIME — NOT NULL
ai_mission_suggestion
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- mission_date — DATE — NOT NULL
- mission_id — BIGINT — Foreign key → mission.id
- suggestion_text — TEXT — NOT NULL
- difficulty — ENUM('EASY', 'NORMAL', 'HARD')
- estimated_minutes — INT
- estimated_calories — INT
- source_run_id — BIGINT — Foreign key → ai_run_log.id — NOT NULL
- selected — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
ai_run_log
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- chat_session_id — BIGINT — Foreign key → chat_session.id
- run_type — ENUM('ONBOARDING', 'DAILY_MISSION', 'REVIEW', 'ANALYSIS', 'OTHER') — NOT NULL
- input_payload — LONGTEXT — NOT NULL
- output_payload — LONGTEXT
- model_name — VARCHAR(100) — NOT NULL
- prompt_tokens — INT
- completion_tokens — INT
- latency_ms — INT
- status — ENUM('SUCCESS', 'ERROR', 'TIMEOUT') — NOT NULL
- error_message — TEXT
- created_at — DATETIME — NOT NULL
ai_state_snapshot
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- chat_session_id — BIGINT — Foreign key → chat_session.id
- graph_name — VARCHAR(100) — NOT NULL
- state_json — LONGTEXT — NOT NULL
- created_at — DATETIME — NOT NULL
ai_user_profile_cache
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- profile_json — LONGTEXT — NOT NULL
- updated_at — DATETIME — NOT NULL
ai_weekly_report
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- week_start_date — DATE — NOT NULL
- week_end_date — DATE — NOT NULL
- report_text — TEXT — NOT NULL
- metrics_json — TEXT
- source_run_id — BIGINT — Foreign key → ai_run_log.id — NOT NULL
- created_at — DATETIME — NOT NULL
chat_message
- id — BIGINT — Primary key — NOT NULL
- session_id — BIGINT — Foreign key → chat_session.id — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- sender — ENUM('USER', 'BOT') — NOT NULL
- message — TEXT — NOT NULL
- created_at — DATETIME — NOT NULL
chat_session
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- started_at — DATETIME — NOT NULL
- ended_at — DATETIME
daily_mission_result
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- daily_recommended_mission_id — BIGINT — Foreign key → daily_recommended_mission.id
- mission_date — DATE — NOT NULL
- result — ENUM('SUCCESS', 'FAILURE') — NOT NULL
- failure_reason — VARCHAR(255)
- created_at — DATETIME — NOT NULL
daily_recommended_mission
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- mission_id — BIGINT — Foreign key → mission.id — NOT NULL
- mission_date — DATE — NOT NULL
- selected — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
mission
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- type — ENUM('EXERCISE', 'DIET') — NOT NULL
- difficulty — ENUM('EASY', 'NORMAL', 'HARD') — NOT NULL
- estimated_minutes — INT — NOT NULL
- estimated_calories — INT — NOT NULL
- created_at — DATETIME — NOT NULL
terms
- id — BIGINT — Primary key — NOT NULL
- type — ENUM('SERVICE', 'PRIVACY', 'MARKETING') — NOT NULL
- version — VARCHAR(20) — NOT NULL
- content — TEXT — NOT NULL
- required — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
user
- user_id — BIGINT — Primary key — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
- deleted_at — DATETIME
user_character
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- level — INT — NOT NULL
- total_active_days — INT — NOT NULL
- updated_at — DATETIME — NOT NULL
user_notification_setting
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- remind_enabled — BOOLEAN — NOT NULL
- checkin_enabled — BOOLEAN — NOT NULL
- review_enabled — BOOLEAN — NOT NULL
- updated_at — DATETIME — NOT NULL
user_onboarding
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- app_goal_text — VARCHAR(255) — NOT NULL
- work_time_type — ENUM('FIXED', 'SHIFT', 'FREE') — NOT NULL
- available_start_time — TIME — NOT NULL
- available_end_time — TIME — NOT NULL
- min_exercise_minutes — INT — NOT NULL
- preferred_exercise_text — VARCHAR(255) — NOT NULL
- lifestyle_type — ENUM('MORNING', 'NIGHT', 'IRREGULAR') — NOT NULL
- updated_at — DATETIME — NOT NULL
user_social_account
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- provider — ENUM('KAKAO', 'GOOGLE', 'APPLE') — NOT NULL
- provider_user_id — VARCHAR(100) — NOT NULL
- created_at — DATETIME — NOT NULL
user_terms_agreement
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- terms_id — BIGINT — Foreign key → terms.id — NOT NULL
- agreed_at — DATETIME — NOT NULL