import { ApiPropertyOptional, PartialType } from '@nestjs/swagger';
import { IsEnum, IsOptional } from 'class-validator';

import { WAREHOUSE_YARD_STATUSES, WarehouseYardStatus } from '../entities/warehouse-yard.entity';
import { CreateWarehouseYardDto } from './create-warehouse-yard.dto';

export class UpdateWarehouseYardDto extends PartialType(CreateWarehouseYardDto) {
  @ApiPropertyOptional({ enum: WAREHOUSE_YARD_STATUSES })
  @IsOptional()
  @IsEnum(WAREHOUSE_YARD_STATUSES)
  status?: WarehouseYardStatus;
}
