protected function isRestoringModel(Eloquent $model): bool
    {
        if (! $model->isSoftDeleting()) {
            return false;
        }

        $deleted = $model->getDeletedAtColumn();

        return \is_null($model->getAttribute($deleted)) && ! \is_null($model->getOriginal($deleted));
    }