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

import { WAREHOUSE_STATUSES, WarehouseStatus } from '../entities/warehouse.entity';
import { CreateWarehouseDto } from './create-warehouse.dto';

export class UpdateWarehouseDto extends PartialType(CreateWarehouseDto) {
  @ApiPropertyOptional({ enum: WAREHOUSE_STATUSES })
  @IsOptional()
  @IsEnum(WAREHOUSE_STATUSES)
  status?: WarehouseStatus;
}
