mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 22:30:55 +00:00
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { Type } from 'class-transformer';
|
|
import { IsDateString, IsInt, IsNumber, IsOptional, IsUUID, Min } from 'class-validator';
|
|
|
|
export class CreateContainerTrainScheduleDto {
|
|
@ApiProperty({ format: 'uuid' })
|
|
@IsUUID()
|
|
routeId!: string;
|
|
|
|
@ApiProperty({ example: '2026-06-20T08:00:00.000Z' })
|
|
@IsDateString()
|
|
scheduleDate!: string;
|
|
|
|
@ApiProperty({ format: 'uuid' })
|
|
@IsUUID()
|
|
locomotiveId!: string;
|
|
|
|
@ApiPropertyOptional({ description: 'Maximum total booking weight allowed on this train' })
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@Min(1)
|
|
maxTrainWeightTons?: number;
|
|
|
|
@ApiPropertyOptional({ description: 'Maximum total wagon length allowed on this train' })
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsNumber()
|
|
@Min(1)
|
|
maxTrainLengthMeters?: number;
|
|
|
|
@ApiPropertyOptional({ description: 'Maximum wagons allowed on this train' })
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@IsInt()
|
|
@Min(1)
|
|
maxWagonsPerTrain?: number;
|
|
}
|