add NULL objects to template
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user