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

export class ChangePhoneDto {
  @ApiProperty({ description: '新手机号', example: '+8613900139000' })
  @IsString()
  @IsNotEmpty()
  newPhone: string;

  @ApiProperty({ description: '新手机号的6位短信验证码', example: '123456' })
  @IsString()
  @Length(6, 6)
  newSmsCode: string;
}
