src/core/domain/dtos/page-meta.dto.ts
Page model for pagination
Properties |
order |
Type : Order
|
Decorators :
@ApiProperty({description: 'Order of the elements on the page', example: undefined})
|
Defined in src/core/domain/dtos/page-meta.dto.ts:32
|
Order of the elements on the page |
total |
Type : number
|
Decorators :
@IsArray()
|
Defined in src/core/domain/dtos/page-meta.dto.ts:23
|
Total number of hits (results) acquired from the search |
import { ApiExtraModels, ApiProperty } from "@nestjs/swagger";
import { IsArray } from "class-validator";
import { Order } from "../enums";
/**
* List of allowed properties in this DTO
*/
const allowedProperties = ['total', 'pagenum', 'order', 'hasNext', 'hasPrev', 'pagesize'];
/**
* Page model for pagination
*/
@ApiExtraModels()
export class PageMetaDto {
/**
* Total number of hits (results) acquired from the search
*/
@IsArray()
@ApiProperty({
description: 'Total number of hits (results) acquired from the search',
example: 314
})
total: number;
/**
* Order of the elements on the page
*/
@ApiProperty({
description: 'Order of the elements on the page',
example: Order.DESC
})
order: Order;
}