forked from rmp135/sql-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.handlebars
More file actions
34 lines (34 loc) · 803 Bytes
/
template.handlebars
File metadata and controls
34 lines (34 loc) · 803 Bytes
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
{{#*inline "dataPartial"}}
{{#each tables as |table|}}
export interface {{interfaceName}} {{#if extends}}extends {{extends}} {{/if}}{
{{#each additionalProperties as |prop|}}
{{prop}}
{{/each}}
{{#each columns}}
"{{propertyName}}"{{#if optional}}?{{/if}}: {{propertyType}} {{#if nullable}}| null {{/if}}
{{/each}}
}
{{/each}}
{{#each enums as |enum|}}
export enum {{convertedName}} {
{{#each values as |value|}}
{{value.convertedKey}} = "{{value.value}}",
{{/each}}
}
{{/each}}
{{/inline}}
/*
* This file was generated by a tool.
* Rerun sql-ts to regenerate this file.
*/
{{#if config.schemaAsNamespace}}
{{#each grouped as |group key|}}
export namespace {{key}} {
{{> dataPartial group}}
}
{{/each}}
{{else}}
{{#each grouped as |group key|}}
{{> dataPartial group }}
{{/each}}
{{/if}}