import { IsString, IsNotEmpty, MinLength, MaxLength, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class ResetPasswordDto {
  @ApiProperty({ description: '手机号', example: '+8613800138000' })
  @IsString()
  @IsNotEmpty()
  phone: string;

  @ApiProperty({ description: '6位短信验证码', example: '123456' })
  @IsString()
  @Length(6, 6)
  smsCode: string;

  @ApiProperty({ description: '新密码 (8-128位)', example: 'NewPassword456!' })
  @IsString()
  @MinLength(8)
  @MaxLength(128)
  newPassword: string;
}
