separate flight class api and transportation class api into different module

This commit is contained in:
ItsMalma
2025-11-29 12:06:39 +07:00
parent 1fd90fdeab
commit 84a04da1e6
11 changed files with 271 additions and 74 deletions

View File

@@ -0,0 +1,20 @@
import type { FlightClass } from "@/database/entities/flight-class.entity";
import type { FlightMapper } from "@/modules/flight/flight.mapper";
import type { FlightClassResponse } from "@/modules/flight/flight.types";
export class FlightClassMapper {
public constructor(private readonly flightMapper: FlightMapper) {}
public mapEntityToResponse(flightClass: FlightClass): FlightClassResponse {
return {
id: flightClass.id,
flight: this.flightMapper.mapEntityToResponse(flightClass.flight),
class: flightClass.class,
seat_layout: flightClass.seatLayout,
baggage: flightClass.baggage,
cabin_baggage: flightClass.cabinBaggage,
created_at: flightClass.createdAt,
updated_at: flightClass.updatedAt,
};
}
}