/
test.php
34 lines (28 loc) · 1.04 KB
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require 'vendor/autoload.php';
use Direct\Valmod\ModelBuilder\Builder;
$json = <<<JSON
{
"modelName": "Dummy Model",
"prefix": "dummy",
"tables": [
{
"tableName": "first_table",
"displayName": "My First Table",
"columns": [
{ "columnName": "col1", "dataType": "Integer", "displayName": "First Column", "description": "The Very First Column" },
{ "columnName": "strcol", "dataType": "String", "displayName": "String Column", "description": "No Description" }
]
},{
"tableName": "second_table",
"displayName": "My second Table",
"columns": [
{ "columnName": "col1", "dataType": "Integer", "displayName": "First Column", "description": "The Very First Column" },
{ "columnName": "strcol", "dataType": "String", "displayName": "String Column", "description": "No Description" }
]
}
]
}
JSON;
$builder = new Builder($json);
echo $builder->getModelDefinition();