Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { Exclude, Expose } from 'class-transformer';
- import { MinLength, IsOptional, IsString, IsNotEmpty, IsNumberString } from 'class-validator';
- @Exclude()
- export class SearchOptionsDTO {
- @Expose()
- @IsOptional()
- @MinLength(2)
- @IsNotEmpty()
- keyword?: string;
- @Expose()
- @IsOptional()
- @IsString()
- @IsNotEmpty()
- order?: 'ASC' | 'DESC';
- @Expose()
- @IsOptional()
- @IsNumberString()
- @IsNotEmpty()
- take?: string;
- @Expose()
- @IsOptional()
- @IsNumberString()
- @IsNotEmpty()
- skip?: string;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement