| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2022-03-17 18:14:52 |
| 4 | * @LastEditors: nevin |
| 5 | * @LastEditTime: 2024-10-10 15:45:59 |
| 6 | * @Description: 表单数据 |
| 7 | */ |
| 8 | |
| 9 | import { ApiProperty } from '@nestjs/swagger' |
| 10 | import z from 'zod' |
| 11 | import { createZodDto } from '../utils' |
| 12 | |
| 13 | export const TableDtoSchema = z.object({ |
| 14 | pageNo: z.coerce.number().default(1), |
| 15 | pageSize: z.coerce.number().default(10), |
| 16 | }) |
| 17 | export class TableDto extends createZodDto(TableDtoSchema) {} |
| 18 | |
| 19 | export class TableResDto { |
| 20 | @ApiProperty({ title: '页码', description: '页码' }) |
| 21 | readonly pageNo: number = 1 |
| 22 | |
| 23 | @ApiProperty({ title: '页数', description: '页数' }) |
| 24 | readonly pageSize: number = 10 |
| 25 | |
| 26 | @ApiProperty({ title: '总数', description: '总数' }) |
| 27 | readonly count: number = 0 |
| 28 | } |
| 29 |