src/MVQN/Data/Models/Model.php
private static function createProperty(ClassType &$class, array $column): Property
    {
        $name = self::snake2camel($column["column_name"]);

        $nullable = $column["is_nullable"] === "YES";

        $customGetter = null;

        switch($column["data_type"])
        {
            case "boolean":
                $type = "bool";
                break;
            case "integer":
                $type = "int";
                break;
            case "character varying":
                $type = "string";
                break;
            case "timestamp without time zone":
                $type = "string";
                $customGetter = (new Method("get".self::camel2pascal($name)))
                    ->setVisibility("public")
                    ->addComment("@return \\DateTimeImmutable".($nullable ? "|null" : ""))
                    ->addComment("@throws \\Exception")
                    ->addBody("return new \DateTimeImmutable(\$this->$name);");
                break;
            case "text":
                $type = "string";
                break;
            case "json":
                $type = "string";
                $customGetter = (new Method("get".self::camel2pascal($name)))
                    ->setVisibility("public")
                    ->addComment("@return array".($nullable ? "|null" : ""))
                    //->addComment("@throws \\Exception")
                    ->addBody("return json_decode(\$this->$name, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);");
                break;
            case "USER-DEFINED":
                // EXTENSION!
                $extension = $column["udt_name"];

                switch($extension)
                {
                    case "citext": // Case-Insensitive Text
                        $type = "string";
                        break;

                    // TODO: Add other extensions as we find them!

                    default:
                        // Unsupported extension, just used string ???
                        $type = "string";
                        break;
                }
                break;


            default:
                $type = $column["data_type"];
                throw new ModelCreationException("The '$type' data type needs to be added!");
                break;
        }

        $_property = (new Property($name))
            ->setVisibility("protected")
            ->addComment("@var $type".($nullable ? "|null" : ""))
            ->addComment($name !== $column["column_name"] ? "@ColumnName ".$column["column_name"] : "");


        if($class !== null)
        {
            if($customGetter !== null)
            {
                $class->addComment("@see    $type" . ($nullable ? "|null" : "") . " get" . self::camel2pascal($name) . "()");
                $class->addMember($customGetter);
            }
            else
            {
                $class->addComment("@method $type" . ($nullable ? "|null" : "") . " get" . self::camel2pascal($name) . "()");
            }


            $class->addMember($_property);
        }

        return $_property;
    }
private static function createProperty(ClassType &$class, array $column): Property
    {
        $name = self::snake2camel($column["column_name"]);

        $nullable = $column["is_nullable"] === "YES";

        $customGetter = null;

        switch($column["data_type"])
        {
            case "boolean":
                $type = "bool";
                break;
            case "integer":
                $type = "int";
                break;
            case "character varying":
                $type = "string";
                break;
            case "timestamp without time zone":
                $type = "string";
                $customGetter = (new Method("get".self::camel2pascal($name)))
                    ->setVisibility("public")
                    ->addComment("@return \\DateTimeImmutable".($nullable ? "|null" : ""))
                    ->addComment("@throws \\Exception")
                    ->addBody("return new \DateTimeImmutable(\$this->$name);");
                break;
            case "text":
                $type = "string";
                break;
            case "json":
                $type = "string";
                $customGetter = (new Method("get".self::camel2pascal($name)))
                    ->setVisibility("public")
                    ->addComment("@return array".($nullable ? "|null" : ""))
                    //->addComment("@throws \\Exception")
                    ->addBody("return json_decode(\$this->$name, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);");
                break;
            case "USER-DEFINED":
                // EXTENSION!
                $extension = $column["udt_name"];

                switch($extension)
                {
                    case "citext": // Case-Insensitive Text
                        $type = "string";
                        break;

                    // TODO: Add other extensions as we find them!

                    default:
                        // Unsupported extension, just used string ???
                        $type = "string";
                        break;
                }
                break;


            default:
                $type = $column["data_type"];
                throw new ModelCreationException("The '$type' data type needs to be added!");
                break;
        }

        $_property = (new Property($name))
            ->setVisibility("protected")
            ->addComment("@var $type".($nullable ? "|null" : ""))
            ->addComment($name !== $column["column_name"] ? "@ColumnName ".$column["column_name"] : "");


        if($class !== null)
        {
            if($customGetter !== null)
            {
                $class->addComment("@see    $type" . ($nullable ? "|null" : "") . " get" . self::camel2pascal($name) . "()");
                $class->addMember($customGetter);
            }
            else
            {
                $class->addComment("@method $type" . ($nullable ? "|null" : "") . " get" . self::camel2pascal($name) . "()");
            }


            $class->addMember($_property);
        }

        return $_property;
    }
-----------------------------------------------------------------------------------------------------------------