protected function resolveResourceKey(Model $model, string $resourceKey = null):string
    {
        if (! is_null($resourceKey)) {
            return $resourceKey;
        }

        if (method_exists($model, 'getResourceKey')) {
            return $model->getResourceKey();
        }

        return $model->getTable();
    }