Files
edr-platform/apps/edr-freight-api/src/modules/trains/dto/set-train-wagons-yard.dto.ts

23 lines
602 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { ArrayMinSize, IsArray, IsUUID } from 'class-validator';
export class SetTrainWagonsYardDto {
@ApiProperty({
type: [String],
format: 'uuid',
description:
'Coupled wagons to relocate. All move in one transaction — if any is pinned to a live schedule, none move.',
})
@IsArray()
@ArrayMinSize(1)
@IsUUID('all', { each: true })
wagonIds!: string[];
@ApiProperty({
format: 'uuid',
description: 'Yard the selected wagons now sit in. The train itself stays put.',
})
@IsUUID()
currentYardId!: string;
}