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

export class ResetPasswordDto {
  @ApiProperty({
    example: 'admin@gmail.com',
  })
  @IsEmail()
  email!: string;

  @ApiProperty({
    example: '123456',
    description: '6-digit OTP sent to the user email',
  })
  @IsString()
  @Length(6, 6)
  otp!: string;

  @ApiProperty({
    example: 'NewPassword123',
  })
  @IsString()
  @MinLength(8)
  newPassword!: string;
}
