traffic_service

Tables (7)

BusRoutes (버스 노선)

  • BusRoutes_id (버스 노선 ID) — PK — Primary key — NOT NULL
  • route_id (TOPIS API에서 제공하는 노선 ID) — TOPOS API에서 제공
  • route_name (노선 번호/이름)
  • start_stop (출발 정류장)
  • end_stop (종착지 정류장)
  • route_type (노선 유형(간선, 지선 등)) — ('MAIN', 'BRANCH')
  • operation_start_time (첫차 시간)
  • operation_end_time (막차 시간)
  • created_at (생성 날짜)
  • updated_at (수정 날짜)

BusRoutesStops (노선-정류장 정보)

  • BusRoutesStops_id (노선-정류장 정보 ID) — PK — Primary key — NOT NULL
  • BusStops_id (버스 정류장 ID) — PK — Foreign key → BusStops.BusStops_id — NOT NULL
  • BusRoutes_id (버스 노선 ID) — PK — Foreign key → BusRoutes.BusRoutes_id — NOT NULL
  • stop_sequence (노선 내 정류장 순서)
  • created_at (생성 날짜)
  • updated_at (수정 날짜)
  • distance (이전 정류장과의 거리)
  • estimated_time (다음 정류장까지 예상 소요 시간)

BusStops (버스 정류장)

  • BusStops_id (버스 정류장 ID) — PK — Primary key — NOT NULL
  • stop_id (TOPIS API에서 제공하는 정류장 ID) — TOPOS API에서 제공
  • name (버스 정류장 이름)
  • direction (정류장 진행 방향)
  • region_code (지역 구분 코드)
  • latitude (위도)
  • longitude (경도)
  • created_at (생성 날짜)
  • updated_at (수정 날짜)

Chat_Histories (챗봇 대화 내역)

  • ChatHistories_id (챗봇 대화 내역 ID) — PK — Primary key — NOT NULL
  • user_id (사용자 ID) — PK — Foreign key → Users.user_id — NOT NULL
  • query (질문 내용)
  • response (답변 내용)
  • created_at (생성 날짜)

FaboriteBusStops (즐겨찾기한 정류장)

  • FaboriteBusStops_id (즐겨찾기 정류장 ID) — PK — Primary key — NOT NULL
  • user_id (사용자 ID) — PK — Foreign key → Users.user_id — NOT NULL
  • BusStops_id (버스 정류장 ID) — PK — Foreign key → BusStops.BusStops_id — NOT NULL
  • created_at (생성 날짜)

TransportCards (교통카드)

  • transportCard_id (교통카드 ID) — PK — Primary key — NOT NULL
  • user_id (사용자 ID) — PK — Foreign key → Users.user_id — NOT NULL
  • card_number (교통카드 고유 번호)
  • card_type (카드 타입) — ('TMONEY', 'CASHBEE')
  • expiry_date (카드 만료일)
  • balance (잔액)
  • active (카드 상태) — ('ACTIVE', 'LOST', 'EXPIRED ', 'DELETE')
  • created_at (생성 날짜)
  • updated_at (수정 날짜)

Users (사용자)

  • user_id (사용자 ID) — PK — Primary key — NOT NULL
  • username (사용자 이름)
  • email (사용자 이메일)
  • password (사용자 비밀번호)
  • phone (사용자 전화번호)
  • user_role (사용자 권한) — ('USER', 'ADMIN')
  • user_state (사용자 상태) — ('ACTIVE', 'DELETE')
  • created_at (생성 날짜)
  • updated_at (수정 날짜)