add NULL objects to template

This commit is contained in:
2021-09-02 15:37:43 +02:00
parent 13c9cb4d96
commit ce4ff75bca
2 changed files with 96 additions and 0 deletions

View File

@@ -9,6 +9,17 @@ export interface $JsNameConverter($table.name) {
${column.name}: ${column.jstype}
#end for
}
export const NULL_$JsNameConverter($table.name): $JsNameConverter($table.name) = {
id: 0
#for $column in $table.columns
,${column.name}: #slurp
#if $column.jstype == "string"
''
#else if $column.jstype == "number"
0
#end if
#end for
}
#end for