import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { ArrayMaxSize, ArrayMinSize, IsArray, IsString } from 'class-validator'; export class BatchValuationDto { @ApiProperty({ description: 'Array of property IDs to valuate (max 50)', example: ['prop-1', 'prop-2'], type: [String], }) @IsArray() @ArrayMinSize(1) @ArrayMaxSize(50) @IsString({ each: true }) @Transform(({ value }) => (Array.isArray(value) ? value : [value])) propertyIds!: string[]; }