import { ApiProperty } from '@nestjs/swagger';
import { ArrayMinSize, IsArray, IsUUID } from 'class-validator';

export class AssignTrainWagonsDto {
  @ApiProperty({
    type: [String],
    format: 'uuid',
    description: 'Wagons to append to the consist, in order. Each must be AVAILABLE in the train\'s yard.',
  })
  @IsArray()
  @ArrayMinSize(1)
  @IsUUID('all', { each: true })
  wagonIds!: string[];
}
