Files
wwjcloud/wwjcloud/src/common/admin/dto/query-admin.dto.ts
万物街 f30d64e6cc feat: 初始化 WWJ Cloud 企业级框架项目
- 后端:基于 NestJS 的分层架构设计
- 前端:基于 VbenAdmin + Element Plus 的管理系统
- 支持 SaaS + 独立版双架构模式
- 完整的用户权限管理系统
- 系统设置、文件上传、通知等核心功能
- 多租户支持和插件化扩展架构
2025-08-23 13:20:01 +08:00

64 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsOptional, IsString, IsInt, IsIn } from 'class-validator';
import { Transform } from 'class-transformer';
export class QueryAdminDto {
@ApiPropertyOptional({ description: '页码', default: 1 })
@IsOptional()
@IsInt()
@Transform(({ value }) => parseInt(value) || 1)
page?: number = 1;
@ApiPropertyOptional({ description: '每页数量', default: 10 })
@IsOptional()
@IsInt()
@Transform(({ value }) => parseInt(value) || 10)
limit?: number = 10;
@ApiPropertyOptional({ description: '关键词搜索(用户名/真实姓名/手机号)' })
@IsOptional()
@IsString()
keyword?: string;
@ApiPropertyOptional({ description: '站点ID' })
@IsOptional()
@IsInt()
@Transform(({ value }) => parseInt(value))
siteId?: number;
@ApiPropertyOptional({ description: '性别1男 2女 0保密' })
@IsOptional()
@IsIn([0, 1, 2])
@Transform(({ value }) => parseInt(value))
sex?: number;
@ApiPropertyOptional({ description: '状态1正常 0禁用' })
@IsOptional()
@IsIn([0, 1])
@Transform(({ value }) => parseInt(value))
status?: number;
@ApiPropertyOptional({ description: '是否超级管理员1是 0否' })
@IsOptional()
@IsIn([0, 1])
@Transform(({ value }) => parseInt(value))
isAdmin?: number;
@ApiPropertyOptional({ description: '角色ID' })
@IsOptional()
@IsInt()
@Transform(({ value }) => parseInt(value))
roleId?: number;
@ApiPropertyOptional({ description: '开始时间(时间戳)' })
@IsOptional()
@IsInt()
@Transform(({ value }) => parseInt(value))
startTime?: number;
@ApiPropertyOptional({ description: '结束时间(时间戳)' })
@IsOptional()
@IsInt()
@Transform(({ value }) => parseInt(value))
endTime?: number;
}