mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 02:28:18 +00:00
20 lines
503 B
TypeScript
20 lines
503 B
TypeScript
import { IsArray, IsOptional, IsString, IsUUID, ValidateNested } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
|
|
export class FirstMileVehicleInput {
|
|
@IsUUID()
|
|
vehicleId!: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
containerNumber?: string;
|
|
}
|
|
|
|
/** Replace the full set of vehicles (with their container numbers) on a pickup. */
|
|
export class SetVehiclesDto {
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => FirstMileVehicleInput)
|
|
vehicles!: FirstMileVehicleInput[];
|
|
}
|