import { Type } from "class-transformer"; import { IsInt, IsISO8601, IsOptional, IsString, Max, Min } from "class-validator"; export class AdminSearchDto { @IsOptional() @IsString() owner_type?: string; @IsOptional() @IsString() owner_id?: string; @IsOptional() @IsISO8601() date_from?: string; @IsOptional() @IsISO8601() date_to?: string; @IsOptional() @Type(()=> Number) @IsInt() @Min(1) page?: number = 1; @IsOptional() @Type(()=> Number) @IsInt() @Min(1) @Max(200) page_size?: number = 50; }