import { ApiProperty } from '@nestjs/swagger'; import { IsString, MinLength, IsEmail } from 'class-validator'; export class ResetPasswordDto { @ApiProperty({ description: '邮箱' }) @IsEmail() email: string; @ApiProperty({ description: '验证码' }) @IsString() code: string; @ApiProperty({ description: '新密码' }) @IsString() @MinLength(6) newPassword: string; }