import { Expose, Type } from 'class-transformer';
import { IsNumber, IsOptional, Min } from 'class-validator';
import { ValidationClass } from './validationClass';

export class OptionalPaginableVC extends ValidationClass {
    @IsOptional()
    @Expose()
    @IsNumber()
    @Type(() => Number)
    @Min(1)
    page?: number;

    @IsOptional()
    @Expose()
    @IsNumber()
    @Type(() => Number)
    @Min(1)
    limit?: number;

    @IsOptional()
    @Expose()
    @IsNumber()
    @Type(() => Number)
    @Min(1)
    pageIncludingId?: number;
}
