namespace ApiDenuncias.Services;

public sealed class EncryptionKeyUnavailableException : Exception
{
    public EncryptionKeyUnavailableException(string message)
        : base(message)
    {
    }

    public EncryptionKeyUnavailableException(string message, Exception innerException)
        : base(message, innerException)
    {
    }
}

public sealed class EncryptedDataPurgedException : Exception
{
    public EncryptedDataPurgedException(DateOnly keyDate)
        : base($"Denuncia no disponible: datos purgados para la clave diaria {keyDate:yyyy-MM-dd}.")
    {
        KeyDate = keyDate;
    }

    public EncryptedDataPurgedException(DateOnly keyDate, Exception innerException)
        : base($"Denuncia no disponible: datos purgados para la clave diaria {keyDate:yyyy-MM-dd}.", innerException)
    {
        KeyDate = keyDate;
    }

    public DateOnly KeyDate { get; }
}
