@solid-nestjs/rest-api
Version: 
solid-nestjs Rest-API utilities
58 lines • 2.59 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PaginationResult = void 0;
const swagger_1 = require("@nestjs/swagger");
/**
 * Represents the result of a paginated query.
 *
 * @implements {CommonPaginationResult}
 *
 * @property {number} total - The total number of items available.
 * @property {number} count - The number of items returned in the current page.
 * @property {number} [limit] - The maximum number of items per page (optional).
 * @property {number} page - The current page number.
 * @property {number} pageCount - The total number of pages available.
 * @property {boolean} hasNextPage - Indicates if there is a next page.
 * @property {boolean} hasPreviousPage - Indicates if there is a previous page.
 */
class PaginationResult {
}
exports.PaginationResult = PaginationResult;
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Number)
], PaginationResult.prototype, "total", void 0);
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Number)
], PaginationResult.prototype, "count", void 0);
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Number)
], PaginationResult.prototype, "limit", void 0);
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Number)
], PaginationResult.prototype, "page", void 0);
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Number)
], PaginationResult.prototype, "pageCount", void 0);
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Boolean)
], PaginationResult.prototype, "hasNextPage", void 0);
__decorate([
    (0, swagger_1.ApiProperty)(),
    __metadata("design:type", Boolean)
], PaginationResult.prototype, "hasPreviousPage", void 0);
//# sourceMappingURL=pagination-result.js.map