mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 03:40:56 +00:00
33 lines
575 B
TypeScript
33 lines
575 B
TypeScript
import { IsString, IsEnum, IsNumber, IsOptional } 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;
|
|
}
|