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

export class BindEmailDto {
  @ApiProperty({
    example: 'user@example.com',
    description: '邮箱地址',
  })
  @IsEmail({}, { message: '请输入有效的邮箱地址' })
  email: string;

  @ApiProperty({
    example: '123456',
    description: '6位数字验证码',
  })
  @IsString()
  @Length(6, 6, { message: '验证码必须是6位数字' })
  code: string;
}
