import { Attr } from 'ts-framework' import { OperatorResponseDTO } from './operator' import { ProviderProductResponseDTO } from './provider-product' import { VehicleCapacityDTO, VehicleCapacityResponseDTO } from './vehicle-capacity' import { VehicleColorResponseDTO } from './vehicle-color' import { VehicleTypeResponseDTO } from './vehicle-type' import { VehicleVehicleAccommodationDTO, VehicleVehicleAccommodationResponseDTO } from './vehicle-vehicle-accommodation' import { VehicleMakeResponseDTO } from './vehicle-make' export class VehicleFiltersDTO { @Attr({ type: String, optional: true }) productId?: string @Attr({ type: String, optional: true }) productIds?: string[] @Attr({ type: String, optional: true }) organizationId?: string @Attr({ type: Boolean, optional: true }) hasOperator?: boolean @Attr({ type: String, optional: true }) type?: string @Attr({ type: String, optional: true }) orderBy?: string @Attr({ type: String, optional: true }) sort?: 'ASC'|'DESC' @Attr({ type: Number, optional: true }) numAmbulatory?: number @Attr({ type: Number, optional: true }) numWheelchairs?: number @Attr({ type: Number, optional: true }) numCots?: number @Attr({ type: Number, optional: true }) page?: number @Attr({ type: Number, optional: true }) recordsPerPage?: number } export class ChangeActiveStatusManyVehiclesDTO { @Attr({ type: String }) ids: string[] @Attr({ type: Boolean }) isActive: boolean } export class ChangeActiveStatusVehicleDTO { @Attr({ type: String }) id: string @Attr({ type: Boolean }) isActive: boolean } export class ChangeAssignStatusVehicleDTO { @Attr({ type: String }) id: string @Attr({ type: Boolean }) isInRide: boolean } export class CreateVehicleDTO { @Attr({ type: String }) colorId: string @Attr({ type: String }) fleetId: string @Attr({ type: String }) licensePlate: string @Attr({ type: String }) modelId: string @Attr({ type: String }) typeId: string @Attr({ type: String }) year: string @Attr({ type: String }) makeId: string @Attr({ type: String }) organizationId: string } export class UpdateVehicleInfoDTO { @Attr({ type: String }) id: string @Attr({ type: String, optional: true }) colorId?: string @Attr({ type: String, optional: true }) fleetId?: string @Attr({ type: String, optional: true }) licensePlate?: string @Attr({ type: String, optional: true }) modelId?: string @Attr({ type: String, optional: true }) makeId?: string @Attr({ type: String, optional: true }) providerId?: string @Attr({ type: String, optional: true }) organizationId?: string @Attr({ type: String, optional: true }) typeId?: string @Attr({ type: String, optional: true }) year?: string } export class UpdateVehicleVehicleAccomodationDTO { @Attr({ type: String }) id: string @Attr({ type: VehicleVehicleAccommodationDTO }) accommodations: VehicleVehicleAccommodationDTO[] } export class VehicleProvidersAndProductsRequestDTO { @Attr({ type: String }) vehicleId: string @Attr({ type: String }) providersIds: string[] @Attr({ type: String }) productsIds: string[] } export class UpdateVehicleCapacityDTO { @Attr({ type: String }) id: string @Attr({ type: VehicleCapacityDTO }) capacities: VehicleCapacityDTO[] } export class UpdateVehicleProviderProductDTO { @Attr({ type: String }) id: string @Attr({ type: String }) providerProductsIds: string[] } export class UpdateVehicleProvidersAndProviderProductsDTO { @Attr({ type: String }) id: string @Attr({ type: String }) providerIds: string[] @Attr({ type: String }) providerProductsIds: string[] } export class VehicleIdsDTO { @Attr({ type: String }) ids: string[] } export class VehicleStatusDTO { @Attr({ type: Boolean }) isActive: boolean } export class VehicleResponseDTO { id: string year: string licensePlate: string isActive: boolean isInRide: boolean accommodations: { accommodationId: String number: number name: string }[] capacities: VehicleCapacityResponseDTO[] color: string | null make: string | null model: string | null operatorId: string | null organizationId: string | null products: { id: string name: string description: string pricingId: string integrationId: string organizationId: string externalUrl: string }[] type: string | null } export class VehicleWithAccommodationsResponseDTO { id: string accommodations: VehicleVehicleAccommodationResponseDTO[] constructor(id: string, accommodations: VehicleVehicleAccommodationResponseDTO[]) { this.id = id this.accommodations = accommodations } static of(id: string, accommodations: VehicleVehicleAccommodationResponseDTO[]): VehicleWithAccommodationsResponseDTO { return new VehicleWithAccommodationsResponseDTO(id, accommodations) } } export class VehicleWithCapacitiesResponseDTO { id: string capacities: VehicleCapacityResponseDTO[] constructor(id: string, capacities: VehicleCapacityResponseDTO[]) { this.id = id this.capacities = capacities } static of(id: string, capacities: VehicleCapacityResponseDTO[]): VehicleWithCapacitiesResponseDTO { return new VehicleWithCapacitiesResponseDTO(id, capacities) } } export class VehicleWithProviderProductsResponseDTO { id: string providerProducts?: ProviderProductResponseDTO[] constructor(model: VehicleWithProviderProductsResponseDTO) { this.id = model.id if (model.providerProducts) { this.providerProducts = model.providerProducts } } static of(model: VehicleWithProviderProductsResponseDTO): VehicleWithProviderProductsResponseDTO { return new VehicleWithProviderProductsResponseDTO(model) } } export class VehiclesWithProductAndOperatorResponseDTO { id: string operator: OperatorResponseDTO vehicle: VehicleResponseDTO providerProduct: ProviderProductResponseDTO } export class VehicleCreationOptionsRequestDTO { makes: VehicleMakeResponseDTO[] colors: VehicleColorResponseDTO[] carTypes: VehicleTypeResponseDTO[] }