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