AirScheduleEvent
항공편 스케줄 이벤트 인터페이스 및 관련 DTO. Kinesis 스트림 전송용.
인터페이스 정의
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
visible = true,
property = "argumentType"
)
interface AirScheduleEvent : MessageArgumentPayload {
val searchInfo: SearchInfoEvent
val flightItems: List<FlightItemEvent>
}포함 DTO
SearchInfoEvent
검색 정보 이벤트 DTO.
| 필드 | 타입 | 설명 |
|---|---|---|
tripType | TripType | 여정 타입 |
originType | LocationType | 출발지 타입 |
origin | String | 출발지 IATA 코드 |
destinationType | LocationType | 도착지 타입 |
destination | String | 도착지 IATA 코드 |
outboundDate | LocalDate | 출발일 |
inboundDate | LocalDate? | 귀국일 (왕복만) |
channel | Channel | 채널 |
funnel | Funnel | 퍼널 |
cabins | Set<CabinType> | 좌석 등급 |
팩토리 메서드: of(searchInfo: SearchInfo)
FlightItemEvent
항공편 아이템 이벤트 DTO.
| 필드 | 타입 | 설명 |
|---|---|---|
channel | Channel | 채널 |
validatingCarrier | String | 발권 항공사 |
schedules | List<ScheduleEvent> | 스케줄 목록 |
fares | List<FlightFareEvent> | 운임 목록 |
tripDirectionType | TripDirectionType? | MIX 방향 타입 |
retrievedAt | LocalDateTime | 조회 시간 (KST) |
팩토리 메서드: of(airportMap, channel, flightItem)
ScheduleEvent
스케줄 이벤트 DTO.
| 필드 | 타입 | 설명 |
|---|---|---|
sequence | Int | 순서 |
flightTime | String | 비행 시간 |
departure | String | 출발 공항 |
departureCity | String | 출발 도시 |
arrival | String | 도착 공항 |
arrivalCity | String | 도착 도시 |
departureAt | LocalDateTime | 출발 시간 |
arrivalAt | LocalDateTime | 도착 시간 |
stopPoints | List<String> | 경유지 목록 |
addDay | Int | 추가일 |
stop | Int | 경유 횟수 |
freeBaggage | FreeBaggageEvent? | 무료 수하물 |
segments | List<SegmentEvent> | 세그먼트 목록 |
팩토리 메서드: of(index, schedule, airportMap)
FreeBaggageEvent
무료 수하물 이벤트 DTO.
| 필드 | 타입 | 설명 |
|---|---|---|
volume | Int | 용량 |
unit | BaggageUnit | 단위 (KG/PC) |
SegmentEvent
세그먼트 이벤트 DTO.
| 필드 | 타입 | 설명 |
|---|---|---|
sequence | Int | 순서 |
departure | String | 출발 공항 |
departureCity | String | 출발 도시 |
departureAt | LocalDateTime | 출발 시간 |
arrival | String | 도착 공항 |
arrivalCity | String | 도착 도시 |
arrivalAt | LocalDateTime | 도착 시간 |
marketingCarrier | String | 마케팅 항공사 |
operatingCarrier | String? | 운항 항공사 |
bookingClass | String | 예약 클래스 |
flightNumber | String | 편명 |
cabin | CabinType | 좌석 등급 |
팩토리 메서드: of(index, segment, airportMap)
FlightFareEvent
운임 이벤트 DTO.
| 필드 | 타입 | 설명 |
|---|---|---|
funnel | Funnel | 퍼널 |
airPrice | Long | 항공료 |
tax | Long | 세금 |
fuelCharge | Long | 유류할증료 |
ticketingFee | Long | 발권 수수료 |
discounts | List<Discount> | 할인 목록 |
promotionPrincipleId | Long? | 프로모션 원칙 ID |
cardPromotionId | Long? | 카드 프로모션 ID |
cardPromotionName | String? | 카드 프로모션명 |
identityType | IdentityType? | 신원 타입 |
계산 프로퍼티: total = airPrice + tax - discounts + ticketingFee
팩토리 메서드: of(fare)
데이터 변환 플로우
FlightItem (Domain)
│
└──► FlightItemEvent.of(airportMap, channel, flightItem)
│
├──► Schedule → ScheduleEvent.of()
│ │
│ ├──► FreeBaggage → FreeBaggageEvent.of()
│ │
│ └──► Segment → SegmentEvent.of()
│
└──► FlightFare → FlightFareEvent.of()
특징
- @JsonTypeInfo: JSON 다형성 직렬화 지원
- 팩토리 메서드: 도메인 객체에서 이벤트 DTO로 변환
- City 정보 보강: airportMap으로 도시 IATA 코드 추가
- KST 시간: retrievedAt은 한국 표준시로 변환