using System.ComponentModel.DataAnnotations;

namespace ERPCore.Dtos.Auth;

public sealed class ForgotPasswordRequest
{
    [Required] public string Identifier { get; set; } = string.Empty;
    public bool UseResetLink { get; set; }
    public int NumberOfDigits { get; set; } = 6;
    public bool Welcome { get; set; }
}

public sealed class ForgotPasswordResponse
{
    public string? ReferenceNumber { get; set; }
    public DateTime? ExpiresAt { get; set; }
    public string? RecoveryType { get; set; }
}

public sealed class VerifyRecoveryOtpRequest
{
    [Required] public string ReferenceNumber { get; set; } = string.Empty;
    [Required] public string OtpCode { get; set; } = string.Empty;
}

public sealed class VerifyRecoveryOtpResponse
{
    public string? ReferenceNumber { get; set; }
    public Guid? UserId { get; set; }
    public bool Verified { get; set; }
}

public sealed class ResetPasswordRequest
{
    [Required] public string ReferenceNumber { get; set; } = string.Empty;
    [Required, MinLength(8)] public string NewPassword { get; set; } = string.Empty;
    [Required] public string ConfirmPassword { get; set; } = string.Empty;
}

public sealed class ResetPasswordWithTokenRequest
{
    [Required] public string ResetToken { get; set; } = string.Empty;
    [Required, MinLength(8)] public string NewPassword { get; set; } = string.Empty;
    [Required] public string ConfirmPassword { get; set; } = string.Empty;
}
