makcha

Tables (12)

FirstTrainWatingSpot (첫차 대기 장소)

  • spot_id (장소 식별번호) — bigint — Primary key — NOT NULL
  • station_id (역 식별 번호) — bigint — Foreign key → Station.station_id — NOT NULL
  • spot_name (장소 이름) — VARCHAR(50)
  • spot_type (장소 타입) — ENUM
  • phone_number (장소 전화번호) — VARCHAR(50)
  • latitude (위도) — DOUBLE
  • longitude (경도) — DOUBLE
  • open_time (영업 시작 시간) — TIME
  • close_itme (영업 종료 시간) — TIME
  • is_24_hours (24시간 여부) — BOOLEAN

NotificationHistory (알림 히스토리)

  • notification_history_id (알림 히스토리 식별번호) — bigint — Primary key — NOT NULL
  • notification_id (알림 식별번호) — bigint — Foreign key → NotificationTrigger.notification_id — NOT NULL
  • route_id (경로 식별번호) — bigint — Foreign key → NotificationTrigger.route_id — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → NotificationTrigger.user_id — NOT NULL
  • station_id (출발역 식별 번호) — bigint — Foreign key → NotificationTrigger.station_id — NOT NULL
  • origin_name (출발역 명칭) — String — NOT NULL
  • destinatin_name (도착역 명칭) — String — NOT NULL
  • departure_datetime (출발시간) — DATETIME — NOT NULL
  • arrival_datetime (도착 예정 시간) — DATETIME — NOT NULL
  • duration_minutes (소요 시간) — bigint — NOT NULL
  • transfers (환승 횟수) — bigint
  • walking_minutes (걸은 시간(분)) — bigint
  • saved_fare_won (아낀 금액) — bigint
  • created_at (생성 시각) — Datetime

NotificationTrigger (막차 알림 설정)

  • notification_id (알림 식별번호) — bigint — Primary key — NOT NULL
  • route_id (경로 식별번호) — bigint — Foreign key → RouteSearch.route_id — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → RouteSearch.user_id — NOT NULL
  • station_id (출발역 식별 번호) — bigint — Foreign key → RouteSearch.station_id — NOT NULL
  • trigger_time (트리거 시간) — ENUM — NOT NULL
  • sent_success (알림톡 전송 성공 여부) — BOOLEAN — NOT NULL
  • sent_at (알림톡 전송 시간) — DATETIME
  • scheduled (막차 시간) — DATETIME
  • title (출발역) — String
  • road_address (주소) — String
  • latitude (주소 위도 좌표) — Float
  • longitude (주소 경도 좌표) — Float

RecentDestication (최근 도착지)

  • recent_id (최근 도착지 식별번호) — Primary key — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → User.user_id — NOT NULL
  • title (제목) — bigint — NOT NULL
  • road_address (경로 주소) — VARHCHAR(255) — NOT NULL
  • detail_address (경로 상세 주소) — VARCHAR(255)
  • place_id (카카오 REST API 제공) — VARCHAR(50) — NOT NULL
  • latitude (위도) — DOUBLE — NOT NULL
  • longitude (경도) — DOUBLE — NOT NULL
  • used_at (사용된 시간) — DATETIME — NOT NULL
  • created_at (생성 시각) — DATETIME — NOT NULL

RouteSearch (경로 탐색 기록)

  • route_id (경로 식별번호) — bigint — Primary key — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → User.user_id — NOT NULL
  • station_id (출발역 식별 번호) — bigint — Foreign key → Station.station_id — NOT NULL
  • end_address (도착 지점) — VARCHAR(200)
  • searched_at (알림 받기 한 시간) — DATETIME
  • is_success (막차 탑승 성공 여부) — BOOLEAN
  • arrived_at (도착 시간) — DATETIME
  • traveled_time (이동 시간) — DATETIME
  • saved_fare (아낀 택시비) — JSON
  • route_token (경로 토큰) — String
  • is_optimal (최적 경로 유무) — Boolean

SaveReport (세이브 리포트)

  • report_id (세이브리포트 식별번호) — bigint — Primary key — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → User.user_id — NOT NULL
  • saved_amount (절약한 택시비) — bigint — NOT NULL
  • total_count (총 절약 택시비) — bigint — NOT NULL
  • created_at (생성시간) — DATETIME — NOT NULL
  • updated_at (수정시간) — DATETIME

Station (역 이름)

  • station_id (역 식별 번호) — bigint — Primary key — NOT NULL
  • station_name (역 이름) — VARCHAR(50)
  • station_line (역 노선) — VARCHAR(20)
  • latitude (위도) — DOUBLE
  • longitude (경도) — DOUBLE
  • region (지역) — VARCHAR(200)

Term (약관)

  • term_id (약관 식별번호) — bigint — Primary key — NOT NULL
  • term_name (약관명) — VARCHAR(200) — NOT NULL
  • term_content (약관 내용) — VARCHAR(200) — NOT NULL
  • is_required (필수 여부) — boolean — NOT NULL
  • created_at (생성일) — DATETIME — NOT NULL
  • updated_at (수정일) — DATETIME — NOT NULL

User (사용자)

  • user_id (사용자 식별번호) — bigint — Primary key — NOT NULL
  • kakao_id (카카오 측에서 제공하는 식별값) — bigint — NOT NULL
  • phone_number (사용자 전화번호) — bigint — NOT NULL
  • nickname (사용자 닉네임) — VARCHAR(200) — NOT NULL
  • email (카카오 제공 이메일) — VARCHAR(200) — NOT NULL
  • social_type (KAKAO) — VARCHAR(20) — NOT NULL
  • refresh_token (카카오 로그인 토큰) — VARCHAR(200) — NOT NULL
  • created_at (생성 시간) — DATETIME — NOT NULL
  • updated_at (업데이트 시간) — DATETIME
  • last_login_at (마지막 로그인 시간) — DATETIME

UserNotificationSetting (유저 알림 설정)

  • user_notification_setting_id (유저 알림 설정 식별번호) — bigint — Primary key — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → User.user_id — NOT NULL
  • enabled (설정 유무) — BOOLEAN — NOT NULL
  • notify_mask (알림 마스크) — INTEGER — NOT NULL
  • created_at (생성 시각) — DATETIME — NOT NULL
  • updated_at (수정 시각) — DATETIME

UserTerm (개인정보 동의 관리)

  • user_id (사용자 식별번호) — bigint — Foreign key → User.user_id — NOT NULL
  • term_id (약관 식별번호) — bigint — Foreign key → Term.term_id — NOT NULL
  • consent_type (동의 목록) — ENUM
  • agreed (동의 여부) — BOOLEAN — NOT NULL
  • agreed_at (동의 시간) — DATETIME — NOT NULL
  • updated_at (동의 수정) — DATETIME

myPlace (집/자주 가는 장소)

  • myplace_id (고유 ID) — bigint — Primary key — NOT NULL
  • user_id (사용자 식별번호) — bigint — Foreign key → User.user_id — NOT NULL
  • place_type (장소 구분) — ENUM — NOT NULL
  • provider_place_id (제공 장소 ID) — VARCHAR(50)
  • place_addres (주소) — VARCHAR(200) — NOT NULL
  • place_detail_address (상세 주소) — VARCHAR(200)
  • latitude (위도) — DOUBLE
  • longitude (경도) — DOUBLE
  • created_at (생성 시간) — DATETIME
  • updated_at (수정 시간) — DATETIME