mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 11:21:18 +00:00
53 lines
865 B
TypeScript
53 lines
865 B
TypeScript
import { IsString, IsEnum, IsNumber, IsOptional, IsUUID } from 'class-validator';
|
|
import { VehicleType, FuelType, VehicleStatus } from '../entities/vehicle.entity';
|
|
|
|
export class CreateVehicleDto {
|
|
@IsString()
|
|
plateNumber!: string;
|
|
|
|
@IsEnum(VehicleType)
|
|
vehicleType!: VehicleType;
|
|
|
|
@IsString()
|
|
manufacturer!: string;
|
|
|
|
@IsString()
|
|
model!: string;
|
|
|
|
@IsNumber()
|
|
year!: number;
|
|
|
|
@IsEnum(FuelType)
|
|
fuelType!: FuelType;
|
|
|
|
@IsNumber()
|
|
capacity!: number;
|
|
|
|
@IsEnum(VehicleStatus)
|
|
status!: VehicleStatus;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
description?: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
assignedDriverId?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
assignedDriverName?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
code?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
powerPlateNo?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
trailerPlateNo?: string;
|
|
}
|