public function toArray()
    {
        $data = [
            "uuid" => $this->uuid,
            "code" => $this->code,
            "modules" => $this->modules,
            "vars" => $this->vars,
        ];

        foreach (['modules', 'vars'] as $key) {
            if (!array_key_exists($key, $data)) {
                continue;
            }

            if (empty($data[$key])) {
                $data[$key] = new \stdClass();
            }
        }

        return $data;
    }