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, }; } }