mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 00:24:54 +00:00
34 lines
709 B
TypeScript
34 lines
709 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { ChildTransferItemDto } from './child-transfer-item.response.dto';
|
|
|
|
export class PagedChildTransfersResponseDto {
|
|
@ApiProperty({ type: [ChildTransferItemDto] })
|
|
items!: ChildTransferItemDto[];
|
|
|
|
@ApiProperty({ example: 1 })
|
|
page!: number;
|
|
|
|
@ApiProperty({ example: 10 })
|
|
size!: number;
|
|
|
|
@ApiProperty({ example: 20 })
|
|
total!: number;
|
|
|
|
@ApiProperty({ example: true })
|
|
hasMore!: boolean;
|
|
|
|
constructor(
|
|
items: ChildTransferItemDto[],
|
|
page: number,
|
|
size: number,
|
|
total: number,
|
|
) {
|
|
this.items = items;
|
|
this.page = page;
|
|
this.size = size;
|
|
this.total = total;
|
|
this.hasMore = page * size < total;
|
|
}
|
|
}
|
|
|