Files
goodgo-platform/apps/api/src/modules/analytics/presentation/dto/avm-compare-query.dto.ts
Ho Ngoc Hai f3a2a012c4 feat(web): add price range filter and list view to /du-an page
Add minPrice/maxPrice inputs to ProjectFilterBar and introduce a
list view mode alongside the existing grid/map toggle for project
browsing.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-16 17:40:30 +07:00

20 lines
587 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { Transform } from 'class-transformer';
import { ArrayMaxSize, ArrayMinSize, IsArray, IsString } from 'class-validator';
export class AvmCompareQueryDto {
@ApiProperty({
description: 'Comma-separated property IDs to compare (2-5)',
example: 'prop-1,prop-2,prop-3',
type: String,
})
@Transform(({ value }) =>
typeof value === 'string' ? value.split(',').map((s: string) => s.trim()).filter(Boolean) : value,
)
@IsArray()
@ArrayMinSize(2)
@ArrayMaxSize(5)
@IsString({ each: true })
ids!: string[];
}