@dynamatix/gb-schemas 2.0.38 → 2.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities/applicants/loan-commitment.entity.d.ts +15 -6
- package/dist/entities/applicants/loan-commitment.entity.d.ts.map +1 -1
- package/dist/entities/applicants/loan-commitment.entity.js +10 -0
- package/dist/entities/applicants/mortgage-commitment.entity.d.ts +36 -19
- package/dist/entities/applicants/mortgage-commitment.entity.d.ts.map +1 -1
- package/dist/entities/applicants/mortgage-commitment.entity.js +10 -2
- package/entities/applicants/loan-commitment.entity.ts +28 -8
- package/entities/applicants/mortgage-commitment.entity.ts +47 -22
- package/package.json +1 -1
- package/prisma/applicants/loan-commitment.prisma +21 -21
- package/prisma/applicants/mortgage-commitment.prisma +42 -29
- package/prisma/migrations/20250513170654_update_mortgage_commitment_schema/migration.sql +89 -0
- package/prisma/migrations/20250513183558_update_loan_commitment_schema/migration.sql +33 -0
- package/prisma/migrations/20250513184341_update_loan_commitment_schema/migration.sql +4 -0
- package/prisma/schema.prisma +69 -54
- package/prisma/shared/lookup.prisma +8 -6
|
@@ -1,20 +1,29 @@
|
|
|
1
|
+
import { ApplicantEntity } from './applicant.entity';
|
|
2
|
+
import { LookupEntity } from '../shared/lookup.entity';
|
|
1
3
|
export declare class LoanCommitmentEntity {
|
|
2
4
|
id: string;
|
|
3
5
|
applicantId: string;
|
|
4
6
|
commitmentId: string;
|
|
5
|
-
commitmentTypeLid?: string;
|
|
6
7
|
lenderName: string;
|
|
7
|
-
loanTypeLid
|
|
8
|
-
securityDetails
|
|
9
|
-
purpose
|
|
10
|
-
doHaveSharedResponsibility
|
|
11
|
-
sharedMortgage
|
|
8
|
+
loanTypeLid?: string;
|
|
9
|
+
securityDetails?: string;
|
|
10
|
+
purpose: string;
|
|
11
|
+
doHaveSharedResponsibility?: boolean;
|
|
12
|
+
sharedMortgage?: string;
|
|
12
13
|
remainingTerm?: string;
|
|
13
14
|
startDate: string;
|
|
14
15
|
outstandingBalance: number;
|
|
15
16
|
monthlyPayment: number;
|
|
17
|
+
source?: string;
|
|
18
|
+
isSelected?: boolean;
|
|
19
|
+
loanRationale?: string;
|
|
16
20
|
createdAt: Date;
|
|
17
21
|
updatedAt: Date;
|
|
22
|
+
applicant?: ApplicantEntity;
|
|
23
|
+
loanType?: LookupEntity;
|
|
18
24
|
constructor(partial: Partial<LoanCommitmentEntity>);
|
|
25
|
+
get applicationId(): string | undefined;
|
|
26
|
+
get lendingType(): string | undefined;
|
|
27
|
+
get doHaveSharedResponsibilityDisplay(): string;
|
|
19
28
|
}
|
|
20
29
|
//# sourceMappingURL=loan-commitment.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loan-commitment.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/loan-commitment.entity.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAoB;IAC7B,EAAE,EAAG,MAAM,CAAC;IACZ,WAAW,EAAG,MAAM,CAAC;IACrB,YAAY,EAAG,MAAM,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"loan-commitment.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/loan-commitment.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,oBAAoB;IAC7B,EAAE,EAAG,MAAM,CAAC;IACZ,WAAW,EAAG,MAAM,CAAC;IACrB,YAAY,EAAG,MAAM,CAAC;IACtB,UAAU,EAAG,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,EAAG,MAAM,CAAC;IACjB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAG,MAAM,CAAC;IACnB,kBAAkB,EAAG,MAAM,CAAC;IAC5B,cAAc,EAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,QAAQ,CAAC,EAAE,YAAY,CAAC;gBAEZ,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAKlD,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,iCAAiC,IAAI,MAAM,CAE9C;CACJ"}
|
|
@@ -2,4 +2,14 @@ export class LoanCommitmentEntity {
|
|
|
2
2
|
constructor(partial) {
|
|
3
3
|
Object.assign(this, partial);
|
|
4
4
|
}
|
|
5
|
+
// Virtual properties from Mongoose model
|
|
6
|
+
get applicationId() {
|
|
7
|
+
return this.applicant?.applicationId;
|
|
8
|
+
}
|
|
9
|
+
get lendingType() {
|
|
10
|
+
return this.applicant?.application?.lendingType?.name;
|
|
11
|
+
}
|
|
12
|
+
get doHaveSharedResponsibilityDisplay() {
|
|
13
|
+
return this.doHaveSharedResponsibility ? "Yes" : "No";
|
|
14
|
+
}
|
|
5
15
|
}
|
|
@@ -3,32 +3,49 @@ import { LookupEntity } from '../shared/lookup.entity';
|
|
|
3
3
|
export declare class MortgageCommitmentEntity {
|
|
4
4
|
id: string;
|
|
5
5
|
applicantId: string;
|
|
6
|
-
lenderName: string;
|
|
7
|
-
propertyValue: number;
|
|
8
|
-
repaymentTypeLid: string;
|
|
9
|
-
mortgageTypeLid?: string;
|
|
10
|
-
fixedTerm: string;
|
|
11
|
-
originalLoanAmount: number;
|
|
12
|
-
outstandingBalance: number;
|
|
13
|
-
startDate: string;
|
|
14
|
-
monthlyPayment: number;
|
|
15
6
|
commitmentId: string;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
7
|
+
lenderName?: string;
|
|
8
|
+
propertyValue?: number;
|
|
9
|
+
repaymentTypeLid?: string;
|
|
10
|
+
mortgageTypeLid?: string;
|
|
11
|
+
fixedTerm?: string;
|
|
12
|
+
originalLoanAmount?: number;
|
|
13
|
+
outstandingBalance?: number;
|
|
14
|
+
startDate?: string;
|
|
15
|
+
monthlyPayment?: number;
|
|
16
|
+
furtherAdvances?: boolean;
|
|
17
|
+
furtherAdvanceDetails?: string;
|
|
18
|
+
accountUptoDate?: boolean;
|
|
19
|
+
accountUptoDateFailDetails?: string;
|
|
20
|
+
accountInArrears?: boolean;
|
|
21
|
+
accountInArrearsDetails?: string;
|
|
22
|
+
doHaveSharedResponsibility?: boolean;
|
|
23
|
+
sharedMortgage?: string;
|
|
24
|
+
source?: string;
|
|
25
|
+
isSelected?: boolean;
|
|
26
|
+
mortgageHPPRationale?: string;
|
|
27
|
+
financeTypeHppLid?: string;
|
|
28
|
+
hppRepaymentTypeLid?: string;
|
|
29
|
+
mortgageRate?: number;
|
|
30
|
+
financeHomeTypeLid?: string;
|
|
31
|
+
remainingTermMonth?: number;
|
|
32
|
+
chargeTypeLid?: string;
|
|
33
|
+
securityDetails?: string;
|
|
34
|
+
purpose?: string;
|
|
35
|
+
remainingTerm?: string;
|
|
25
36
|
createdAt: Date;
|
|
26
37
|
updatedAt: Date;
|
|
27
38
|
applicant?: ApplicantEntity;
|
|
28
39
|
repaymentType?: LookupEntity;
|
|
29
40
|
mortgageType?: LookupEntity;
|
|
30
|
-
|
|
41
|
+
financeTypeHpp?: LookupEntity;
|
|
42
|
+
hppRepaymentType?: LookupEntity;
|
|
43
|
+
financeHomeType?: LookupEntity;
|
|
44
|
+
chargeType?: LookupEntity;
|
|
31
45
|
constructor(partial: Partial<MortgageCommitmentEntity>);
|
|
46
|
+
get applicationId(): string | undefined;
|
|
47
|
+
get lendingType(): string | undefined;
|
|
48
|
+
get applicationType(): string | undefined;
|
|
32
49
|
get furtherAdvancesDisplay(): string;
|
|
33
50
|
get accountUptoDateDisplay(): string;
|
|
34
51
|
get accountInArrearsDisplay(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mortgage-commitment.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/mortgage-commitment.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,wBAAwB;IACjC,EAAE,EAAG,MAAM,CAAC;IACZ,WAAW,EAAG,MAAM,CAAC;IACrB,
|
|
1
|
+
{"version":3,"file":"mortgage-commitment.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/mortgage-commitment.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,wBAAwB;IACjC,EAAE,EAAG,MAAM,CAAC;IACZ,WAAW,EAAG,MAAM,CAAC;IACrB,YAAY,EAAG,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,gBAAgB,CAAC,EAAE,YAAY,CAAC;IAChC,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,UAAU,CAAC,EAAE,YAAY,CAAC;gBAEd,OAAO,EAAE,OAAO,CAAC,wBAAwB,CAAC;IAKtD,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED,IAAI,eAAe,IAAI,MAAM,GAAG,SAAS,CAExC;IAED,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED,IAAI,sBAAsB,IAAI,MAAM,CAEnC;IAED,IAAI,uBAAuB,IAAI,MAAM,CAEpC;IAED,IAAI,iCAAiC,IAAI,MAAM,CAE9C;CACJ"}
|
|
@@ -2,8 +2,16 @@ export class MortgageCommitmentEntity {
|
|
|
2
2
|
constructor(partial) {
|
|
3
3
|
Object.assign(this, partial);
|
|
4
4
|
}
|
|
5
|
-
// Virtual
|
|
6
|
-
|
|
5
|
+
// Virtual properties from Mongoose model
|
|
6
|
+
get applicationId() {
|
|
7
|
+
return this.applicant?.applicationId;
|
|
8
|
+
}
|
|
9
|
+
get lendingType() {
|
|
10
|
+
return this.applicant?.application?.lendingType?.name;
|
|
11
|
+
}
|
|
12
|
+
get applicationType() {
|
|
13
|
+
return this.applicant?.application?.applicationType?.name;
|
|
14
|
+
}
|
|
7
15
|
get furtherAdvancesDisplay() {
|
|
8
16
|
return this.furtherAdvances ? "Yes" : "No";
|
|
9
17
|
}
|
|
@@ -1,24 +1,44 @@
|
|
|
1
|
+
import { ApplicantEntity } from './applicant.entity';
|
|
2
|
+
import { LookupEntity } from '../shared/lookup.entity';
|
|
3
|
+
|
|
1
4
|
export class LoanCommitmentEntity {
|
|
2
5
|
id!: string;
|
|
3
6
|
applicantId!: string;
|
|
4
7
|
commitmentId!: string;
|
|
5
|
-
commitmentTypeLid?: string;
|
|
6
8
|
lenderName!: string;
|
|
7
|
-
loanTypeLid
|
|
8
|
-
securityDetails
|
|
9
|
-
purpose
|
|
10
|
-
doHaveSharedResponsibility
|
|
11
|
-
sharedMortgage
|
|
9
|
+
loanTypeLid?: string;
|
|
10
|
+
securityDetails?: string;
|
|
11
|
+
purpose!: string;
|
|
12
|
+
doHaveSharedResponsibility?: boolean;
|
|
13
|
+
sharedMortgage?: string;
|
|
12
14
|
remainingTerm?: string;
|
|
13
15
|
startDate!: string;
|
|
14
16
|
outstandingBalance!: number;
|
|
15
17
|
monthlyPayment!: number;
|
|
18
|
+
source?: string;
|
|
19
|
+
isSelected?: boolean;
|
|
20
|
+
loanRationale?: string;
|
|
16
21
|
createdAt!: Date;
|
|
17
22
|
updatedAt!: Date;
|
|
18
23
|
|
|
24
|
+
// Relations
|
|
25
|
+
applicant?: ApplicantEntity;
|
|
26
|
+
loanType?: LookupEntity; // Relation field for loanType
|
|
27
|
+
|
|
19
28
|
constructor(partial: Partial<LoanCommitmentEntity>) {
|
|
20
29
|
Object.assign(this, partial);
|
|
21
30
|
}
|
|
22
31
|
|
|
23
|
-
//
|
|
24
|
-
|
|
32
|
+
// Virtual properties from Mongoose model
|
|
33
|
+
get applicationId(): string | undefined {
|
|
34
|
+
return this.applicant?.applicationId;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
get lendingType(): string | undefined {
|
|
38
|
+
return this.applicant?.application?.lendingType?.name;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get doHaveSharedResponsibilityDisplay(): string {
|
|
42
|
+
return this.doHaveSharedResponsibility ? "Yes" : "No";
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -4,25 +4,36 @@ import { LookupEntity } from '../shared/lookup.entity';
|
|
|
4
4
|
export class MortgageCommitmentEntity {
|
|
5
5
|
id!: string;
|
|
6
6
|
applicantId!: string;
|
|
7
|
-
lenderName!: string;
|
|
8
|
-
propertyValue!: number;
|
|
9
|
-
repaymentTypeLid!: string;
|
|
10
|
-
mortgageTypeLid?: string;
|
|
11
|
-
fixedTerm!: string;
|
|
12
|
-
originalLoanAmount!: number;
|
|
13
|
-
outstandingBalance!: number;
|
|
14
|
-
startDate!: string;
|
|
15
|
-
monthlyPayment!: number;
|
|
16
7
|
commitmentId!: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
lenderName?: string;
|
|
9
|
+
propertyValue?: number;
|
|
10
|
+
repaymentTypeLid?: string;
|
|
11
|
+
mortgageTypeLid?: string;
|
|
12
|
+
fixedTerm?: string;
|
|
13
|
+
originalLoanAmount?: number;
|
|
14
|
+
outstandingBalance?: number;
|
|
15
|
+
startDate?: string;
|
|
16
|
+
monthlyPayment?: number;
|
|
17
|
+
furtherAdvances?: boolean;
|
|
18
|
+
furtherAdvanceDetails?: string;
|
|
19
|
+
accountUptoDate?: boolean;
|
|
20
|
+
accountUptoDateFailDetails?: string;
|
|
21
|
+
accountInArrears?: boolean;
|
|
22
|
+
accountInArrearsDetails?: string;
|
|
23
|
+
doHaveSharedResponsibility?: boolean;
|
|
24
|
+
sharedMortgage?: string;
|
|
25
|
+
source?: string;
|
|
26
|
+
isSelected?: boolean;
|
|
27
|
+
mortgageHPPRationale?: string;
|
|
28
|
+
financeTypeHppLid?: string;
|
|
29
|
+
hppRepaymentTypeLid?: string;
|
|
30
|
+
mortgageRate?: number;
|
|
31
|
+
financeHomeTypeLid?: string;
|
|
32
|
+
remainingTermMonth?: number;
|
|
33
|
+
chargeTypeLid?: string;
|
|
34
|
+
securityDetails?: string;
|
|
35
|
+
purpose?: string;
|
|
36
|
+
remainingTerm?: string;
|
|
26
37
|
createdAt!: Date;
|
|
27
38
|
updatedAt!: Date;
|
|
28
39
|
|
|
@@ -30,14 +41,28 @@ export class MortgageCommitmentEntity {
|
|
|
30
41
|
applicant?: ApplicantEntity;
|
|
31
42
|
repaymentType?: LookupEntity;
|
|
32
43
|
mortgageType?: LookupEntity;
|
|
33
|
-
|
|
44
|
+
financeTypeHpp?: LookupEntity;
|
|
45
|
+
hppRepaymentType?: LookupEntity;
|
|
46
|
+
financeHomeType?: LookupEntity;
|
|
47
|
+
chargeType?: LookupEntity;
|
|
34
48
|
|
|
35
49
|
constructor(partial: Partial<MortgageCommitmentEntity>) {
|
|
36
50
|
Object.assign(this, partial);
|
|
37
51
|
}
|
|
38
52
|
|
|
39
|
-
// Virtual
|
|
40
|
-
|
|
53
|
+
// Virtual properties from Mongoose model
|
|
54
|
+
get applicationId(): string | undefined {
|
|
55
|
+
return this.applicant?.applicationId;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
get lendingType(): string | undefined {
|
|
59
|
+
return this.applicant?.application?.lendingType?.name;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get applicationType(): string | undefined {
|
|
63
|
+
return this.applicant?.application?.applicationType?.name;
|
|
64
|
+
}
|
|
65
|
+
|
|
41
66
|
get furtherAdvancesDisplay(): string {
|
|
42
67
|
return this.furtherAdvances ? "Yes" : "No";
|
|
43
68
|
}
|
|
@@ -53,4 +78,4 @@ export class MortgageCommitmentEntity {
|
|
|
53
78
|
get doHaveSharedResponsibilityDisplay(): string {
|
|
54
79
|
return this.doHaveSharedResponsibility ? "Yes" : "No";
|
|
55
80
|
}
|
|
56
|
-
}
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
model LoanCommitment {
|
|
2
|
-
id
|
|
3
|
-
applicantId
|
|
4
|
-
commitmentId
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicantId String @map("applicant_id")
|
|
4
|
+
commitmentId String @unique @map("commitment_id")
|
|
5
|
+
lenderName String @map("lender_name")
|
|
6
|
+
loanTypeLid String? @map("loan_type_lid")
|
|
7
|
+
securityDetails String? @map("security_details")
|
|
8
|
+
purpose String @map("purpose")
|
|
9
|
+
doHaveSharedResponsibility Boolean? @map("do_have_shared_responsibility")
|
|
10
|
+
sharedMortgage String? @map("shared_mortgage")
|
|
11
|
+
remainingTerm String? @map("remaining_term")
|
|
12
|
+
startDate String @map("start_date")
|
|
13
|
+
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
14
|
+
monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
|
|
15
|
+
source String? @default("Broker") @map("source")
|
|
16
|
+
isSelected Boolean? @default(true) @map("is_selected")
|
|
17
|
+
loanRationale String? @default("") @map("loan_rationale")
|
|
18
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
19
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
19
20
|
|
|
20
21
|
// Relations
|
|
21
|
-
applicant
|
|
22
|
-
|
|
23
|
-
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
22
|
+
applicant Applicant @relation("ApplicantLoanCommitments", fields: [applicantId], references: [id])
|
|
23
|
+
loanType Lookup? @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
24
24
|
|
|
25
25
|
@@map("applicant_loan_commitments")
|
|
26
|
-
}
|
|
26
|
+
}
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
model MortgageCommitment {
|
|
2
|
-
id
|
|
3
|
-
applicantId
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicantId String @map("applicant_id")
|
|
4
|
+
commitmentId String @unique @map("commitment_id")
|
|
5
|
+
lenderName String? @map("lender_name")
|
|
6
|
+
propertyValue Decimal? @map("property_value") @db.Decimal(10, 2)
|
|
7
|
+
repaymentTypeLid String? @map("repayment_type_lid")
|
|
8
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
9
|
+
fixedTerm String? @map("fixed_term")
|
|
10
|
+
originalLoanAmount Decimal? @map("original_loan_amount") @db.Decimal(10, 2)
|
|
11
|
+
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
12
|
+
startDate String? @map("start_date")
|
|
13
|
+
monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
|
|
14
|
+
furtherAdvances Boolean? @map("further_advances")
|
|
15
|
+
furtherAdvanceDetails String? @map("further_advance_details")
|
|
16
|
+
accountUptoDate Boolean? @map("account_upto_date")
|
|
17
|
+
accountUptoDateFailDetails String? @map("account_upto_date_fail_details")
|
|
18
|
+
accountInArrears Boolean? @map("account_in_arrears")
|
|
19
|
+
accountInArrearsDetails String? @map("account_in_arrears_details")
|
|
20
|
+
doHaveSharedResponsibility Boolean? @map("do_have_shared_responsibility")
|
|
21
|
+
sharedMortgage String? @map("shared_mortgage")
|
|
22
|
+
source String? @default("Broker") @map("source")
|
|
23
|
+
isSelected Boolean? @default(true) @map("is_selected")
|
|
24
|
+
mortgageHPPRationale String? @default("") @map("mortgage_hpp_rationale")
|
|
25
|
+
financeTypeHppLid String? @map("finance_type_hpp_lid")
|
|
26
|
+
hppRepaymentTypeLid String? @map("hpp_repayment_type_lid")
|
|
27
|
+
mortgageRate Float? @map("mortgage_rate")
|
|
28
|
+
financeHomeTypeLid String? @map("finance_home_type_lid")
|
|
29
|
+
remainingTermMonth Int? @map("remaining_term_month")
|
|
30
|
+
chargeTypeLid String? @map("charge_type_lid")
|
|
31
|
+
securityDetails String? @map("security_details")
|
|
32
|
+
purpose String? @map("purpose")
|
|
33
|
+
remainingTerm String? @map("remaining_term")
|
|
34
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
35
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
26
36
|
|
|
27
37
|
// Relations
|
|
28
|
-
applicant
|
|
29
|
-
repaymentType
|
|
30
|
-
mortgageType
|
|
31
|
-
|
|
38
|
+
applicant Applicant @relation("ApplicantMortgageCommitments", fields: [applicantId], references: [id])
|
|
39
|
+
repaymentType Lookup? @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
40
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
41
|
+
financeTypeHpp Lookup? @relation("FinanceTypeHpp", fields: [financeTypeHppLid], references: [id])
|
|
42
|
+
hppRepaymentType Lookup? @relation("HppRepaymentType", fields: [hppRepaymentTypeLid], references: [id])
|
|
43
|
+
financeHomeType Lookup? @relation("FinanceHomeType", fields: [financeHomeTypeLid], references: [id])
|
|
44
|
+
chargeType Lookup? @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
32
45
|
|
|
33
46
|
@@map("applicant_mortgage_commitments")
|
|
34
|
-
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `accountInArrears` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `accountInArrearsDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to drop the column `accountUptoDate` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
7
|
+
- You are about to drop the column `accountUptoDateFailDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
8
|
+
- You are about to drop the column `commitment_type_lid` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
9
|
+
- You are about to drop the column `doHaveSharedResponsibility` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
10
|
+
- You are about to drop the column `fixedTerm` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
11
|
+
- You are about to drop the column `furtherAdvanceDetails` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
12
|
+
- You are about to drop the column `furtherAdvances` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
13
|
+
- You are about to drop the column `joint_names` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
14
|
+
- You are about to drop the column `originalLoanAmount` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
15
|
+
- You are about to drop the column `sharedMortgage` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
16
|
+
- You are about to drop the column `startDate` on the `applicant_mortgage_commitments` table. All the data in the column will be lost.
|
|
17
|
+
- You are about to alter the column `property_value` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
18
|
+
- You are about to alter the column `outstanding_balance` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
19
|
+
- You are about to alter the column `monthly_payment` on the `applicant_mortgage_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
20
|
+
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_mortgage_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
-- DropForeignKey
|
|
24
|
+
ALTER TABLE "applicant_mortgage_commitments" DROP CONSTRAINT "applicant_mortgage_commitments_commitment_type_lid_fkey";
|
|
25
|
+
|
|
26
|
+
-- DropForeignKey
|
|
27
|
+
ALTER TABLE "applicant_mortgage_commitments" DROP CONSTRAINT "applicant_mortgage_commitments_repayment_type_lid_fkey";
|
|
28
|
+
|
|
29
|
+
-- AlterTable
|
|
30
|
+
ALTER TABLE "applicant_mortgage_commitments" DROP COLUMN "accountInArrears",
|
|
31
|
+
DROP COLUMN "accountInArrearsDetails",
|
|
32
|
+
DROP COLUMN "accountUptoDate",
|
|
33
|
+
DROP COLUMN "accountUptoDateFailDetails",
|
|
34
|
+
DROP COLUMN "commitment_type_lid",
|
|
35
|
+
DROP COLUMN "doHaveSharedResponsibility",
|
|
36
|
+
DROP COLUMN "fixedTerm",
|
|
37
|
+
DROP COLUMN "furtherAdvanceDetails",
|
|
38
|
+
DROP COLUMN "furtherAdvances",
|
|
39
|
+
DROP COLUMN "joint_names",
|
|
40
|
+
DROP COLUMN "originalLoanAmount",
|
|
41
|
+
DROP COLUMN "sharedMortgage",
|
|
42
|
+
DROP COLUMN "startDate",
|
|
43
|
+
ADD COLUMN "account_in_arrears" BOOLEAN,
|
|
44
|
+
ADD COLUMN "account_in_arrears_details" TEXT,
|
|
45
|
+
ADD COLUMN "account_upto_date" BOOLEAN,
|
|
46
|
+
ADD COLUMN "account_upto_date_fail_details" TEXT,
|
|
47
|
+
ADD COLUMN "charge_type_lid" TEXT,
|
|
48
|
+
ADD COLUMN "do_have_shared_responsibility" BOOLEAN,
|
|
49
|
+
ADD COLUMN "finance_home_type_lid" TEXT,
|
|
50
|
+
ADD COLUMN "finance_type_hpp_lid" TEXT,
|
|
51
|
+
ADD COLUMN "fixed_term" TEXT,
|
|
52
|
+
ADD COLUMN "further_advance_details" TEXT,
|
|
53
|
+
ADD COLUMN "further_advances" BOOLEAN,
|
|
54
|
+
ADD COLUMN "hpp_repayment_type_lid" TEXT,
|
|
55
|
+
ADD COLUMN "is_selected" BOOLEAN DEFAULT true,
|
|
56
|
+
ADD COLUMN "mortgage_hpp_rationale" TEXT DEFAULT '',
|
|
57
|
+
ADD COLUMN "mortgage_rate" DOUBLE PRECISION,
|
|
58
|
+
ADD COLUMN "original_loan_amount" DECIMAL(10,2),
|
|
59
|
+
ADD COLUMN "purpose" TEXT,
|
|
60
|
+
ADD COLUMN "remaining_term" TEXT,
|
|
61
|
+
ADD COLUMN "remaining_term_month" INTEGER,
|
|
62
|
+
ADD COLUMN "security_details" TEXT,
|
|
63
|
+
ADD COLUMN "shared_mortgage" TEXT,
|
|
64
|
+
ADD COLUMN "source" TEXT DEFAULT 'Broker',
|
|
65
|
+
ADD COLUMN "start_date" TEXT,
|
|
66
|
+
ALTER COLUMN "lender_name" DROP NOT NULL,
|
|
67
|
+
ALTER COLUMN "property_value" DROP NOT NULL,
|
|
68
|
+
ALTER COLUMN "property_value" SET DATA TYPE DECIMAL(10,2),
|
|
69
|
+
ALTER COLUMN "repayment_type_lid" DROP NOT NULL,
|
|
70
|
+
ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
|
|
71
|
+
ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2);
|
|
72
|
+
|
|
73
|
+
-- CreateIndex
|
|
74
|
+
CREATE UNIQUE INDEX "applicant_mortgage_commitments_commitment_id_key" ON "applicant_mortgage_commitments"("commitment_id");
|
|
75
|
+
|
|
76
|
+
-- AddForeignKey
|
|
77
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_repayment_type_lid_fkey" FOREIGN KEY ("repayment_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
78
|
+
|
|
79
|
+
-- AddForeignKey
|
|
80
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_finance_type_hpp_lid_fkey" FOREIGN KEY ("finance_type_hpp_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
81
|
+
|
|
82
|
+
-- AddForeignKey
|
|
83
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_hpp_repayment_type_lid_fkey" FOREIGN KEY ("hpp_repayment_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
84
|
+
|
|
85
|
+
-- AddForeignKey
|
|
86
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_finance_home_type_lid_fkey" FOREIGN KEY ("finance_home_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
87
|
+
|
|
88
|
+
-- AddForeignKey
|
|
89
|
+
ALTER TABLE "applicant_mortgage_commitments" ADD CONSTRAINT "applicant_mortgage_commitments_charge_type_lid_fkey" FOREIGN KEY ("charge_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `commitment_type_lid` on the `applicant_loan_commitments` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `joint_names` on the `applicant_loan_commitments` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to alter the column `outstanding_balance` on the `applicant_loan_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
7
|
+
- You are about to alter the column `monthly_payment` on the `applicant_loan_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
8
|
+
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_loan_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
9
|
+
- Made the column `purpose` on table `applicant_loan_commitments` required. This step will fail if there are existing NULL values in that column.
|
|
10
|
+
|
|
11
|
+
*/
|
|
12
|
+
-- DropForeignKey
|
|
13
|
+
ALTER TABLE "applicant_loan_commitments" DROP CONSTRAINT "applicant_loan_commitments_commitment_type_lid_fkey";
|
|
14
|
+
|
|
15
|
+
-- DropForeignKey
|
|
16
|
+
ALTER TABLE "applicant_loan_commitments" DROP CONSTRAINT "applicant_loan_commitments_loan_type_lid_fkey";
|
|
17
|
+
|
|
18
|
+
-- AlterTable
|
|
19
|
+
ALTER TABLE "applicant_loan_commitments" DROP COLUMN "commitment_type_lid",
|
|
20
|
+
DROP COLUMN "joint_names",
|
|
21
|
+
ALTER COLUMN "loan_type_lid" DROP NOT NULL,
|
|
22
|
+
ALTER COLUMN "security_details" DROP NOT NULL,
|
|
23
|
+
ALTER COLUMN "purpose" SET NOT NULL,
|
|
24
|
+
ALTER COLUMN "do_have_shared_responsibility" DROP NOT NULL,
|
|
25
|
+
ALTER COLUMN "shared_mortgage" DROP NOT NULL,
|
|
26
|
+
ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
|
|
27
|
+
ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2);
|
|
28
|
+
|
|
29
|
+
-- CreateIndex
|
|
30
|
+
CREATE UNIQUE INDEX "applicant_loan_commitments_commitment_id_key" ON "applicant_loan_commitments"("commitment_id");
|
|
31
|
+
|
|
32
|
+
-- AddForeignKey
|
|
33
|
+
ALTER TABLE "applicant_loan_commitments" ADD CONSTRAINT "applicant_loan_commitments_loan_type_lid_fkey" FOREIGN KEY ("loan_type_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -202,9 +202,12 @@ model Lookup {
|
|
|
202
202
|
propertyType_securities Security[] @relation("PropertyType")
|
|
203
203
|
|
|
204
204
|
// MortgageCommitment Relations
|
|
205
|
-
repaymentType_mortgageCommitments
|
|
206
|
-
mortgageType_mortgageCommitments
|
|
207
|
-
|
|
205
|
+
repaymentType_mortgageCommitments MortgageCommitment[] @relation("RepaymentType")
|
|
206
|
+
mortgageType_mortgageCommitments MortgageCommitment[] @relation("MortgageType")
|
|
207
|
+
financeTypeHpp_mortgageCommitments MortgageCommitment[] @relation("FinanceTypeHpp")
|
|
208
|
+
hppRepaymentType_mortgageCommitments MortgageCommitment[] @relation("HppRepaymentType")
|
|
209
|
+
financeHomeType_mortgageCommitments MortgageCommitment[] @relation("FinanceHomeType")
|
|
210
|
+
chargeType_mortgageCommitments MortgageCommitment[] @relation("ChargeType")
|
|
208
211
|
|
|
209
212
|
// OtherIncome Relations
|
|
210
213
|
payFrequency1_otherIncomes ApplicantOtherIncome[] @relation("PayFrequency1")
|
|
@@ -220,8 +223,7 @@ model Lookup {
|
|
|
220
223
|
registeredCountry_incomes ApplicantIncome[] @relation("RegisteredCountry")
|
|
221
224
|
|
|
222
225
|
// LoanCommitment Relations
|
|
223
|
-
|
|
224
|
-
loanType_loanCommitments LoanCommitment[] @relation("LoanType")
|
|
226
|
+
loanType_loanCommitments LoanCommitment[] @relation("LoanType")
|
|
225
227
|
|
|
226
228
|
// Applicant Relations
|
|
227
229
|
addressCountry_applicants Applicant[] @relation("AddressCountry")
|
|
@@ -247,7 +249,7 @@ model Lookup {
|
|
|
247
249
|
|
|
248
250
|
// CreditCardCommitment Relations
|
|
249
251
|
// commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
250
|
-
repaymentType_creditCardCommitments
|
|
252
|
+
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
251
253
|
|
|
252
254
|
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
253
255
|
incomeSourceEmploymentStatus ApplicantIncomeSource[] @relation("IncomeSourceEmploymentStatus")
|
|
@@ -923,64 +925,77 @@ model CreditCardCommitment {
|
|
|
923
925
|
|
|
924
926
|
// From prisma/applicants/loan-commitment.prisma
|
|
925
927
|
model LoanCommitment {
|
|
926
|
-
id
|
|
927
|
-
applicantId
|
|
928
|
-
commitmentId
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
928
|
+
id String @id @default(uuid())
|
|
929
|
+
applicantId String @map("applicant_id")
|
|
930
|
+
commitmentId String @unique @map("commitment_id")
|
|
931
|
+
lenderName String @map("lender_name")
|
|
932
|
+
loanTypeLid String? @map("loan_type_lid")
|
|
933
|
+
securityDetails String? @map("security_details")
|
|
934
|
+
purpose String @map("purpose")
|
|
935
|
+
doHaveSharedResponsibility Boolean? @map("do_have_shared_responsibility")
|
|
936
|
+
sharedMortgage String? @map("shared_mortgage")
|
|
937
|
+
remainingTerm String? @map("remaining_term")
|
|
938
|
+
startDate String @map("start_date")
|
|
939
|
+
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
940
|
+
monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
|
|
941
|
+
source String? @default("Broker") @map("source")
|
|
942
|
+
isSelected Boolean? @default(true) @map("is_selected")
|
|
943
|
+
loanRationale String? @default("") @map("loan_rationale")
|
|
944
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
945
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
943
946
|
|
|
944
947
|
// Relations
|
|
945
|
-
applicant
|
|
946
|
-
|
|
947
|
-
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
948
|
+
applicant Applicant @relation("ApplicantLoanCommitments", fields: [applicantId], references: [id])
|
|
949
|
+
loanType Lookup? @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
948
950
|
|
|
949
951
|
@@map("applicant_loan_commitments")
|
|
950
952
|
}
|
|
951
953
|
|
|
952
954
|
// From prisma/applicants/mortgage-commitment.prisma
|
|
953
955
|
model MortgageCommitment {
|
|
954
|
-
id
|
|
955
|
-
applicantId
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
956
|
+
id String @id @default(uuid())
|
|
957
|
+
applicantId String @map("applicant_id")
|
|
958
|
+
commitmentId String @unique @map("commitment_id")
|
|
959
|
+
lenderName String? @map("lender_name")
|
|
960
|
+
propertyValue Decimal? @map("property_value") @db.Decimal(10, 2)
|
|
961
|
+
repaymentTypeLid String? @map("repayment_type_lid")
|
|
962
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
963
|
+
fixedTerm String? @map("fixed_term")
|
|
964
|
+
originalLoanAmount Decimal? @map("original_loan_amount") @db.Decimal(10, 2)
|
|
965
|
+
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
966
|
+
startDate String? @map("start_date")
|
|
967
|
+
monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
|
|
968
|
+
furtherAdvances Boolean? @map("further_advances")
|
|
969
|
+
furtherAdvanceDetails String? @map("further_advance_details")
|
|
970
|
+
accountUptoDate Boolean? @map("account_upto_date")
|
|
971
|
+
accountUptoDateFailDetails String? @map("account_upto_date_fail_details")
|
|
972
|
+
accountInArrears Boolean? @map("account_in_arrears")
|
|
973
|
+
accountInArrearsDetails String? @map("account_in_arrears_details")
|
|
974
|
+
doHaveSharedResponsibility Boolean? @map("do_have_shared_responsibility")
|
|
975
|
+
sharedMortgage String? @map("shared_mortgage")
|
|
976
|
+
source String? @default("Broker") @map("source")
|
|
977
|
+
isSelected Boolean? @default(true) @map("is_selected")
|
|
978
|
+
mortgageHPPRationale String? @default("") @map("mortgage_hpp_rationale")
|
|
979
|
+
financeTypeHppLid String? @map("finance_type_hpp_lid")
|
|
980
|
+
hppRepaymentTypeLid String? @map("hpp_repayment_type_lid")
|
|
981
|
+
mortgageRate Float? @map("mortgage_rate")
|
|
982
|
+
financeHomeTypeLid String? @map("finance_home_type_lid")
|
|
983
|
+
remainingTermMonth Int? @map("remaining_term_month")
|
|
984
|
+
chargeTypeLid String? @map("charge_type_lid")
|
|
985
|
+
securityDetails String? @map("security_details")
|
|
986
|
+
purpose String? @map("purpose")
|
|
987
|
+
remainingTerm String? @map("remaining_term")
|
|
988
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
989
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
978
990
|
|
|
979
991
|
// Relations
|
|
980
|
-
applicant
|
|
981
|
-
repaymentType
|
|
982
|
-
mortgageType
|
|
983
|
-
|
|
992
|
+
applicant Applicant @relation("ApplicantMortgageCommitments", fields: [applicantId], references: [id])
|
|
993
|
+
repaymentType Lookup? @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
994
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
995
|
+
financeTypeHpp Lookup? @relation("FinanceTypeHpp", fields: [financeTypeHppLid], references: [id])
|
|
996
|
+
hppRepaymentType Lookup? @relation("HppRepaymentType", fields: [hppRepaymentTypeLid], references: [id])
|
|
997
|
+
financeHomeType Lookup? @relation("FinanceHomeType", fields: [financeHomeTypeLid], references: [id])
|
|
998
|
+
chargeType Lookup? @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
984
999
|
|
|
985
1000
|
@@map("applicant_mortgage_commitments")
|
|
986
1001
|
}
|
|
@@ -81,9 +81,12 @@ model Lookup {
|
|
|
81
81
|
propertyType_securities Security[] @relation("PropertyType")
|
|
82
82
|
|
|
83
83
|
// MortgageCommitment Relations
|
|
84
|
-
repaymentType_mortgageCommitments
|
|
85
|
-
mortgageType_mortgageCommitments
|
|
86
|
-
|
|
84
|
+
repaymentType_mortgageCommitments MortgageCommitment[] @relation("RepaymentType")
|
|
85
|
+
mortgageType_mortgageCommitments MortgageCommitment[] @relation("MortgageType")
|
|
86
|
+
financeTypeHpp_mortgageCommitments MortgageCommitment[] @relation("FinanceTypeHpp")
|
|
87
|
+
hppRepaymentType_mortgageCommitments MortgageCommitment[] @relation("HppRepaymentType")
|
|
88
|
+
financeHomeType_mortgageCommitments MortgageCommitment[] @relation("FinanceHomeType")
|
|
89
|
+
chargeType_mortgageCommitments MortgageCommitment[] @relation("ChargeType")
|
|
87
90
|
|
|
88
91
|
// OtherIncome Relations
|
|
89
92
|
payFrequency1_otherIncomes ApplicantOtherIncome[] @relation("PayFrequency1")
|
|
@@ -99,8 +102,7 @@ model Lookup {
|
|
|
99
102
|
registeredCountry_incomes ApplicantIncome[] @relation("RegisteredCountry")
|
|
100
103
|
|
|
101
104
|
// LoanCommitment Relations
|
|
102
|
-
|
|
103
|
-
loanType_loanCommitments LoanCommitment[] @relation("LoanType")
|
|
105
|
+
loanType_loanCommitments LoanCommitment[] @relation("LoanType")
|
|
104
106
|
|
|
105
107
|
// Applicant Relations
|
|
106
108
|
addressCountry_applicants Applicant[] @relation("AddressCountry")
|
|
@@ -126,7 +128,7 @@ model Lookup {
|
|
|
126
128
|
|
|
127
129
|
// CreditCardCommitment Relations
|
|
128
130
|
// commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
129
|
-
repaymentType_creditCardCommitments
|
|
131
|
+
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
130
132
|
|
|
131
133
|
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
132
134
|
incomeSourceEmploymentStatus ApplicantIncomeSource[] @relation("IncomeSourceEmploymentStatus")
|