Makcha
Tables (10)
alarm (알림)
- id (Key) — BIGINT — Primary key — NOT NULL
- user_id (사용자 FK) — BIGINT — Foreign key → user.id — NOT NULL
- route_id (경로 FK) — BIGINT — Foreign key → route.id — NOT NULL
- recommended_departure_time (권장 출발 시각) — DATETIME — NOT NULL
- status (상태) — VARCHAR(20) — NOT NULL
- created_at (생성일시) — DATETIME — NOT NULL
- updatd_at (수정일시) — DATETIME — NOT NULL
- canceled_at (취소 시각) — DATETIME
alarm_reminder (알림 리마인더)
- id (Key) — BIGINT — Primary key — NOT NULL
- alarm_id (알림 FK) — BIGINT — Foreign key → alarm.id — NOT NULL
- user_id (사용자 FK) — BIGINT — Foreign key → alarm.user_id — NOT NULL
- route_id (경로 FK) — BIGINT — Foreign key → alarm.route_id — NOT NULL
- remind_minutes (몇 분 전 알림) — INT — NOT NULL
- send_time (발송 시각) — DATETIME — NOT NULL
- status (상태) — VARCHAR(20) — NOT NULL
- created_at (생성일시) — DATETIME — NOT NULL
- updated_at (수정일시) — DATETIME — NOT NULL
notification_log (알림톡 발송)
- id (Key) — BIGINT — Primary key — NOT NULL
- alarm_reminder_id (알림 리마인더 FK) — BIGINT — Foreign key → alarm_reminder.id — NOT NULL
- alarm_id (알림 FK) — BIGINT — Foreign key → alarm_reminder.alarm_id — NOT NULL
- user_id (사용자 FK) — BIGINT — Foreign key → alarm_reminder.user_id — NOT NULL
- route_id (경로 FK) — BIGINT — Foreign key → alarm_reminder.route_id — NOT NULL
- success (성공 여부) — BOOLEAN — NOT NULL
- sent_at (발송 시각) — DATETIME — NOT NULL
place (집/자주 가는 장소)
- id (Key) — BIGINT — Primary key — NOT NULL
- user_id (사용자 FK) — BIGINT — Foreign key → user.id — NOT NULL
- type (장소 타입) — VARCHAR(20) — NOT NULL
- label (장소 이름) — VARCHAR(50) — NOT NULL
- address (주소) — VARCHAR(200) — NOT NULL
- detail_address (상세 주소) — VARCHAR(200)
- lat (위도) — DOUBLE — NOT NULL
- lng (경도) — DOUBLE — NOT NULL
- created_at (생성일시) — DATETIME — NOT NULL
- updated_at (수정일시) — DATETIME — NOT NULL
route (경로)
- id (Key) — BIGINT — Primary key — NOT NULL
- origin_name (출발지 이름) — VARCHAR(100) — NOT NULL
- origin_lat (출발지 위도) — DOUBLE — NOT NULL
- origin_lng (출발지 경도) — DOUBLE — NOT NULL
- dest_name (도착지 이름) — VARCHAR(100) — NOT NULL
- dest_lat (도착지 위도) — DOUBLE — NOT NULL
- dest_lng (도착지 경도) — DOUBLE — NOT NULL
- total_minutes (총 소요시간) — INT — NOT NULL
- walking_minutes (도보 소요 시간) — INT — NOT NULL
- transfer_count (환승 횟수) — INT — NOT NULL
- last_departure_time (막차 기준 출발 시각) — DATETIME — NOT NULL
- created_at (생성일시) — DATETIME — NOT NULL
save_report (세이브 리포트)
- id (Key) — BIGINT — Primary key — NOT NULL
- alarm_id (알림 FK) — BIGINT — Foreign key → alarm.id — NOT NULL
- user_id (사용자 FK) — BIGINT — Foreign key → alarm.user_id — NOT NULL
- route_id (경로 FK) — BIGINT — Foreign key → alarm.route_id — NOT NULL
- taxi_cost (예상 택시비) — INT — NOT NULL
- transit_cost (예상 대중교통비) — INT — NOT NULL
- saved_amount (절감액) — INT — NOT NULL
- created_at (생성일시) — DATETIME — NOT NULL
user (사용자)
- id (Key) — BIGINT — Primary key — NOT NULL
- kakao_id (카카오 식별값) — VARCHAR(50) — NOT NULL
- email (이메일) — VARCHAR(200)
- name (이름) — VARCHAR(50)
- phone_number (전화번호) — VARCHAR(20)
- created_at (생성일시) — DATETIME — NOT NULL
- updated_at (수정일시) — DATETIME — NOT NULL
user_consent (동의)
- user_id (Key) — BIGINT — Foreign key → user.id — NOT NULL
- agreed (동의 여부) — BOOLEAN — NOT NULL
- terms_version (약관 버전) — VARCHAR(20)
- agreed_at (동의 시각) — DATETIME
- created_at (생성일시) — DATETIME — NOT NULL
- updated_at (수정일시) — DATETIME — NOT NULL
user_setting (환경설정)
- user_id (사용자 FK) — BIGINT — Foreign key → user.id — NOT NULL
- remind_minutes (알림 시점 목록) — JSON — NOT NULL
- created_at (생성일시) — DATETIME — NOT NULL
- updated_at (수정일시) — DATETIME — NOT NULL
waiting_place (첫차 대기 장소)
- id (Key) — BIGINT — Primary key — NOT NULL
- name (장소 이름) — VARCHAR(100) — NOT NULL
- category (업종) — VARCHAR(20) — NOT NULL
- address (주소) — VARCHAR(200) — NOT NULL
- lat (위도) — DOUBLE — NOT NULL
- lng (경도) — DOUBLE — NOT NULL
- is_24h (24시 여부) — BOOLEAN — NOT NULL
- close_time (마감 시간) — TIME
- phone_number (전화번호) — VARCHAR(20)