mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: document more endpoints
This commit is contained in:
33
packages/server/src/common/dtos/PaginatedResults.dto.ts
Normal file
33
packages/server/src/common/dtos/PaginatedResults.dto.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
class Pagination {
|
||||
@ApiProperty({
|
||||
description: 'Total number of items across all pages',
|
||||
example: 100,
|
||||
})
|
||||
total: number;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Current page number (1-based)',
|
||||
example: 1,
|
||||
minimum: 1,
|
||||
})
|
||||
page: number;
|
||||
|
||||
@ApiProperty({
|
||||
description: 'Number of items per page',
|
||||
example: 10,
|
||||
minimum: 1,
|
||||
})
|
||||
pageSize: number;
|
||||
}
|
||||
|
||||
export class PaginatedResponseDto<TData> {
|
||||
@ApiProperty({
|
||||
description: 'Pagination metadata',
|
||||
type: Pagination,
|
||||
})
|
||||
pagination: Pagination;
|
||||
|
||||
data: TData[];
|
||||
}
|
||||
Reference in New Issue
Block a user