public function generateIdentity(Identitiable $model, bool $overwrite = false)
    {
        if (null === $model->getIdentity() || $overwrite) {
            $user = $this->tokenStorage->getToken()->getUser();
            $model
                ->setIdentity($user->getIdentity()->getType())
                ->setIdentityUuid($user->getIdentity()->getUuid());
        }

        return $this;
    }