import { IsString, IsNotEmpty, IsEnum } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { SmsVerificationType } from '../../../domain/entities/sms-verification.entity';

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

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