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

export class UnfreezeAccountDto {
  @ApiProperty({
    example: '确认账户安全',
    description: '解冻验证方式: mnemonic 或 phone',
  })
  @IsString()
  @IsNotEmpty()
  verifyMethod: 'mnemonic' | 'phone';

  @ApiPropertyOptional({
    example: 'abandon abandon ...',
    description: '助记词 (verifyMethod=mnemonic时必填)',
  })
  @IsString()
  @IsOptional()
  mnemonic?: string;

  @ApiPropertyOptional({
    example: '+8613800138000',
    description: '手机号 (verifyMethod=phone时必填)',
  })
  @IsString()
  @IsOptional()
  phoneNumber?: string;

  @ApiPropertyOptional({
    example: '123456',
    description: '短信验证码 (verifyMethod=phone时必填)',
  })
  @IsString()
  @IsOptional()
  smsCode?: string;
}
