14 lines
291 B
TypeScript
14 lines
291 B
TypeScript
import { IsOptional, Min } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
|
|
export class PaginationDto {
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
@Min(1)
|
|
public readonly page?: number = 1;
|
|
|
|
@IsOptional()
|
|
@Type(() => Number)
|
|
public readonly pageSize?: number = 10;
|
|
}
|