protected function save($flush = true)
    {
        $app = Application::getFacadeApplication();
        $em = $app->make(EntityManagerInterface::class);
        $em->persist($this);
        if ($flush) {
            $em->flush();
        }
    }