import { Type } from 'class-transformer';
import { IsString, IsArray, IsOptional, IsNotEmpty, IsISO8601, IsDate } from 'class-validator';

export class AssignClientDto {
  @IsString()
  @IsNotEmpty()
  clientId: string;

  @IsArray()
  @IsString({ each: true })
  @IsNotEmpty()
  cylinderIds: string[];

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

  @IsDate()
  @Type(() => Date)
  @IsOptional()
  challanDate?: Date;

  @IsDate()
  @Type(() => Date)
  @IsOptional()
  dispatchDate?: Date;
}
