CityResponse

도시/공항 API 응답 DTO 모음. 도시, 공항, 국가 정보.

클래스 구조

NameResponse

다국어 이름.

필드타입설명
koString?한글명
enString?영문명
localString?현지어명

Serializable: serialVersionUID = 1L

Airport

공항 정보.

필드타입설명
idUUID?공항 ID
iataCodeStringIATA 코드
namesNameResponse공항명
shortNamesNameResponse?축약명
countrySimpleCountryResponse국가 정보
citySimpleCityResponse도시 정보
timezoneString?타임존
poiIdString?POI ID

계산 프로퍼티:

  • name: ko 또는 en 우선
  • shortName: shortNames.ko 또는 name
  • zoneId: ZoneId.of(timezone)

팩토리 메서드:

fun ofIata(iata: String): Airport // IATA 코드만으로 생성

SimpleCityResponse

간단한 도시 정보.

필드타입설명
iataCodeStringIATA 코드
namesNameResponse도시명
regionIdUUID?지역 ID
zoneIdUUID?존 ID

계산 프로퍼티:

  • name: ko 또는 en 우선

SimpleCountryResponse

간단한 국가 정보.

필드타입설명
codeString국가 코드
namesNameResponse국가명

City

도시 상세 정보.

필드타입설명
idUUID도시 ID
typeString타입 (CITY 등)
iataCodeStringIATA 코드
namesNameResponse도시명
shortNamesNameResponse?축약명
regionIdUUID?지역 ID
zoneIdUUID?존 ID
airportIataCodesList<String>공항 코드 목록
countrySimpleCountryResponse국가 정보
citySimpleCityResponse?상위 도시
timezoneString?타임존
poiIdString?POI ID

기본값:

val seoul: City = City(
    id = UUID.fromString("6affe3ff-d59d-44da-b674-1aee56bf21fd"),
    iataCode = "SEL",
    names = NameResponse(ko = "서울", en = "Seoul"),
    airportIataCodes = listOf("ICN", "GMP"),
    country = SimpleCountryResponse(code = "KR", names = NameResponse(ko = "대한민국"))
)

사용처

사용 위치용도
CityClient도시/공항 API 응답
AirportService공항 정보 캐싱
CityService도시 정보 캐싱
LocationService위치 해석

특징

  • Serializable: 모든 DTO가 직렬화 가능 (캐싱용)
  • 다국어 지원: ko/en/local 다국어 이름
  • IATA 기반: IATA 코드로 식별
  • 계층 구조: City → Airport → Country 관계
  • 타임존: 시간대 정보 포함