@dynamatix/gb-schemas 2.0.9 → 2.0.11
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/applicants/applicant-income.model.js +16 -0
- package/dist/applicants/applicant.model.js +5 -14
- package/dist/applicants/index.js +4 -0
- package/dist/applications/application.model.js +0 -2
- package/dist/applications/index.js +1 -1
- package/entities/applications/application.entity.ts +13 -13
- package/package.json +2 -2
- package/prisma/applications/application.prisma +54 -54
- package/prisma/schema.prisma +55 -55
|
@@ -58,6 +58,22 @@ const incomeSchema = new mongoose.Schema({
|
|
|
58
58
|
totalEmploymentNetIncome: { type: Pound, default: 0.00 },
|
|
59
59
|
isEmploymentIncomeConfirmed: { type: Boolean, default: false },
|
|
60
60
|
employmentIncomeRationale: { type: String, default: null },
|
|
61
|
+
totalPensionGrossIncome: { type: Pound, default: 0.00 },
|
|
62
|
+
totalPensionNetIncome: { type: Pound, default: 0.00 },
|
|
63
|
+
isPensionIncomeConfirmed: { type: Boolean, default: false },
|
|
64
|
+
pensionIncomeRationale: { type: String, default: null },
|
|
65
|
+
totalAdditionalGrossIncome: { type: Pound, default: 0.00 },
|
|
66
|
+
totalAdditionalNetIncome: { type: Pound, default: 0.00 },
|
|
67
|
+
isAdditionalIncomeConfirmed: { type: Boolean, default: false },
|
|
68
|
+
additionalIncomeRationale: { type: String, default: null },
|
|
69
|
+
totalUKTaxCreditsGrossIncome: { type: Pound, default: 0.00 },
|
|
70
|
+
totalUKTaxCreditsNetIncome: { type: Pound, default: 0.00 },
|
|
71
|
+
isUKTaxCreditsIncomeConfirmed: { type: Boolean, default: false },
|
|
72
|
+
ukTaxCreditsIncomeRationale: { type: String, default: null },
|
|
73
|
+
totalPropertyGrossIncome: { type: Pound, default: 0.00 },
|
|
74
|
+
totalPropertyNetIncome: { type: Pound, default: 0.00 },
|
|
75
|
+
isPropertyIncomeConfirmed: { type: Boolean, default: false },
|
|
76
|
+
propertyIncomeRationale: { type: String, default: null },
|
|
61
77
|
}, {
|
|
62
78
|
toJSON: { getters: true },
|
|
63
79
|
toObject: { getters: true }
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import applicantCreditDataSchema from "./applicant-credit-data.model";
|
|
3
3
|
import applicantRiskNarrativeSchema from "./applicant-risk-narrative.model";
|
|
4
|
-
import applicantOtherIncomeSchema from "./applicant-other-income.model";
|
|
5
4
|
import applicantIncomeSourceSchema from "./applicant-income-source.model";
|
|
6
5
|
import applicantEmploymentSchema from "./applicant-employment.model";
|
|
7
6
|
import applicantDirectDebitSchema from "./applicant-direct-debit.model";
|
|
8
7
|
import creditProfileSchema from "./applicant-credit-profile.model";
|
|
9
|
-
import propertyIncomeSchema from "./applicant-property-income.model";
|
|
10
8
|
import incomeSchema from "./applicant-income.model";
|
|
11
|
-
import { Pound } from "../value-objects/pound";
|
|
12
9
|
const applicantSchema = new mongoose.Schema({
|
|
13
10
|
applicantId: { type: String, required: true },
|
|
14
11
|
applicationId: { type: mongoose.Schema.Types.ObjectId, ref: "Application", required: true },
|
|
@@ -74,14 +71,10 @@ const applicantSchema = new mongoose.Schema({
|
|
|
74
71
|
type: Boolean,
|
|
75
72
|
default: true,
|
|
76
73
|
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
isCurrentContract: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: false,
|
|
84
|
-
},
|
|
74
|
+
isCreditCardCommitmentConfirmed: { type: Boolean, default: false, },
|
|
75
|
+
isLoanCommitmentConfirmed: { type: Boolean, default: false, },
|
|
76
|
+
isMortgageHPPCommitmentConfirmed: { type: Boolean, default: false, },
|
|
77
|
+
isCurrentContract: { type: Boolean, default: false, },
|
|
85
78
|
isCustomerVulnerable: {
|
|
86
79
|
type: Boolean,
|
|
87
80
|
default: false,
|
|
@@ -111,7 +104,7 @@ const applicantSchema = new mongoose.Schema({
|
|
|
111
104
|
maritalStatusLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
112
105
|
mobileNumber: { type: String, default: null },
|
|
113
106
|
nationalityLid: { type: mongoose.Schema.Types.ObjectId, ref: "Lookup", required: true },
|
|
114
|
-
netIncome: { type:
|
|
107
|
+
netIncome: { type: Number, default: 0.00 },
|
|
115
108
|
niNumber: { type: String, required: true },
|
|
116
109
|
numberOfDependants: { type: Number, default: 0 },
|
|
117
110
|
isOneYearPrior: {
|
|
@@ -161,12 +154,10 @@ const applicantSchema = new mongoose.Schema({
|
|
|
161
154
|
},
|
|
162
155
|
creditData: applicantCreditDataSchema,
|
|
163
156
|
riskNarrative: applicantRiskNarrativeSchema,
|
|
164
|
-
otherIncome: applicantOtherIncomeSchema,
|
|
165
157
|
incomeSource: applicantIncomeSourceSchema,
|
|
166
158
|
employment: applicantEmploymentSchema,
|
|
167
159
|
directDebit: applicantDirectDebitSchema,
|
|
168
160
|
creditProfile: creditProfileSchema,
|
|
169
|
-
propertyIncome: propertyIncomeSchema,
|
|
170
161
|
income: incomeSchema
|
|
171
162
|
}, {
|
|
172
163
|
timestamps: true,
|
package/dist/applicants/index.js
CHANGED
|
@@ -7,3 +7,7 @@ export { default as ResidenceCommitmentModel } from './applicant-commitment-resi
|
|
|
7
7
|
export { default as SecuredLoanCommitmentModel } from './applicant-commitment-secureLoan.model';
|
|
8
8
|
export { default as UnsecuredLoanCommitmentModel } from './applicant-commitment-unsecuredLoan.model';
|
|
9
9
|
export { default as ApplicantExpenditureModel } from './applicant-expenditure.model';
|
|
10
|
+
export { default as ApplicantPensionIncomeModel } from './applicant-pension-income.model';
|
|
11
|
+
export { default as ApplicantAdditionalIncomeModel } from './applicant-additional-income.model';
|
|
12
|
+
export { default as ApplicantUKTaxCreditsModel } from './applicant-uk-tax-credits.model';
|
|
13
|
+
export { default as ApplicantPropertyIncomeModel } from './applicant-property-income.model';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import creditProfileSchema from "./application-credit-profile.model";
|
|
3
|
-
import productFeaturesSchema from "./productfeatures.model";
|
|
4
3
|
const applicationSchema = new mongoose.Schema({
|
|
5
4
|
queueId: [{
|
|
6
5
|
type: mongoose.Schema.Types.ObjectId,
|
|
@@ -55,7 +54,6 @@ const applicationSchema = new mongoose.Schema({
|
|
|
55
54
|
isActive: { type: String, default: false },
|
|
56
55
|
isUkResident: { type: String, default: true },
|
|
57
56
|
riskRating: { type: String },
|
|
58
|
-
productFeatures: productFeaturesSchema,
|
|
59
57
|
directDebitId: { type: mongoose.Schema.Types.ObjectId, ref: "Application_DirectDebit" },
|
|
60
58
|
creditProfile: creditProfileSchema,
|
|
61
59
|
mortgageId: { type: mongoose.Schema.Types.ObjectId, ref: "Mortgage" },
|
|
@@ -11,10 +11,10 @@ export { default as ApplicationRationaleModel } from './application-rationale.mo
|
|
|
11
11
|
export { default as ApplicationValuationModel } from './application-valuation.model';
|
|
12
12
|
export { default as BrokerModel } from './broker.model';
|
|
13
13
|
export { default as ProductModel } from './application-product.model';
|
|
14
|
-
export { default as ProductFeaturesModel } from './productfeatures.model';
|
|
15
14
|
export { default as SolicitorModel } from './solicitor.model';
|
|
16
15
|
export { default as ApplicationDocumentModel } from './application-document.model';
|
|
17
16
|
export { default as ApplicationRiskNarrativeModel } from './application-risk-narrative.model';
|
|
18
17
|
export { default as ApplicationFieldConfigModel } from './application-fieldconfig.model';
|
|
19
18
|
export { default as DocumentModel } from './document.model';
|
|
20
19
|
export { default as MortgageModel } from './application-mortgage.model';
|
|
20
|
+
export { default as ApplicationProductFeaturesModel } from './application-productfeatures.model';
|
|
@@ -16,24 +16,24 @@ export class ApplicationEntity {
|
|
|
16
16
|
queueId!: string[];
|
|
17
17
|
assignedToUserId?: string;
|
|
18
18
|
applicationId!: string;
|
|
19
|
-
isApplicationFeePaid!:
|
|
19
|
+
isApplicationFeePaid!: boolean;
|
|
20
20
|
applicationNumber!: string;
|
|
21
21
|
applicationTypeLid!: string;
|
|
22
22
|
bankSolicitor!: string;
|
|
23
23
|
brokerId!: string;
|
|
24
24
|
caseManager!: string;
|
|
25
|
-
caseManagerAccepted!:
|
|
25
|
+
caseManagerAccepted!: boolean;
|
|
26
26
|
completedReason!: string;
|
|
27
|
-
isIntendToOccupy!:
|
|
27
|
+
isIntendToOccupy!: boolean;
|
|
28
28
|
introducer!: string;
|
|
29
|
-
isIntroducerSubmission!:
|
|
30
|
-
isBrokerAssigned!:
|
|
31
|
-
isFinanceRecommendedToApplicant!:
|
|
32
|
-
isWorkflowTaskCreated!:
|
|
33
|
-
lastUpdated?:
|
|
29
|
+
isIntroducerSubmission!: boolean;
|
|
30
|
+
isBrokerAssigned!: boolean;
|
|
31
|
+
isFinanceRecommendedToApplicant!: boolean;
|
|
32
|
+
isWorkflowTaskCreated!: boolean;
|
|
33
|
+
lastUpdated?: Date;
|
|
34
34
|
lendingTypeLid!: string;
|
|
35
35
|
networkClubName!: string;
|
|
36
|
-
isNetworkClubSubmission!:
|
|
36
|
+
isNetworkClubSubmission!: boolean;
|
|
37
37
|
newReason!: string;
|
|
38
38
|
purchaseTypeLid!: string;
|
|
39
39
|
rejectedReason!: string;
|
|
@@ -47,16 +47,16 @@ export class ApplicationEntity {
|
|
|
47
47
|
sowSalary!: string;
|
|
48
48
|
statusLid!: string;
|
|
49
49
|
submitReason!: string;
|
|
50
|
-
submittedDate?:
|
|
50
|
+
submittedDate?: Date;
|
|
51
51
|
underwriter!: string;
|
|
52
|
-
isValuationFeePaid!:
|
|
52
|
+
isValuationFeePaid!: boolean;
|
|
53
53
|
withdrawalReason!: string;
|
|
54
54
|
withdrawalReasonCode!: string;
|
|
55
55
|
productId?: string;
|
|
56
56
|
securityId!: string;
|
|
57
57
|
solicitorId!: string;
|
|
58
|
-
isActive!:
|
|
59
|
-
isUkResident!:
|
|
58
|
+
isActive!: boolean;
|
|
59
|
+
isUkResident!: boolean;
|
|
60
60
|
riskRating?: string;
|
|
61
61
|
directDebitId?: string;
|
|
62
62
|
mortgageId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamatix/gb-schemas",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "All the schemas for gatehouse bank back-end",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"@types/node": "^22.14.0",
|
|
79
79
|
"prisma": "^6.6.0",
|
|
80
80
|
"ts-node": "^10.9.2",
|
|
81
|
-
"typescript": "^5.
|
|
81
|
+
"typescript": "^5.3.3"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
model Application {
|
|
2
|
-
id String
|
|
3
|
-
queueId String[]
|
|
4
|
-
assignedToUserId String?
|
|
5
|
-
applicationId String
|
|
6
|
-
isApplicationFeePaid
|
|
7
|
-
applicationNumber String
|
|
8
|
-
applicationTypeLid String
|
|
9
|
-
bankSolicitor String
|
|
10
|
-
brokerId String?
|
|
11
|
-
caseManager String
|
|
12
|
-
caseManagerAccepted
|
|
13
|
-
completedReason String
|
|
14
|
-
isIntendToOccupy
|
|
15
|
-
introducer String
|
|
16
|
-
isIntroducerSubmission
|
|
17
|
-
isBrokerAssigned
|
|
18
|
-
isFinanceRecommendedToApplicant
|
|
19
|
-
isWorkflowTaskCreated
|
|
20
|
-
lastUpdated
|
|
21
|
-
lendingTypeLid String
|
|
22
|
-
networkClubName String
|
|
23
|
-
isNetworkClubSubmission
|
|
24
|
-
newReason String
|
|
25
|
-
purchaseTypeLid String
|
|
26
|
-
rejectedReason String
|
|
27
|
-
repaymentTypeLid String
|
|
28
|
-
selectedProduct String?
|
|
29
|
-
sourceOfWealthLids String[]
|
|
30
|
-
sowBusiness String
|
|
31
|
-
sowInheritance String
|
|
32
|
-
sowOther String
|
|
33
|
-
sowProperty String
|
|
34
|
-
sowSalary String
|
|
35
|
-
statusLid String
|
|
36
|
-
submitReason String
|
|
37
|
-
submittedDate
|
|
38
|
-
underwriter String
|
|
39
|
-
isValuationFeePaid
|
|
40
|
-
withdrawalReason String
|
|
41
|
-
withdrawalReasonCode String
|
|
42
|
-
productId String?
|
|
43
|
-
securityId String?
|
|
44
|
-
solicitorId String?
|
|
45
|
-
isActive
|
|
46
|
-
isUkResident
|
|
47
|
-
riskRating String?
|
|
48
|
-
directDebitId String?
|
|
49
|
-
mortgageId String?
|
|
50
|
-
companyId String?
|
|
51
|
-
rationaleId String?
|
|
52
|
-
newAuditRecordsCount String
|
|
53
|
-
currentApprivoAuditId String?
|
|
54
|
-
applicantIds String[]
|
|
55
|
-
propertyIds String[]
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
queueId String[] @map("queue_id")
|
|
4
|
+
assignedToUserId String? @map("assigned_to_user_id")
|
|
5
|
+
applicationId String @unique @map("application_id")
|
|
6
|
+
isApplicationFeePaid Boolean @map("is_application_fee_paid")
|
|
7
|
+
applicationNumber String @map("application_number")
|
|
8
|
+
applicationTypeLid String @map("application_type_lid")
|
|
9
|
+
bankSolicitor String @default("") @map("bank_solicitor")
|
|
10
|
+
brokerId String? @map("broker_id")
|
|
11
|
+
caseManager String @default("") @map("case_manager")
|
|
12
|
+
caseManagerAccepted Boolean @default(false) @map("case_manager_accepted")
|
|
13
|
+
completedReason String @default("") @map("completed_reason")
|
|
14
|
+
isIntendToOccupy Boolean @map("is_intend_to_occupy")
|
|
15
|
+
introducer String @default("") @map("introducer")
|
|
16
|
+
isIntroducerSubmission Boolean @map("is_introducer_submission")
|
|
17
|
+
isBrokerAssigned Boolean @default(false) @map("is_broker_assigned")
|
|
18
|
+
isFinanceRecommendedToApplicant Boolean @map("is_finance_recommended_to_applicant")
|
|
19
|
+
isWorkflowTaskCreated Boolean @map("is_workflow_task_created")
|
|
20
|
+
lastUpdated DateTime? @map("last_updated")
|
|
21
|
+
lendingTypeLid String @map("lending_type_lid")
|
|
22
|
+
networkClubName String @default("") @map("network_club_name")
|
|
23
|
+
isNetworkClubSubmission Boolean @map("is_network_club_submission")
|
|
24
|
+
newReason String @default("") @map("new_reason")
|
|
25
|
+
purchaseTypeLid String @map("purchase_type_lid")
|
|
26
|
+
rejectedReason String @default("") @map("rejected_reason")
|
|
27
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
28
|
+
selectedProduct String? @map("selected_product")
|
|
29
|
+
sourceOfWealthLids String[] @map("source_of_wealth_lids")
|
|
30
|
+
sowBusiness String @default("") @map("sow_business")
|
|
31
|
+
sowInheritance String @default("") @map("sow_inheritance")
|
|
32
|
+
sowOther String @default("") @map("sow_other")
|
|
33
|
+
sowProperty String @default("") @map("sow_property")
|
|
34
|
+
sowSalary String @default("") @map("sow_salary")
|
|
35
|
+
statusLid String @map("status_lid")
|
|
36
|
+
submitReason String @default("") @map("submit_reason")
|
|
37
|
+
submittedDate DateTime? @map("submitted_date")
|
|
38
|
+
underwriter String @default("") @map("underwriter")
|
|
39
|
+
isValuationFeePaid Boolean @map("is_valuation_fee_paid")
|
|
40
|
+
withdrawalReason String @default("") @map("withdrawal_reason")
|
|
41
|
+
withdrawalReasonCode String @default("") @map("withdrawal_reason_code")
|
|
42
|
+
productId String? @map("product_id")
|
|
43
|
+
securityId String? @map("security_id")
|
|
44
|
+
solicitorId String? @map("solicitor_id")
|
|
45
|
+
isActive Boolean @default(false) @map("is_active")
|
|
46
|
+
isUkResident Boolean @default(true) @map("is_uk_resident")
|
|
47
|
+
riskRating String? @map("risk_rating")
|
|
48
|
+
directDebitId String? @map("direct_debit_id")
|
|
49
|
+
mortgageId String? @map("mortgage_id")
|
|
50
|
+
companyId String? @map("company_id")
|
|
51
|
+
rationaleId String? @map("rationale_id")
|
|
52
|
+
newAuditRecordsCount String @default("0") @map("new_audit_records_count")
|
|
53
|
+
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
54
|
+
applicantIds String[] @map("applicant_ids")
|
|
55
|
+
propertyIds String[] @map("property_ids")
|
|
56
56
|
|
|
57
57
|
// Relations
|
|
58
58
|
broker Broker? @relation("ApplicationBroker", fields: [brokerId], references: [id])
|
package/prisma/schema.prisma
CHANGED
|
@@ -1400,60 +1400,60 @@ model ApplicationRationale {
|
|
|
1400
1400
|
|
|
1401
1401
|
// From prisma/applications/application.prisma
|
|
1402
1402
|
model Application {
|
|
1403
|
-
id String
|
|
1404
|
-
queueId String[]
|
|
1405
|
-
assignedToUserId String?
|
|
1406
|
-
applicationId String
|
|
1407
|
-
isApplicationFeePaid
|
|
1408
|
-
applicationNumber String
|
|
1409
|
-
applicationTypeLid String
|
|
1410
|
-
bankSolicitor String
|
|
1411
|
-
brokerId String?
|
|
1412
|
-
caseManager String
|
|
1413
|
-
caseManagerAccepted
|
|
1414
|
-
completedReason String
|
|
1415
|
-
isIntendToOccupy
|
|
1416
|
-
introducer String
|
|
1417
|
-
isIntroducerSubmission
|
|
1418
|
-
isBrokerAssigned
|
|
1419
|
-
isFinanceRecommendedToApplicant
|
|
1420
|
-
isWorkflowTaskCreated
|
|
1421
|
-
lastUpdated
|
|
1422
|
-
lendingTypeLid String
|
|
1423
|
-
networkClubName String
|
|
1424
|
-
isNetworkClubSubmission
|
|
1425
|
-
newReason String
|
|
1426
|
-
purchaseTypeLid String
|
|
1427
|
-
rejectedReason String
|
|
1428
|
-
repaymentTypeLid String
|
|
1429
|
-
selectedProduct String?
|
|
1430
|
-
sourceOfWealthLids String[]
|
|
1431
|
-
sowBusiness String
|
|
1432
|
-
sowInheritance String
|
|
1433
|
-
sowOther String
|
|
1434
|
-
sowProperty String
|
|
1435
|
-
sowSalary String
|
|
1436
|
-
statusLid String
|
|
1437
|
-
submitReason String
|
|
1438
|
-
submittedDate
|
|
1439
|
-
underwriter String
|
|
1440
|
-
isValuationFeePaid
|
|
1441
|
-
withdrawalReason String
|
|
1442
|
-
withdrawalReasonCode String
|
|
1443
|
-
productId String?
|
|
1444
|
-
securityId String?
|
|
1445
|
-
solicitorId String?
|
|
1446
|
-
isActive
|
|
1447
|
-
isUkResident
|
|
1448
|
-
riskRating String?
|
|
1449
|
-
directDebitId String?
|
|
1450
|
-
mortgageId String?
|
|
1451
|
-
companyId String?
|
|
1452
|
-
rationaleId String?
|
|
1453
|
-
newAuditRecordsCount String
|
|
1454
|
-
currentApprivoAuditId String?
|
|
1455
|
-
applicantIds String[]
|
|
1456
|
-
propertyIds String[]
|
|
1403
|
+
id String @id @default(uuid())
|
|
1404
|
+
queueId String[] @map("queue_id")
|
|
1405
|
+
assignedToUserId String? @map("assigned_to_user_id")
|
|
1406
|
+
applicationId String @unique @map("application_id")
|
|
1407
|
+
isApplicationFeePaid Boolean @map("is_application_fee_paid")
|
|
1408
|
+
applicationNumber String @map("application_number")
|
|
1409
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1410
|
+
bankSolicitor String @default("") @map("bank_solicitor")
|
|
1411
|
+
brokerId String? @map("broker_id")
|
|
1412
|
+
caseManager String @default("") @map("case_manager")
|
|
1413
|
+
caseManagerAccepted Boolean @default(false) @map("case_manager_accepted")
|
|
1414
|
+
completedReason String @default("") @map("completed_reason")
|
|
1415
|
+
isIntendToOccupy Boolean @map("is_intend_to_occupy")
|
|
1416
|
+
introducer String @default("") @map("introducer")
|
|
1417
|
+
isIntroducerSubmission Boolean @map("is_introducer_submission")
|
|
1418
|
+
isBrokerAssigned Boolean @default(false) @map("is_broker_assigned")
|
|
1419
|
+
isFinanceRecommendedToApplicant Boolean @map("is_finance_recommended_to_applicant")
|
|
1420
|
+
isWorkflowTaskCreated Boolean @map("is_workflow_task_created")
|
|
1421
|
+
lastUpdated DateTime? @map("last_updated")
|
|
1422
|
+
lendingTypeLid String @map("lending_type_lid")
|
|
1423
|
+
networkClubName String @default("") @map("network_club_name")
|
|
1424
|
+
isNetworkClubSubmission Boolean @map("is_network_club_submission")
|
|
1425
|
+
newReason String @default("") @map("new_reason")
|
|
1426
|
+
purchaseTypeLid String @map("purchase_type_lid")
|
|
1427
|
+
rejectedReason String @default("") @map("rejected_reason")
|
|
1428
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
1429
|
+
selectedProduct String? @map("selected_product")
|
|
1430
|
+
sourceOfWealthLids String[] @map("source_of_wealth_lids")
|
|
1431
|
+
sowBusiness String @default("") @map("sow_business")
|
|
1432
|
+
sowInheritance String @default("") @map("sow_inheritance")
|
|
1433
|
+
sowOther String @default("") @map("sow_other")
|
|
1434
|
+
sowProperty String @default("") @map("sow_property")
|
|
1435
|
+
sowSalary String @default("") @map("sow_salary")
|
|
1436
|
+
statusLid String @map("status_lid")
|
|
1437
|
+
submitReason String @default("") @map("submit_reason")
|
|
1438
|
+
submittedDate DateTime? @map("submitted_date")
|
|
1439
|
+
underwriter String @default("") @map("underwriter")
|
|
1440
|
+
isValuationFeePaid Boolean @map("is_valuation_fee_paid")
|
|
1441
|
+
withdrawalReason String @default("") @map("withdrawal_reason")
|
|
1442
|
+
withdrawalReasonCode String @default("") @map("withdrawal_reason_code")
|
|
1443
|
+
productId String? @map("product_id")
|
|
1444
|
+
securityId String? @map("security_id")
|
|
1445
|
+
solicitorId String? @map("solicitor_id")
|
|
1446
|
+
isActive Boolean @default(false) @map("is_active")
|
|
1447
|
+
isUkResident Boolean @default(true) @map("is_uk_resident")
|
|
1448
|
+
riskRating String? @map("risk_rating")
|
|
1449
|
+
directDebitId String? @map("direct_debit_id")
|
|
1450
|
+
mortgageId String? @map("mortgage_id")
|
|
1451
|
+
companyId String? @map("company_id")
|
|
1452
|
+
rationaleId String? @map("rationale_id")
|
|
1453
|
+
newAuditRecordsCount String @default("0") @map("new_audit_records_count")
|
|
1454
|
+
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
1455
|
+
applicantIds String[] @map("applicant_ids")
|
|
1456
|
+
propertyIds String[] @map("property_ids")
|
|
1457
1457
|
|
|
1458
1458
|
// Relations
|
|
1459
1459
|
broker Broker? @relation("ApplicationBroker", fields: [brokerId], references: [id])
|
|
@@ -1470,8 +1470,8 @@ model Application {
|
|
|
1470
1470
|
documents ApplicationDocument[]
|
|
1471
1471
|
notes ApplicationNote[]
|
|
1472
1472
|
audits ApplicationAudit[]
|
|
1473
|
-
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
1474
1473
|
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
1474
|
+
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
1475
1475
|
companies Company[] @relation("Company")
|
|
1476
1476
|
|
|
1477
1477
|
// Lookup relations
|