@dynamatix/gb-schemas 2.0.37 → 2.0.39
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/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/mortgage-commitment.entity.ts +47 -22
- package/package.json +1 -1
- package/prisma/applicants/credit-card-commitment.prisma +1 -1
- package/prisma/applicants/mortgage-commitment.prisma +42 -29
- package/prisma/migrations/20250513143530_update_credit_card_commitment_schema/migration.sql +8 -0
- package/prisma/migrations/20250513170654_update_mortgage_commitment_schema/migration.sql +89 -0
- package/prisma/schema.prisma +233 -217
- package/prisma/shared/lookup.prisma +7 -4
|
@@ -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
|
}
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
model CreditCardCommitment {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
applicantId String @map("applicant_id")
|
|
4
|
-
commitmentId String @map("commitment_id")
|
|
4
|
+
commitmentId String @unique @map("commitment_id")
|
|
5
5
|
lenderName String? @map("lender_name")
|
|
6
6
|
creditLimit Decimal @map("credit_limit") @db.Decimal(10, 2)
|
|
7
7
|
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
@@ -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,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[commitment_id]` on the table `applicant_creditcard_commitments` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- CreateIndex
|
|
8
|
+
CREATE UNIQUE INDEX "applicant_creditcard_commitments_commitment_id_key" ON "applicant_creditcard_commitments"("commitment_id");
|
|
@@ -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;
|
package/prisma/schema.prisma
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
// This is your Prisma schema file,
|
|
2
|
-
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
-
|
|
4
|
-
generator client {
|
|
5
|
-
provider = "prisma-client-js"
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
datasource db {
|
|
9
|
-
provider = "postgresql"
|
|
10
|
-
url = env("DATABASE_URL")
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// From prisma/shared/alert.prisma
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
datasource db {
|
|
9
|
+
provider = "postgresql"
|
|
10
|
+
url = env("DATABASE_URL")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// From prisma/shared/alert.prisma
|
|
17
17
|
model Alert {
|
|
18
18
|
id String @id @default(uuid())
|
|
19
19
|
title String
|
|
@@ -28,9 +28,9 @@ model Alert {
|
|
|
28
28
|
user User @relation("UserAlerts", fields: [userId], references: [id])
|
|
29
29
|
|
|
30
30
|
@@map("alerts")
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// From prisma/shared/apprivo-sync-journey.prisma
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// From prisma/shared/apprivo-sync-journey.prisma
|
|
34
34
|
model ApprivoSyncJourney {
|
|
35
35
|
id String @id @default(uuid())
|
|
36
36
|
applicationId String @map("application_id")
|
|
@@ -49,9 +49,9 @@ model ApprivoSyncJourney {
|
|
|
49
49
|
jobRun JobRun? @relation("Milestones", fields: [jobRunId], references: [id])
|
|
50
50
|
|
|
51
51
|
@@map("apprivo_sync_journeys")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// From prisma/shared/checklist.prisma
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// From prisma/shared/checklist.prisma
|
|
55
55
|
model Checklist {
|
|
56
56
|
id String @id @default(uuid())
|
|
57
57
|
name String
|
|
@@ -61,9 +61,9 @@ model Checklist {
|
|
|
61
61
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
62
62
|
|
|
63
63
|
@@map("checklists")
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// From prisma/shared/document-type.prisma
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// From prisma/shared/document-type.prisma
|
|
67
67
|
model DocumentType {
|
|
68
68
|
id String @id @default(uuid())
|
|
69
69
|
name String
|
|
@@ -72,9 +72,9 @@ model DocumentType {
|
|
|
72
72
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
73
73
|
|
|
74
74
|
@@map("document_types")
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// From prisma/shared/job-run.prisma
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// From prisma/shared/job-run.prisma
|
|
78
78
|
model JobRun {
|
|
79
79
|
id String @id @default(uuid())
|
|
80
80
|
jobName String @map("job_name")
|
|
@@ -89,9 +89,9 @@ model JobRun {
|
|
|
89
89
|
apprivoSyncJourneys ApprivoSyncJourney[] @relation("Milestones")
|
|
90
90
|
|
|
91
91
|
@@map("job_runs")
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// From prisma/shared/job-setting.prisma
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// From prisma/shared/job-setting.prisma
|
|
95
95
|
model JobSetting {
|
|
96
96
|
id String @id @default(uuid())
|
|
97
97
|
name String @map("name")
|
|
@@ -102,9 +102,9 @@ model JobSetting {
|
|
|
102
102
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
103
103
|
|
|
104
104
|
@@map("job_settings")
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// From prisma/shared/lookup-group.prisma
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// From prisma/shared/lookup-group.prisma
|
|
108
108
|
model LookupGroup {
|
|
109
109
|
id String @id @default(uuid())
|
|
110
110
|
name String
|
|
@@ -116,9 +116,9 @@ model LookupGroup {
|
|
|
116
116
|
lookups Lookup[] @relation("LookupToGroup")
|
|
117
117
|
|
|
118
118
|
@@map("lookup_groups")
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// From prisma/shared/lookup.prisma
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// From prisma/shared/lookup.prisma
|
|
122
122
|
model Lookup {
|
|
123
123
|
id String @id @default(uuid())
|
|
124
124
|
groupId String @map("group_id")
|
|
@@ -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")
|
|
@@ -247,7 +250,7 @@ model Lookup {
|
|
|
247
250
|
|
|
248
251
|
// CreditCardCommitment Relations
|
|
249
252
|
// commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
250
|
-
repaymentType_creditCardCommitments
|
|
253
|
+
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
251
254
|
|
|
252
255
|
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
253
256
|
incomeSourceEmploymentStatus ApplicantIncomeSource[] @relation("IncomeSourceEmploymentStatus")
|
|
@@ -262,9 +265,9 @@ model Lookup {
|
|
|
262
265
|
|
|
263
266
|
@@unique([groupId, value])
|
|
264
267
|
@@map("lookups")
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// From prisma/shared/system-parameter.prisma
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// From prisma/shared/system-parameter.prisma
|
|
268
271
|
model SystemParameter {
|
|
269
272
|
id String @id @default(uuid())
|
|
270
273
|
name String @unique
|
|
@@ -280,9 +283,9 @@ model SystemParameter {
|
|
|
280
283
|
updatedBy User? @relation("UpdatedByUser", fields: [updatedById], references: [id])
|
|
281
284
|
|
|
282
285
|
@@map("system_parameters")
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// From prisma/users/auth-log.prisma
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// From prisma/users/auth-log.prisma
|
|
286
289
|
model AuthLog {
|
|
287
290
|
id String @id @default(uuid())
|
|
288
291
|
userEmail String @map("user_email")
|
|
@@ -293,9 +296,9 @@ model AuthLog {
|
|
|
293
296
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
294
297
|
|
|
295
298
|
@@map("auth_logs")
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// From prisma/users/permission.prisma
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// From prisma/users/permission.prisma
|
|
299
302
|
model Permission {
|
|
300
303
|
id String @id @default(uuid())
|
|
301
304
|
name String
|
|
@@ -308,9 +311,9 @@ model Permission {
|
|
|
308
311
|
roles Role[]
|
|
309
312
|
|
|
310
313
|
@@map("permissions")
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// From prisma/users/role-group.prisma
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// From prisma/users/role-group.prisma
|
|
314
317
|
model RoleGroup {
|
|
315
318
|
id String @id @default(uuid())
|
|
316
319
|
groupId String @unique @map("group_id")
|
|
@@ -324,9 +327,9 @@ model RoleGroup {
|
|
|
324
327
|
users User[] @relation("UserToRoleGroup")
|
|
325
328
|
|
|
326
329
|
@@map("role_groups")
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// From prisma/users/role.prisma
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// From prisma/users/role.prisma
|
|
330
333
|
model Role {
|
|
331
334
|
id String @id @default(uuid())
|
|
332
335
|
roleId String @unique @map("role_id")
|
|
@@ -340,9 +343,9 @@ model Role {
|
|
|
340
343
|
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
341
344
|
|
|
342
345
|
@@map("roles")
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// From prisma/users/user.prisma
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
// From prisma/users/user.prisma
|
|
346
349
|
model User {
|
|
347
350
|
id String @id @default(uuid())
|
|
348
351
|
accountId String @unique @map("account_id")
|
|
@@ -386,9 +389,9 @@ model Claim {
|
|
|
386
389
|
user User @relation(fields: [userId], references: [id])
|
|
387
390
|
|
|
388
391
|
@@map("claims")
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
// From prisma/product-catalogues/product-catalogue.prisma
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// From prisma/product-catalogues/product-catalogue.prisma
|
|
392
395
|
model ProductCatalogue {
|
|
393
396
|
id String @id @default(uuid())
|
|
394
397
|
productCatalogueId String @map("product_catalogue_id")
|
|
@@ -410,9 +413,9 @@ model ProductCatalogue {
|
|
|
410
413
|
productVariants ProductVariant[]
|
|
411
414
|
|
|
412
415
|
@@map("product_catalogues")
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// From prisma/product-catalogues/product-definition.prisma
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// From prisma/product-catalogues/product-definition.prisma
|
|
416
419
|
model ProductDefinition {
|
|
417
420
|
id String @id @default(uuid())
|
|
418
421
|
productDefinitionId String @map("product_definition_id")
|
|
@@ -451,9 +454,9 @@ model Rule {
|
|
|
451
454
|
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
452
455
|
|
|
453
456
|
@@map("rules")
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
// From prisma/product-catalogues/product-variant.prisma
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
// From prisma/product-catalogues/product-variant.prisma
|
|
457
460
|
model ProductVariant {
|
|
458
461
|
id String @id @default(uuid())
|
|
459
462
|
productCatalogueId String @map("product_catalogue_id")
|
|
@@ -468,9 +471,9 @@ model ProductVariant {
|
|
|
468
471
|
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
469
472
|
|
|
470
473
|
@@map("product_variants")
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
// From prisma/product-catalogues/product.prisma
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
// From prisma/product-catalogues/product.prisma
|
|
474
477
|
model Product {
|
|
475
478
|
id String @id @default(uuid())
|
|
476
479
|
name String
|
|
@@ -480,9 +483,9 @@ model Product {
|
|
|
480
483
|
applications Application[] @relation("ApplicationProduct")
|
|
481
484
|
|
|
482
485
|
@@map("products")
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
// From prisma/applicants/applicant-credit-data.prisma
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// From prisma/applicants/applicant-credit-data.prisma
|
|
486
489
|
model ApplicantCreditData {
|
|
487
490
|
id String @id @default(uuid())
|
|
488
491
|
bankruptcy String
|
|
@@ -501,9 +504,9 @@ model ApplicantCreditData {
|
|
|
501
504
|
status Lookup @relation("CreditDataStatus", fields: [statusLid], references: [id])
|
|
502
505
|
|
|
503
506
|
@@map("applicant_credit_data")
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
// From prisma/applicants/applicant-credit-profile.prisma
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// From prisma/applicants/applicant-credit-profile.prisma
|
|
507
510
|
model ApplicantCreditProfile {
|
|
508
511
|
id String @id @default(uuid())
|
|
509
512
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
@@ -518,9 +521,9 @@ model ApplicantCreditProfile {
|
|
|
518
521
|
applicant Applicant @relation("ApplicantCreditProfile", fields: [applicantId], references: [id])
|
|
519
522
|
|
|
520
523
|
@@map("applicant_credit_profiles")
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// From prisma/applicants/applicant-employment-income.prisma
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
// From prisma/applicants/applicant-employment-income.prisma
|
|
524
527
|
model ApplicantEmploymentIncome {
|
|
525
528
|
id String @id @default(uuid())
|
|
526
529
|
applicantId String @unique @map("applicant_id")
|
|
@@ -534,9 +537,9 @@ model ApplicantEmploymentIncome {
|
|
|
534
537
|
incomeType Lookup @relation("ApplicantEmploymentIncomeType", fields: [incomeTypeLid], references: [id])
|
|
535
538
|
|
|
536
539
|
@@map("applicant_employment_incomes")
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
// From prisma/applicants/applicant-employment.prisma
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// From prisma/applicants/applicant-employment.prisma
|
|
540
543
|
model ApplicantEmployment {
|
|
541
544
|
id String @id @default(uuid())
|
|
542
545
|
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
@@ -590,9 +593,9 @@ model ApplicantEmployment {
|
|
|
590
593
|
acceptableIncomeTypes Lookup[] @relation("AcceptableIncomeTypes")
|
|
591
594
|
|
|
592
595
|
@@map("applicant_employments")
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
// From prisma/applicants/applicant-expenditure.prisma
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
// From prisma/applicants/applicant-expenditure.prisma
|
|
596
599
|
model ApplicantExpenditure {
|
|
597
600
|
id String @id @default(uuid())
|
|
598
601
|
applicantId String @map("applicant_id")
|
|
@@ -606,9 +609,9 @@ model ApplicantExpenditure {
|
|
|
606
609
|
expenditureType Lookup @relation("ExpenditureType", fields: [expenditureTypeLid], references: [id])
|
|
607
610
|
|
|
608
611
|
@@map("applicant_expenditures")
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
// From prisma/applicants/applicant-income-source.prisma
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// From prisma/applicants/applicant-income-source.prisma
|
|
612
615
|
model ApplicantIncomeSource {
|
|
613
616
|
id String @id @default(uuid())
|
|
614
617
|
employmentStatusLid String? @map("employment_status_lid")
|
|
@@ -625,9 +628,9 @@ model ApplicantIncomeSource {
|
|
|
625
628
|
employmentStatus Lookup? @relation("IncomeSourceEmploymentStatus", fields: [employmentStatusLid], references: [id])
|
|
626
629
|
|
|
627
630
|
@@map("applicant_income_source")
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
// From prisma/applicants/applicant-income.prisma
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// From prisma/applicants/applicant-income.prisma
|
|
631
634
|
model ApplicantIncome {
|
|
632
635
|
id String @id @default(uuid())
|
|
633
636
|
applicantId String @map("applicant_id")
|
|
@@ -694,9 +697,9 @@ model ApplicantIncome {
|
|
|
694
697
|
applicant Applicant @relation("ApplicantIncome", fields: [applicantId], references: [id])
|
|
695
698
|
|
|
696
699
|
@@map("applicant_incomes")
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// From prisma/applicants/applicant-other-income.prisma
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
// From prisma/applicants/applicant-other-income.prisma
|
|
700
703
|
model ApplicantOtherIncome {
|
|
701
704
|
id String @id @default(uuid())
|
|
702
705
|
// Income Source 1
|
|
@@ -741,9 +744,9 @@ model ApplicantOtherIncome {
|
|
|
741
744
|
payFrequency4 Lookup? @relation("PayFrequency4", fields: [payFrequency4Lid], references: [id])
|
|
742
745
|
|
|
743
746
|
@@map("applicant_other_income")
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
// From prisma/applicants/applicant-property-income.prisma
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
// From prisma/applicants/applicant-property-income.prisma
|
|
747
750
|
model ApplicantPropertyIncome {
|
|
748
751
|
id String @id @default(uuid())
|
|
749
752
|
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
@@ -764,9 +767,9 @@ model ApplicantPropertyIncome {
|
|
|
764
767
|
applicant Applicant @relation("ApplicantPropertyIncome", fields: [applicantId], references: [id])
|
|
765
768
|
|
|
766
769
|
@@map("applicant_property_income")
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
// From prisma/applicants/applicant.prisma
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
// From prisma/applicants/applicant.prisma
|
|
770
773
|
model Applicant {
|
|
771
774
|
id String @id @default(uuid())
|
|
772
775
|
applicantId String @unique
|
|
@@ -895,13 +898,13 @@ model Applicant {
|
|
|
895
898
|
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
896
899
|
|
|
897
900
|
@@map("applicants")
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
// From prisma/applicants/credit-card-commitment.prisma
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
// From prisma/applicants/credit-card-commitment.prisma
|
|
901
904
|
model CreditCardCommitment {
|
|
902
905
|
id String @id @default(uuid())
|
|
903
906
|
applicantId String @map("applicant_id")
|
|
904
|
-
commitmentId String @map("commitment_id")
|
|
907
|
+
commitmentId String @unique @map("commitment_id")
|
|
905
908
|
lenderName String? @map("lender_name")
|
|
906
909
|
creditLimit Decimal @map("credit_limit") @db.Decimal(10, 2)
|
|
907
910
|
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
@@ -919,9 +922,9 @@ model CreditCardCommitment {
|
|
|
919
922
|
repaymentType Lookup? @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
|
|
920
923
|
|
|
921
924
|
@@map("applicant_creditcard_commitments")
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
// From prisma/applicants/loan-commitment.prisma
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// From prisma/applicants/loan-commitment.prisma
|
|
925
928
|
model LoanCommitment {
|
|
926
929
|
id String @id @default(uuid())
|
|
927
930
|
applicantId String @map("applicant_id")
|
|
@@ -947,45 +950,58 @@ model LoanCommitment {
|
|
|
947
950
|
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
948
951
|
|
|
949
952
|
@@map("applicant_loan_commitments")
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
// From prisma/applicants/mortgage-commitment.prisma
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// From prisma/applicants/mortgage-commitment.prisma
|
|
953
956
|
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
|
-
|
|
957
|
+
id String @id @default(uuid())
|
|
958
|
+
applicantId String @map("applicant_id")
|
|
959
|
+
commitmentId String @unique @map("commitment_id")
|
|
960
|
+
lenderName String? @map("lender_name")
|
|
961
|
+
propertyValue Decimal? @map("property_value") @db.Decimal(10, 2)
|
|
962
|
+
repaymentTypeLid String? @map("repayment_type_lid")
|
|
963
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
964
|
+
fixedTerm String? @map("fixed_term")
|
|
965
|
+
originalLoanAmount Decimal? @map("original_loan_amount") @db.Decimal(10, 2)
|
|
966
|
+
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
967
|
+
startDate String? @map("start_date")
|
|
968
|
+
monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
|
|
969
|
+
furtherAdvances Boolean? @map("further_advances")
|
|
970
|
+
furtherAdvanceDetails String? @map("further_advance_details")
|
|
971
|
+
accountUptoDate Boolean? @map("account_upto_date")
|
|
972
|
+
accountUptoDateFailDetails String? @map("account_upto_date_fail_details")
|
|
973
|
+
accountInArrears Boolean? @map("account_in_arrears")
|
|
974
|
+
accountInArrearsDetails String? @map("account_in_arrears_details")
|
|
975
|
+
doHaveSharedResponsibility Boolean? @map("do_have_shared_responsibility")
|
|
976
|
+
sharedMortgage String? @map("shared_mortgage")
|
|
977
|
+
source String? @default("Broker") @map("source")
|
|
978
|
+
isSelected Boolean? @default(true) @map("is_selected")
|
|
979
|
+
mortgageHPPRationale String? @default("") @map("mortgage_hpp_rationale")
|
|
980
|
+
financeTypeHppLid String? @map("finance_type_hpp_lid")
|
|
981
|
+
hppRepaymentTypeLid String? @map("hpp_repayment_type_lid")
|
|
982
|
+
mortgageRate Float? @map("mortgage_rate")
|
|
983
|
+
financeHomeTypeLid String? @map("finance_home_type_lid")
|
|
984
|
+
remainingTermMonth Int? @map("remaining_term_month")
|
|
985
|
+
chargeTypeLid String? @map("charge_type_lid")
|
|
986
|
+
securityDetails String? @map("security_details")
|
|
987
|
+
purpose String? @map("purpose")
|
|
988
|
+
remainingTerm String? @map("remaining_term")
|
|
989
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
990
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
978
991
|
|
|
979
992
|
// Relations
|
|
980
|
-
applicant
|
|
981
|
-
repaymentType
|
|
982
|
-
mortgageType
|
|
983
|
-
|
|
993
|
+
applicant Applicant @relation("ApplicantMortgageCommitments", fields: [applicantId], references: [id])
|
|
994
|
+
repaymentType Lookup? @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
995
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
996
|
+
financeTypeHpp Lookup? @relation("FinanceTypeHpp", fields: [financeTypeHppLid], references: [id])
|
|
997
|
+
hppRepaymentType Lookup? @relation("HppRepaymentType", fields: [hppRepaymentTypeLid], references: [id])
|
|
998
|
+
financeHomeType Lookup? @relation("FinanceHomeType", fields: [financeHomeTypeLid], references: [id])
|
|
999
|
+
chargeType Lookup? @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
984
1000
|
|
|
985
1001
|
@@map("applicant_mortgage_commitments")
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
// From prisma/applicants/residence-commitment.prisma
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
// From prisma/applicants/residence-commitment.prisma
|
|
989
1005
|
model ResidenceCommitment {
|
|
990
1006
|
id String @id @default(uuid())
|
|
991
1007
|
applicantId String @map("applicant_id")
|
|
@@ -1026,9 +1042,9 @@ model ResidenceCommitment {
|
|
|
1026
1042
|
chargeType Lookup @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
1027
1043
|
|
|
1028
1044
|
@@map("applicant_residence_commitments")
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1032
1048
|
model SecuredLoanCommitment {
|
|
1033
1049
|
id String @id @default(uuid())
|
|
1034
1050
|
applicantId String @map("applicant_id")
|
|
@@ -1049,9 +1065,9 @@ model SecuredLoanCommitment {
|
|
|
1049
1065
|
applicant Applicant @relation("ApplicantSecuredLoanCommitments", fields: [applicantId], references: [id])
|
|
1050
1066
|
|
|
1051
1067
|
@@map("applicant_secured_loan_commitments")
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1055
1071
|
model UnsecuredLoanCommitment {
|
|
1056
1072
|
id String @id @default(uuid())
|
|
1057
1073
|
applicantId String @map("applicant_id")
|
|
@@ -1071,9 +1087,9 @@ model UnsecuredLoanCommitment {
|
|
|
1071
1087
|
applicant Applicant @relation("ApplicantUnsecuredLoanCommitments", fields: [applicantId], references: [id])
|
|
1072
1088
|
|
|
1073
1089
|
@@map("applicant_unsecured_loan_commitments")
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
// From prisma/applications/application-audit.prisma
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// From prisma/applications/application-audit.prisma
|
|
1077
1093
|
model ApplicationAudit {
|
|
1078
1094
|
id String @id @default(uuid())
|
|
1079
1095
|
auditId String @map("audit_id")
|
|
@@ -1092,9 +1108,9 @@ model ApplicationAudit {
|
|
|
1092
1108
|
application Application @relation(fields: [applicationId], references: [id])
|
|
1093
1109
|
|
|
1094
1110
|
@@map("application_audits")
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
// From prisma/applications/application-company.prisma
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
// From prisma/applications/application-company.prisma
|
|
1098
1114
|
model ApplicationCompany {
|
|
1099
1115
|
id String @id @default(uuid())
|
|
1100
1116
|
applicationId String @unique @map("application_id")
|
|
@@ -1107,9 +1123,9 @@ model ApplicationCompany {
|
|
|
1107
1123
|
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
1108
1124
|
|
|
1109
1125
|
@@map("application_companies")
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
// From prisma/applications/application-credit-profile.prisma
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
// From prisma/applications/application-credit-profile.prisma
|
|
1113
1129
|
model ApplicationCreditProfile {
|
|
1114
1130
|
id String @id @default(uuid())
|
|
1115
1131
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
@@ -1124,9 +1140,9 @@ model ApplicationCreditProfile {
|
|
|
1124
1140
|
application Application @relation("ApplicationCreditProfile", fields: [applicationId], references: [id])
|
|
1125
1141
|
|
|
1126
1142
|
@@map("application_credit_profiles")
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
// From prisma/applications/application-direct-debit.prisma
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
// From prisma/applications/application-direct-debit.prisma
|
|
1130
1146
|
model ApplicationDirectDebit {
|
|
1131
1147
|
id String @id @default(uuid())
|
|
1132
1148
|
applicationId String @unique @map("application_id")
|
|
@@ -1153,9 +1169,9 @@ model ApplicationDirectDebit {
|
|
|
1153
1169
|
|
|
1154
1170
|
@@index([selectedPaymentDayLid])
|
|
1155
1171
|
@@map("application_direct_debits")
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
// From prisma/applications/application-document.prisma
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
// From prisma/applications/application-document.prisma
|
|
1159
1175
|
model ApplicationDocument {
|
|
1160
1176
|
id String @id @default(uuid())
|
|
1161
1177
|
applicationId String? @map("application_id")
|
|
@@ -1183,9 +1199,9 @@ model ApplicationDocument {
|
|
|
1183
1199
|
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
1184
1200
|
|
|
1185
1201
|
@@map("application_documents")
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
// From prisma/applications/application-fieldconfig.prisma
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
// From prisma/applications/application-fieldconfig.prisma
|
|
1189
1205
|
model ApplicationFieldConfig {
|
|
1190
1206
|
id String @id @default(uuid())
|
|
1191
1207
|
fieldName String @unique @map("field_name")
|
|
@@ -1194,9 +1210,9 @@ model ApplicationFieldConfig {
|
|
|
1194
1210
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1195
1211
|
|
|
1196
1212
|
@@map("application_field_configs")
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
// From prisma/applications/application-illustration.prisma
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
// From prisma/applications/application-illustration.prisma
|
|
1200
1216
|
model ApplicationIllustration {
|
|
1201
1217
|
id String @id @default(uuid())
|
|
1202
1218
|
date DateTime @map("date")
|
|
@@ -1204,9 +1220,9 @@ model ApplicationIllustration {
|
|
|
1204
1220
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1205
1221
|
|
|
1206
1222
|
@@map("application_illustrations")
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
// From prisma/applications/application-legal.prisma
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
// From prisma/applications/application-legal.prisma
|
|
1210
1226
|
model ApplicationLegal {
|
|
1211
1227
|
id String @id @default(uuid())
|
|
1212
1228
|
assignedSolicitor String @default("") @map("assigned_solicitor")
|
|
@@ -1215,9 +1231,9 @@ model ApplicationLegal {
|
|
|
1215
1231
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1216
1232
|
|
|
1217
1233
|
@@map("application_legals")
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
// From prisma/applications/application-mortgage.prisma
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
// From prisma/applications/application-mortgage.prisma
|
|
1221
1237
|
model ApplicationMortgage {
|
|
1222
1238
|
id String @id @default(uuid())
|
|
1223
1239
|
applicationId String @unique @map("application_id")
|
|
@@ -1265,9 +1281,9 @@ model ApplicationMortgage {
|
|
|
1265
1281
|
proposedTenants Lookup[] @relation("ProposedTenants")
|
|
1266
1282
|
|
|
1267
1283
|
@@map("application_mortgages")
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
// From prisma/applications/application-note.prisma
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
// From prisma/applications/application-note.prisma
|
|
1271
1287
|
model ApplicationNote {
|
|
1272
1288
|
id String @id @default(uuid())
|
|
1273
1289
|
applicationId String @map("application_id")
|
|
@@ -1303,9 +1319,9 @@ model ApplicationNote {
|
|
|
1303
1319
|
assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
|
|
1304
1320
|
|
|
1305
1321
|
@@map("application_notes")
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
// From prisma/applications/application-offer.prisma
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
// From prisma/applications/application-offer.prisma
|
|
1309
1325
|
model ApplicationOffer {
|
|
1310
1326
|
id String @id @default(uuid())
|
|
1311
1327
|
date String @map("date")
|
|
@@ -1313,9 +1329,9 @@ model ApplicationOffer {
|
|
|
1313
1329
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1314
1330
|
|
|
1315
1331
|
@@map("application_offers")
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
// From prisma/applications/application-onboarding.prisma
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
// From prisma/applications/application-onboarding.prisma
|
|
1319
1335
|
model ApplicationOnboarding {
|
|
1320
1336
|
id String @id @default(uuid())
|
|
1321
1337
|
errors String @default("")
|
|
@@ -1326,9 +1342,9 @@ model ApplicationOnboarding {
|
|
|
1326
1342
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1327
1343
|
|
|
1328
1344
|
@@map("application_onboardings")
|
|
1329
|
-
}
|
|
1330
|
-
|
|
1331
|
-
// From prisma/applications/application-product.prisma
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
// From prisma/applications/application-product.prisma
|
|
1332
1348
|
model ApplicationProduct {
|
|
1333
1349
|
id String @id @default(uuid())
|
|
1334
1350
|
applicationId String @map("application_id")
|
|
@@ -1361,9 +1377,9 @@ model ApplicationProduct {
|
|
|
1361
1377
|
productFeePaymentType Lookup? @relation("ProductFeePaymentType", fields: [productFeePaymentTypeLid], references: [id])
|
|
1362
1378
|
|
|
1363
1379
|
@@map("application_products")
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
// From prisma/applications/application-rationale.prisma
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
// From prisma/applications/application-rationale.prisma
|
|
1367
1383
|
model ApplicationRationale {
|
|
1368
1384
|
id String @id @default(uuid())
|
|
1369
1385
|
applicationId String @unique @map("application_id")
|
|
@@ -1414,9 +1430,9 @@ model ApplicationRationale {
|
|
|
1414
1430
|
propertyStatus Lookup? @relation("PropertyStatus", fields: [propertyStatusLid], references: [id])
|
|
1415
1431
|
|
|
1416
1432
|
@@map("application_rationales")
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
// From prisma/applications/application.prisma
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
// From prisma/applications/application.prisma
|
|
1420
1436
|
model Application {
|
|
1421
1437
|
id String @id @default(uuid())
|
|
1422
1438
|
queueId String[] @map("queue_id")
|
|
@@ -1509,9 +1525,9 @@ model Application {
|
|
|
1509
1525
|
@@index([repaymentTypeLid])
|
|
1510
1526
|
@@index([sourceOfWealthLids])
|
|
1511
1527
|
@@map("applications")
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
// From prisma/applications/broker.prisma
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1530
|
+
// From prisma/applications/broker.prisma
|
|
1515
1531
|
model Broker {
|
|
1516
1532
|
id String @id @default(uuid())
|
|
1517
1533
|
brokerId String @unique @map("broker_id")
|
|
@@ -1537,9 +1553,9 @@ model Broker {
|
|
|
1537
1553
|
applications Application[] @relation("ApplicationBroker")
|
|
1538
1554
|
|
|
1539
1555
|
@@map("brokers")
|
|
1540
|
-
}
|
|
1541
|
-
|
|
1542
|
-
// From prisma/applications/checklist-item.prisma
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
// From prisma/applications/checklist-item.prisma
|
|
1543
1559
|
model ChecklistItem {
|
|
1544
1560
|
id String @id @default(uuid())
|
|
1545
1561
|
additionalOfferConditions String @default("") @map("additional_offer_conditions")
|
|
@@ -1586,9 +1602,9 @@ model ChecklistItem {
|
|
|
1586
1602
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1587
1603
|
|
|
1588
1604
|
@@map("checklist_items")
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
// From prisma/applications/company.prisma
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
// From prisma/applications/company.prisma
|
|
1592
1608
|
model Company {
|
|
1593
1609
|
id String @id @default(uuid())
|
|
1594
1610
|
applicationId String @map("application_id")
|
|
@@ -1664,9 +1680,9 @@ model ApplicantShareholding {
|
|
|
1664
1680
|
directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
|
|
1665
1681
|
|
|
1666
1682
|
@@map("applicant_shareholdings")
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
// From prisma/applications/product-features.prisma
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// From prisma/applications/product-features.prisma
|
|
1670
1686
|
model ProductFeatures {
|
|
1671
1687
|
id String @id @default(uuid())
|
|
1672
1688
|
name String @map("name")
|
|
@@ -1720,9 +1736,9 @@ model ProductFeatures {
|
|
|
1720
1736
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1721
1737
|
|
|
1722
1738
|
@@map("product_features")
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
// From prisma/applications/solicitor.prisma
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// From prisma/applications/solicitor.prisma
|
|
1726
1742
|
model Solicitor {
|
|
1727
1743
|
id String @id @default(uuid())
|
|
1728
1744
|
applicationId String @unique @map("application_id")
|
|
@@ -1755,9 +1771,9 @@ model Solicitor {
|
|
|
1755
1771
|
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1756
1772
|
|
|
1757
1773
|
@@map("solicitors")
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
// From prisma/properties/property.prisma
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
// From prisma/properties/property.prisma
|
|
1761
1777
|
model Property {
|
|
1762
1778
|
id String @id @default(uuid())
|
|
1763
1779
|
applicationId String @map("application_id")
|
|
@@ -1787,9 +1803,9 @@ model Property {
|
|
|
1787
1803
|
country Lookup @relation("PropertyCountry", fields: [countryLid], references: [id])
|
|
1788
1804
|
|
|
1789
1805
|
@@map("properties")
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
// From prisma/properties/security.prisma
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
// From prisma/properties/security.prisma
|
|
1793
1809
|
model Security {
|
|
1794
1810
|
id String @id @default(uuid())
|
|
1795
1811
|
applicationId String @unique @map("application_id")
|
|
@@ -1869,9 +1885,9 @@ model DataStreet {
|
|
|
1869
1885
|
security Security @relation(fields: [securityId], references: [id])
|
|
1870
1886
|
|
|
1871
1887
|
@@map("data_streets")
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
// From prisma/underwriter/underwriter.prisma
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
// From prisma/underwriter/underwriter.prisma
|
|
1875
1891
|
model Underwriter {
|
|
1876
1892
|
id String @id @default(uuid())
|
|
1877
1893
|
applicationId String @map("application_id")
|
|
@@ -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")
|
|
@@ -126,7 +129,7 @@ model Lookup {
|
|
|
126
129
|
|
|
127
130
|
// CreditCardCommitment Relations
|
|
128
131
|
// commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
129
|
-
repaymentType_creditCardCommitments
|
|
132
|
+
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
130
133
|
|
|
131
134
|
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
132
135
|
incomeSourceEmploymentStatus ApplicantIncomeSource[] @relation("IncomeSourceEmploymentStatus")
|