AirRecommendationRequest
항공 추천 데이터 생성 요청 DTO. 추천 서비스에 항공편 데이터를 저장할 때 사용.
클래스 구조
AirRecommendationCreateRequest
추천 데이터 생성 요청.
| 필드 | 타입 | 설명 |
|---|---|---|
policy | AirRecommendationPolicy | 추천 정책 |
funnel | AirRecommendationFunnel | 추천 퍼널 |
recommendations | List<AirRecommendationItemCreateRequest> | 추천 항목 목록 |
팩토리 메서드:
fun of(
flightItems: List<FlightItem>,
airportMap: Map<String, Airport>,
funnel: AirRecommendationFunnel,
policy: AirRecommendationPolicy,
salesChannel: Channel,
salesFunnel: Funnel
): AirRecommendationCreateRequestAirRecommendationItemCreateRequest
추천 항목 생성 요청.
| 필드 | 타입 | 설명 |
|---|---|---|
origin | String | 출발 공항 |
originCity | String | 출발 도시 |
originCountry | String | 출발 국가 |
destination | String | 도착 공항 |
destinationCity | String | 도착 도시 |
destinationCountry | String | 도착 국가 |
outboundDate | LocalDate | 출발일 |
inboundDate | LocalDate | 귀국일 |
routeType | RouteType | 노선 타입 (기본: INTERNATIONAL) |
airPrice | Long | 항공료 |
tax | Long | 세금 |
discount | Long | 할인액 |
cardPromotionDiscount | Long | 카드 프로모션 할인 |
sellerPromotionDiscount | Long | 판매자 프로모션 할인 |
ticketingFee | Long | 발권 수수료 |
airline | String | 발권 항공사 |
maxStop | Int | 최대 경유 수 |
duration | Long | 여행 기간 (일) |
cabin | CabinType | 좌석 등급 |
avail | Int | 잔여 좌석 |
schedules | List<ScheduleCreateRequest> | 스케줄 목록 |
tags | List<String>? | 태그 목록 |
salesChannel | Channel | 판매 채널 |
salesFunnel | Funnel | 판매 퍼널 |
팩토리 메서드:
fun of(
flightItem: FlightItem,
airportMap: Map<String, Airport>,
salesChannel: Channel,
salesFunnel: Funnel
): AirRecommendationItemCreateRequestScheduleCreateRequest
스케줄 생성 요청.
| 필드 | 타입 | 설명 |
|---|---|---|
departure | String | 출발 공항 |
arrival | String | 도착 공항 |
departureAt | LocalDateTime | 출발 시각 |
arrivalAt | LocalDateTime | 도착 시각 |
bookingClass | String | 부킹 클래스 |
flightNumber | String | 편명 |
사용처
| 사용 위치 | 용도 |
|---|---|
| AirRecommendationClient | 추천 데이터 생성 API 호출 |
| CurationScrapingService | 큐레이션 데이터 저장 |
| RecommendationScrapingService | 주말특가 데이터 저장 |
특징
- 도메인 변환: FlightItem에서 요청 DTO로 변환
- 가격 분리: 항공료, 세금, 각종 할인 분리
- 지역 정보 포함: 공항, 도시, 국가 정보 모두 포함
- 여행 기간 계산: ChronoUnit.DAYS로 기간 자동 계산