import { Freight } from "@edr/types";
import { IsEnum, IsNumber, IsOptional, IsString, Min } from "class-validator";

export class CreateTrainDto {
  @IsString()
  code!: string;

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

  @IsOptional()
  @IsEnum(Freight.TrainStatus)
  status?: Freight.TrainStatus;

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