namespace OmsorgCore.Application.Services;

public enum PasswordResetRequestStatus
{
    Sent,
    CannotReset
}

public class PasswordResetRequestResult
{
    public PasswordResetRequestStatus Status { get; init; }
    public Guid? UserId { get; init; }
    public string? Email { get; init; }

    /// <summary>Nur gesetzt, wenn tatsächlich ein neuer Code erzeugt wurde und dispatcht werden soll.</summary>
    public string? RawPin { get; init; }

    public static PasswordResetRequestResult CannotReset() => new() { Status = PasswordResetRequestStatus.CannotReset };

    public static PasswordResetRequestResult Sent(Guid userId, string email, string? rawPin) => new()
    {
        Status = PasswordResetRequestStatus.Sent,
        UserId = userId,
        Email = email,
        RawPin = rawPin
    };
}
