add NULL objects to template
This commit is contained in:
parent
13c9cb4d96
commit
ce4ff75bca
@ -10,6 +10,10 @@ export interface Account {
|
|||||||
id: number
|
id: number
|
||||||
description: string
|
description: string
|
||||||
}
|
}
|
||||||
|
export const NULL_Account: Account = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
}
|
||||||
|
|
||||||
export interface Tenant {
|
export interface Tenant {
|
||||||
id: number
|
id: number
|
||||||
@ -26,6 +30,21 @@ export interface Tenant {
|
|||||||
iban: string
|
iban: string
|
||||||
account: number
|
account: number
|
||||||
}
|
}
|
||||||
|
export const NULL_Tenant: Tenant = {
|
||||||
|
id: 0
|
||||||
|
,salutation: ''
|
||||||
|
,firstname: ''
|
||||||
|
,lastname: ''
|
||||||
|
,address1: ''
|
||||||
|
,address2: ''
|
||||||
|
,address3: ''
|
||||||
|
,zip: ''
|
||||||
|
,city: ''
|
||||||
|
,phone1: ''
|
||||||
|
,phone2: ''
|
||||||
|
,iban: ''
|
||||||
|
,account: 0
|
||||||
|
}
|
||||||
|
|
||||||
export interface Premise {
|
export interface Premise {
|
||||||
id: number
|
id: number
|
||||||
@ -34,6 +53,13 @@ export interface Premise {
|
|||||||
zip: string
|
zip: string
|
||||||
city: string
|
city: string
|
||||||
}
|
}
|
||||||
|
export const NULL_Premise: Premise = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,street: ''
|
||||||
|
,zip: ''
|
||||||
|
,city: ''
|
||||||
|
}
|
||||||
|
|
||||||
export interface Flat {
|
export interface Flat {
|
||||||
id: number
|
id: number
|
||||||
@ -42,6 +68,13 @@ export interface Flat {
|
|||||||
area: number
|
area: number
|
||||||
flat_no: number
|
flat_no: number
|
||||||
}
|
}
|
||||||
|
export const NULL_Flat: Flat = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,premise: 0
|
||||||
|
,area: 0
|
||||||
|
,flat_no: 0
|
||||||
|
}
|
||||||
|
|
||||||
export interface OverheadAdvance {
|
export interface OverheadAdvance {
|
||||||
id: number
|
id: number
|
||||||
@ -50,24 +83,46 @@ export interface OverheadAdvance {
|
|||||||
startdate: string
|
startdate: string
|
||||||
enddate: string
|
enddate: string
|
||||||
}
|
}
|
||||||
|
export const NULL_OverheadAdvance: OverheadAdvance = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,amount: 0
|
||||||
|
,startdate: ''
|
||||||
|
,enddate: ''
|
||||||
|
}
|
||||||
|
|
||||||
export interface OverheadAdvanceFlatMapping {
|
export interface OverheadAdvanceFlatMapping {
|
||||||
id: number
|
id: number
|
||||||
overhead_advance: number
|
overhead_advance: number
|
||||||
flat: number
|
flat: number
|
||||||
}
|
}
|
||||||
|
export const NULL_OverheadAdvanceFlatMapping: OverheadAdvanceFlatMapping = {
|
||||||
|
id: 0
|
||||||
|
,overhead_advance: 0
|
||||||
|
,flat: 0
|
||||||
|
}
|
||||||
|
|
||||||
export interface Parking {
|
export interface Parking {
|
||||||
id: number
|
id: number
|
||||||
description: string
|
description: string
|
||||||
premise: number
|
premise: number
|
||||||
}
|
}
|
||||||
|
export const NULL_Parking: Parking = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,premise: 0
|
||||||
|
}
|
||||||
|
|
||||||
export interface CommercialPremise {
|
export interface CommercialPremise {
|
||||||
id: number
|
id: number
|
||||||
description: string
|
description: string
|
||||||
premise: number
|
premise: number
|
||||||
}
|
}
|
||||||
|
export const NULL_CommercialPremise: CommercialPremise = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,premise: 0
|
||||||
|
}
|
||||||
|
|
||||||
export interface Tenancy {
|
export interface Tenancy {
|
||||||
id: number
|
id: number
|
||||||
@ -79,6 +134,16 @@ export interface Tenancy {
|
|||||||
startdate: string
|
startdate: string
|
||||||
enddate: string
|
enddate: string
|
||||||
}
|
}
|
||||||
|
export const NULL_Tenancy: Tenancy = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,tenant: 0
|
||||||
|
,flat: 0
|
||||||
|
,parking: 0
|
||||||
|
,commercial_premise: 0
|
||||||
|
,startdate: ''
|
||||||
|
,enddate: ''
|
||||||
|
}
|
||||||
|
|
||||||
export interface Fee {
|
export interface Fee {
|
||||||
id: number
|
id: number
|
||||||
@ -88,12 +153,25 @@ export interface Fee {
|
|||||||
startdate: string
|
startdate: string
|
||||||
enddate: string
|
enddate: string
|
||||||
}
|
}
|
||||||
|
export const NULL_Fee: Fee = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,amount: 0
|
||||||
|
,fee_type: ''
|
||||||
|
,startdate: ''
|
||||||
|
,enddate: ''
|
||||||
|
}
|
||||||
|
|
||||||
export interface TenancyFeeMapping {
|
export interface TenancyFeeMapping {
|
||||||
id: number
|
id: number
|
||||||
tenancy: number
|
tenancy: number
|
||||||
fee: number
|
fee: number
|
||||||
}
|
}
|
||||||
|
export const NULL_TenancyFeeMapping: TenancyFeeMapping = {
|
||||||
|
id: 0
|
||||||
|
,tenancy: 0
|
||||||
|
,fee: 0
|
||||||
|
}
|
||||||
|
|
||||||
export interface AccountEntry {
|
export interface AccountEntry {
|
||||||
id: number
|
id: number
|
||||||
@ -102,5 +180,12 @@ export interface AccountEntry {
|
|||||||
created_at: string
|
created_at: string
|
||||||
amount: number
|
amount: number
|
||||||
}
|
}
|
||||||
|
export const NULL_AccountEntry: AccountEntry = {
|
||||||
|
id: 0
|
||||||
|
,description: ''
|
||||||
|
,account: 0
|
||||||
|
,created_at: ''
|
||||||
|
,amount: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,6 +9,17 @@ export interface $JsNameConverter($table.name) {
|
|||||||
${column.name}: ${column.jstype}
|
${column.name}: ${column.jstype}
|
||||||
#end for
|
#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
|
#end for
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user