import { IsEmail, IsEnum } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { EmailVerificationType } from '../../../domain/entities/email-verification.entity';

export class SendEmailCodeDto {
  @ApiProperty({ description: '邮箱地址', example: 'user@example.com' })
  @IsEmail({}, { message: '邮箱格式无效' })
  email: string;

  @ApiProperty({
    description: '验证码类型',
    enum: EmailVerificationType,
    example: EmailVerificationType.REGISTER,
  })
  @IsEnum(EmailVerificationType, { message: '验证码类型无效' })
  type: EmailVerificationType;
}
