aaa
Tables (22)
course_bookmarks
- course_bookmark_id — BIGINT
- course_id — BIGINT — Foreign key → courses.course_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
course_likes
- course_like_id — BIGINT
- course_id — BIGINT — Foreign key → courses.course_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- is_liked — BOOLEAN — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
course_review_course_types
- course_review_course_type_id — BIGINT
- course_review_id — BIGINT — Foreign key → course_reviews.course_review_id — NOT NULL
- course_type — course_type — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
course_reviews
- course_review_id — BIGINT
- course_id — BIGINT — Foreign key → courses.course_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- rating — SMALLINT — NOT NULL
- submitted_difficulty — course_difficulty
- comment — TEXT — EX
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
course_submission_requests
- course_submission_request_id — BIGINT
- requester_user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- running_session_id — BIGINT — Foreign key → running_sessions.running_session_id — NOT NULL
- linked_course_id — BIGINT — Foreign key → courses.course_id
- proposed_title — VARCHAR(120) — NOT NULL
- proposed_difficulty — course_difficulty — NOT NULL
- snapshot_image_url — TEXT
- slope_heatmap_url — TEXT
- review_status — VARCHAR(16) — NOT NULL
- rejection_reason — TEXT
- requested_at — TIMESTAMPTZ — NOT NULL
- reviewed_at — TIMESTAMPTZ
- rejected) — AND — NOT NULL
course_surface_maps
- course_surface_map_id — BIGINT
- course_id — BIGINT — Foreign key → courses.course_id — NOT NULL
- surface_type — surface_type — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
course_type_maps
- course_type_map_id — BIGINT
- course_id — BIGINT — Foreign key → courses.course_id — NOT NULL
- course_type — course_type — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
courses
- course_id — BIGINT
- created_by_user_id — BIGINT — Foreign key → users.user_id
- title — VARCHAR(120) — NOT NULL
- description — TEXT
- status — course_status — NOT NULL
- difficulty — course_difficulty — NOT NULL
- distance_m — INTEGER — NOT NULL
- elevation_gain_m — INTEGER — NOT NULL
- estimated_duration_sec — INTEGER
- route_start_lat — NUMERIC(9, 6) — NOT NULL
- route_start_lng — NUMERIC(9, 6) — NOT NULL
- route_end_lat — NUMERIC(9, 6)
- route_end_lng — NUMERIC(9, 6)
- snapshot_image_url — TEXT
- slope_heatmap_url — TEXT
- is_deleted — BOOLEAN — NOT NULL
- promoted_at — TIMESTAMPTZ
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
device_sync_states
- device_sync_state_id — BIGINT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- device_type — VARCHAR(16) — NOT NULL
- device_identifier — VARCHAR(128) — NOT NULL
- last_synced_sampled_at — TIMESTAMPTZ
- last_synced_running_session_id — BIGINT — Foreign key → running_sessions.running_session_id
- sync_token — VARCHAR(128)
- sync_status — VARCHAR(16) — NOT NULL
- last_error_message — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
ghost_running_results
- ghost_running_result_id — BIGINT
- running_session_id — BIGINT — Foreign key → running_sessions.running_session_id — NOT NULL
- ghost_target_running_session_id — BIGINT — Foreign key → running_sessions.running_session_id — NOT NULL
- target_user_id — BIGINT — Foreign key → users.user_id
- result_status — VARCHAR(16) — NOT NULL
- time_gap_sec — INTEGER — NOT NULL
- distance_gap_m — INTEGER — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
running_gps_samples
- running_gps_sample_id — BIGINT
- running_session_id — BIGINT — Foreign key → running_sessions.running_session_id — NOT NULL
- sampled_at — TIMESTAMPTZ — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- latitude — NUMERIC(9, 6) — NOT NULL
- longitude — NUMERIC(9, 6) — NOT NULL
- altitude_m — NUMERIC(7, 2)
- accuracy_m — NUMERIC(6, 2)
- heading_deg — NUMERIC(6, 2)
running_samples
- running_sample_id — BIGINT
- running_session_id — BIGINT — Foreign key → running_sessions.running_session_id — NOT NULL
- sampled_at — TIMESTAMPTZ — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- heart_rate — SMALLINT
- speed_mps — NUMERIC(6, 3)
- pace_sec_per_km — INTEGER
- distance_m — INTEGER
- calories_kcal — NUMERIC(8, 2)
- altitude_m — NUMERIC(7, 2)
- cadence_spm — SMALLINT
- source_device — VARCHAR(32) — NOT NULL
running_session_splits
- running_session_split_id — BIGINT
- running_session_id — BIGINT — Foreign key → running_sessions.running_session_id — NOT NULL
- split_index — INTEGER — NOT NULL
- split_distance_m — INTEGER — NOT NULL
- split_duration_sec — INTEGER — NOT NULL
- split_pace_sec_per_km — INTEGER — NOT NULL
- avg_heart_rate — SMALLINT
- elevation_gain_m — INTEGER — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
running_sessions
- running_session_id — BIGINT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- course_id — BIGINT — Foreign key → courses.course_id
- mode — running_mode — NOT NULL
- ghost_target_running_session_id — BIGINT — Foreign key → running_sessions.running_session_id
- started_at — TIMESTAMPTZ — NOT NULL
- ended_at — TIMESTAMPTZ
- duration_sec — INTEGER
- distance_m — INTEGER — NOT NULL
- avg_speed_mps — NUMERIC(6, 3)
- avg_pace_sec_per_km — INTEGER
- calories_kcal — INTEGER — NOT NULL
- elevation_gain_m — INTEGER — NOT NULL
- is_public — BOOLEAN — NOT NULL
- is_completed — BOOLEAN — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
user_auth_accounts
- user_auth_account_id — BIGINT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- provider — auth_provider — NOT NULL
- provider_user_id — VARCHAR(191) — NOT NULL
- email — VARCHAR(255)
- profile_image_url — TEXT
- linked_at — TIMESTAMPTZ — NOT NULL
- last_login_at — TIMESTAMPTZ
user_calendars
- user_calendar_id — BIGINT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- calendar_date — DATE — NOT NULL
- total_distance_m — INTEGER — NOT NULL
- total_duration_sec — INTEGER — NOT NULL
- total_calories_kcal — INTEGER — NOT NULL
- course_run_count — INTEGER — NOT NULL
- free_run_count — INTEGER — NOT NULL
- ghost_run_count — INTEGER — NOT NULL
- representative_snapshot_url — TEXT
- updated_at — TIMESTAMPTZ — NOT NULL
user_preference_course_types
- user_preference_course_type_id — BIGINT
- user_id — BIGINT — Foreign key → user_running_preferences.user_id — NOT NULL
- course_type — course_type — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
user_preference_purposes
- user_preference_purpose_id — BIGINT
- user_id — BIGINT — Foreign key → user_running_preferences.user_id — NOT NULL
- purpose — purpose — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
user_preference_surfaces
- user_preference_surface_id — BIGINT
- user_id — BIGINT — Foreign key → user_running_preferences.user_id — NOT NULL
- surface_type — surface_type — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
user_preference_time_slots
- user_preference_time_slot_id — BIGINT
- user_id — BIGINT — Foreign key → user_running_preferences.user_id — NOT NULL
- time_slot — time_slot — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
user_running_preferences
- user_id — BIGINT — Foreign key → users.user_id
- preferred_difficulty — course_difficulty — NOT NULL
- preferred_distance_km — NUMERIC(5, 2) — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
users
- user_id — BIGINT
- nickname — VARCHAR(40) — NOT NULL
- birth_date — DATE — NOT NULL
- gender — gender — NOT NULL
- height_cm — NUMERIC(5, 2) — NOT NULL
- weight_kg — NUMERIC(5, 2) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL