- 后端:基于 NestJS 的分层架构设计 - 前端:基于 VbenAdmin + Element Plus 的管理系统 - 支持 SaaS + 独立版双架构模式 - 完整的用户权限管理系统 - 系统设置、文件上传、通知等核心功能 - 多租户支持和插件化扩展架构
64 lines
1.8 KiB
TypeScript
64 lines
1.8 KiB
TypeScript
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;
|
||
} |