Fix SMS, and added pagination+sorting+searching for GETs

This commit is contained in:
SepehrYahyaee
2026-05-20 14:57:10 +03:30
parent e4dfe7c572
commit 44723259d6
18 changed files with 519 additions and 30 deletions

View File

@@ -1,3 +1,4 @@
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { RequestManagementModel } from "src/request-management/entities/schema/request-management.schema";
export class AllRequestDto {
@@ -122,7 +123,30 @@ export class AllRequestDtoV2 {
export class AllRequestDtoRsV2 {
data: AllRequestDtoV2[];
constructor(items: AllRequestDtoV2[]) {
this.data = items;
@ApiProperty({ description: "Total rows after search filter" })
total: number;
@ApiPropertyOptional()
page?: number;
@ApiPropertyOptional()
limit?: number;
@ApiPropertyOptional()
totalPages?: number;
constructor(payload: {
data: AllRequestDtoV2[];
total: number;
page?: number;
limit?: number;
totalPages?: number;
}) {
this.data = payload.data;
this.total = payload.total;
this.page = payload.page;
this.limit = payload.limit;
this.totalPages = payload.totalPages;
}
}