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

import {
  WAREHOUSE_INVENTORY_STATUSES,
  WarehouseInventoryStatus,
} from '../entities/warehouse-inventory.entity';

export class InquiryWarehouseInventoryDto {
  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  bookingNumber?: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  containerNumber?: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  cargoType?: string;

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  goodsName?: string;

  @ApiPropertyOptional({ format: 'uuid' })
  @IsOptional()
  @IsUUID()
  warehouseId?: string;

  @ApiPropertyOptional({ format: 'uuid' })
  @IsOptional()
  @IsUUID()
  yardId?: string;

  @ApiPropertyOptional({ format: 'uuid' })
  @IsOptional()
  @IsUUID()
  zoneId?: string;

  @ApiPropertyOptional({ enum: WAREHOUSE_INVENTORY_STATUSES })
  @IsOptional()
  @IsEnum(WAREHOUSE_INVENTORY_STATUSES)
  status?: WarehouseInventoryStatus;
}
