All files / apps/properties-service/src/properties/dto query-properties.dto.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 2/2
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 233x 3x   3x       3x     2x     7x     2x       7x    
import { Type } from 'class-transformer';
import { IsInt, IsOptional, IsString, Length, Max, Min } from 'class-validator';
 
export class QueryPropertiesDto {
  @IsOptional()
  @IsString()
  @Length(1, 100)
  city?: string;
 
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  page: number = 1;
 
  @IsOptional()
  @Type(() => Number)
  @IsInt()
  @Min(1)
  @Max(100)
  limit: number = 20;
}