import { IsString, IsUUID, IsOptional, IsInt, Min, IsNumber, IsIn } from 'class-validator';

export class CreateContainerDto {
  @IsString()
  containerNumber!: string;

  @IsUUID()
  containerTypeId!: string;

  @IsOptional()
  @IsUUID()
  wagonId?: string;

  @IsOptional()
  @IsInt()
  @Min(1)
  position?: number;

  @IsNumber()
  @Min(0)
  tareWeight!: number;

  @IsNumber()
  @Min(0)
  maxGrossWeight!: number;

  @IsOptional()
  @IsString()
  sealNumber?: string;

  @IsOptional()
  @IsIn(['AVAILABLE', 'LOADED', 'IN_TRANSIT', 'MAINTENANCE', 'DAMAGED'])
  status?: string;
}