diff --git a/src/model/InsuranceData.ts b/src/model/InsuranceData.ts index efc556c..ef7c0fd 100644 --- a/src/model/InsuranceData.ts +++ b/src/model/InsuranceData.ts @@ -57,7 +57,7 @@ export class InsuranceData { type: 'money', nullable: true }) - projectAllowance: number; + projectAllowance: string; @Column({ nullable: true diff --git a/src/schema/type-defs.ts b/src/schema/type-defs.ts index abaa587..5907eb1 100644 --- a/src/schema/type-defs.ts +++ b/src/schema/type-defs.ts @@ -163,8 +163,15 @@ type InsuranceData { maintenanceAgreement: String hasFixedRate: Boolean! fixedRate: Float - "Projektzuschuss" - projectAllowance: Float + """ + Projektzuschuss: + is of american format [-]$[0-9]+.[0-9][0-9] + commas every three digits and . for decimals with 2 digits after the . + There can be a leading -. + There is a currency signe at the first position or second position if - is set. + The kind of currency depends on the database. + """ + projectAllowance: String notes: String } @@ -182,8 +189,15 @@ input InsuranceDataCreateInput { maintenanceAgreement: String hasFixedRate: Boolean! fixedRate: Float - "Projektzuschuss" - projectAllowance: Float + """ + Projektzuschuss: + must be of format [+|-][$][0-9]*[.[0-9]*] + commas are ignored, non numeric values except , and . lead to errors + There can be a leading + or -. + You can pass a currency signe at the first position or second position of + or - is set. + The kind of currency depends on the database. + """ + projectAllowance: String notes: String } @@ -201,8 +215,14 @@ input InsuranceDataUpdateInput { maintenanceAgreement: String hasFixedRate: Boolean fixedRate: Float - "Projektzuschuss" - projectAllowance: Float + Projektzuschuss: + must be of format [+|-][$][0-9]*[.[0-9]*] + commas are ignored, non numeric values except , and . lead to errors + There can be a leading + or -. + You can pass a currency signe at the first position or second position of + or - is set. + The kind of currency depends on the database. + """ + projectAllowance: String notes: String }