earth
Tables (12)
crew_battles
- id — BIGINT
- challenger_crew_id — bigint — Foreign key → crews.id — NOT NULL — 도전하는
- challenged_crew_id — bigint — Foreign key → crews.id — NOT NULL — 도전받는
- target_distance — decimal(6,2) — NOT NULL — 목표
- time_limit_hours — int — NOT NULL — 제한
- max_participants — int — NOT NULL — 최대
- message — text — 대결
- status — varchar(20) — 대결
- winner_crew_id — bigint — Foreign key → crews.id — 승리한
- challenger_distance — decimal(6,2) — 도전
- challenged_distance — decimal(6,2) — 피도전
- mvp_user_id — bigint — Foreign key → users.id — MVP
- started_at — timestamp — 대결
- ended_at — timestamp — 대결
- created_at — timestamp — 대결
crew_chats
- id — BIGINT
- crew_id — bigint — Foreign key → crews.id — NOT NULL — 채팅이
- user_id — bigint — Foreign key → users.id — 메시지
- message — text — NOT NULL — 메시지
- message_type — varchar(20) — 메시지
- emoji_type — varchar(10) — 이모지
- created_at — timestamp — 메시지
crew_join_requests
- id — BIGINT
- crew_id — bigint — Foreign key → crews.id — NOT NULL — 가입
- user_id — bigint — Foreign key → users.id — NOT NULL — 가입
- introduction — text — 가입
- status — varchar(20) — 처리
- processed_by — bigint — Foreign key → users.id — 신청을
- processed_at — timestamp — 신청
- created_at — timestamp — 신청
crew_members
- id — BIGINT
- crew_id — bigint — Foreign key → crews.id — NOT NULL — 소속
- user_id — bigint — Foreign key → users.id — NOT NULL — 멤버
- role — varchar(20) — 역할:
- monthly_distance — decimal(6,2) — 이번
- crew_rank — int — 크루
- joined_at — timestamp — 크루
crews
- id — BIGINT
- name — varchar(100) — NOT NULL — 크루명
- description — text — 크루
- profile_image_url — text — 크루
- max_members — int — NOT NULL — 최대
- current_members — int — 현재
- owner_id — bigint — Foreign key → users.id — NOT NULL — 크루장
- total_distance — decimal(10,2) — 크루
- monthly_distance — decimal(8,2) — 이번
- battle_wins — int — 크루
- battle_losses — int — 크루
- created_at — timestamp — 크루
- updated_at — timestamp — 최종
emblems
- id — BIGINT
- name — varchar(100) — NOT NULL — 엠블럼명
- description — text — 엠블럼
- image_url — text — 엠블럼
- condition_type — varchar(50) — NOT NULL — 획득
- condition_value — decimal(8,2) — NOT NULL — 획득
- rarity — varchar(20) — 희귀도:
- created_at — timestamp — 엠블럼
feeds
- id — BIGINT
- user_id — bigint — Foreign key → users.id — NOT NULL — 피드
- content — text — 사용자가
- running_record_id — bigint — Foreign key → running_records.id — 연관된
- virtual_course_id — bigint — Foreign key → virtual_courses.id — 연관된
- image_url — text — 첨부
- like_count — int — 좋아요
- feed_type — varchar(20) — NOT NULL — 피드
- created_at — timestamp — 피드
push_notification_logs
- id — BIGINT
- notification_type — varchar(30) — NOT NULL — 알림
- target_type — varchar(20) — NOT NULL — 발송
- target_user_id — bigint — Foreign key → users.id — 개인
- target_crew_id — bigint — Foreign key → crews.id — 크루
- title — varchar(100) — NOT NULL — 알림
- message — text — NOT NULL — 알림
- weather_condition — varchar(50) — 날씨
- sent_at — timestamp — 알림
running_records
- id — BIGINT
- user_id — bigint — Foreign key → users.id — NOT NULL — 러닝한
- distance — decimal(6,2) — NOT NULL — 달린
- duration — int — NOT NULL — 운동
- average_pace — varchar(10) — 평균
- calories — int — 소모
- route_data — json — GPS
- started_at — timestamp — NOT NULL — 러닝
- ended_at — timestamp — NOT NULL — 러닝
- weather_condition — varchar(50) — 러닝
- running_type — varchar(20) — NOT NULL — 러닝
- virtual_course_id — bigint — Foreign key → virtual_courses.id — 가상
- crew_battle_id — bigint — Foreign key → crew_battles.id — 크루
- created_at — timestamp — 기록
user_emblems
- id — BIGINT
- user_id — bigint — Foreign key → users.id — NOT NULL — 엠블럼
- emblem_id — bigint — Foreign key → emblems.id — NOT NULL — 획득한
- earned_at — timestamp — 엠블럼
users
- id — BIGINT
- kakao_id — varchar(100) — NOT NULL — 카카오
- nickname — varchar(50) — NOT NULL — 사용자
- profile_image_url — text — 프로필
- residence — varchar(100) — 거주
- age_group — varchar(20) — 연령대
- gender — varchar(10) — 성별
- weekly_goal_distance — decimal(5,2) — 주간
- total_distance — decimal(8,2) — 총
- total_running_count — int — 총
- created_at — timestamp — 가입일시
- updated_at — timestamp — 최종
virtual_courses
- id — BIGINT
- user_id — bigint — Foreign key → users.id — NOT NULL — 코스
- course_name — varchar(100) — NOT NULL — 코스명
- start_location — varchar(100) — NOT NULL — 출발지
- end_location — varchar(100) — NOT NULL — 도착지
- total_distance — decimal(8,2) — NOT NULL — 총
- current_distance — decimal(8,2) — 현재까지
- progress_percentage — decimal(5,2) — 진행률
- is_completed — boolean — 코스
- completed_at — timestamp — 완주
- running_count — int — 이
- total_duration — int — 총
- average_pace — varchar(10) — 코스
- route_data — json — 지도
- created_at — timestamp — 코스
- updated_at — timestamp — 최종