初始化游戏小组管理系统后端项目
- 基于 NestJS + TypeScript + MySQL + Redis 架构 - 完整的模块化设计(认证、用户、小组、游戏、预约等) - JWT 认证和 RBAC 权限控制系统 - Docker 容器化部署支持 - 添加 CLAUDE.md 项目开发指南 - 配置 .gitignore 忽略文件 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
31
src/modules/users/dto/user.dto.ts
Normal file
31
src/modules/users/dto/user.dto.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { IsEmail, IsOptional, IsString, MinLength } from 'class-validator';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
|
||||
export class UpdateUserDto {
|
||||
@ApiProperty({ description: '邮箱', required: false })
|
||||
@IsEmail({}, { message: '邮箱格式不正确' })
|
||||
@IsOptional()
|
||||
email?: string;
|
||||
|
||||
@ApiProperty({ description: '手机号', required: false })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
phone?: string;
|
||||
|
||||
@ApiProperty({ description: '头像URL', required: false })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
avatar?: string;
|
||||
}
|
||||
|
||||
export class ChangePasswordDto {
|
||||
@ApiProperty({ description: '旧密码' })
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
oldPassword: string;
|
||||
|
||||
@ApiProperty({ description: '新密码' })
|
||||
@IsString()
|
||||
@MinLength(6, { message: '密码至少6个字符' })
|
||||
newPassword: string;
|
||||
}
|
||||
Reference in New Issue
Block a user