import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsNumber, IsOptional, IsString, IsUUID, MaxLength, Min } from 'class-validator';

export class LoadInventoryDto {
  @ApiProperty({ format: 'uuid', description: 'Physical wagon the item is loaded onto' })
  @IsUUID()
  wagonId!: string;

  @ApiPropertyOptional({ description: 'Weight loaded onto the wagon (kg)' })
  @IsOptional()
  @IsNumber()
  @Min(0)
  loadedWeight?: number;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  @MaxLength(120)
  loadedBy?: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  notes?: string;
}
