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

/** Bulk-mark received inventory items as inspection PASSED. */
export class BulkInspectDto {
  @ApiProperty({ type: [String], format: 'uuid' })
  @IsArray()
  @ArrayNotEmpty()
  @IsUUID('all', { each: true })
  inventoryIds!: string[];

  @ApiPropertyOptional({ description: 'Inspection type label (e.g. ORIGIN_INSPECTION).' })
  @IsOptional()
  @IsString()
  inspectionType?: string;

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

  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  inspectedBy?: string;
}
