mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 18:55:42 +00:00
23 lines
602 B
TypeScript
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;
|
|
}
|