!function column($name, $type, $pk=false, $fk=false, $nn=false) !local $prefix = "" !if ($pk == true) !$prefix = "<&key>" !elseif($nn == true) !$prefix = "*" !endif !if ($fk == true) !$prefix = $prefix + "<&key>" !endif !return $prefix + '""' + $name + '""' + ': ' + '//""' + $type + '"" //' !endfunction !function table($name) !return 'entity "**' + $name + '**"' + " as " + $name !endfunction !procedure enum($name, $variants) !$list = %splitstr($variants, ",") object "**$name** **(E)**" as $name { !foreach $item in $list $item !endfor } !endprocedure !procedure add_legend() legend right <#GhostWhite,#GhostWhite>| |= __Legend__ | |<&key>| Primary Key | |<&key>| Foreign Key | | • | Mandatory field (Not Null) | | **(E)** | Enum | endlegend !endprocedure