@dynamatix/gb-schemas 2.0.8 → 2.0.10
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-additional-income.model.d.ts +1120 -0
- package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-additional-income.model.js +33 -0
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +3 -3
- package/dist/applicants/applicant-commitment-creditCard.model.js +1 -1
- package/dist/applicants/applicant-commitment-loan.model.d.ts +3 -3
- package/dist/applicants/applicant-commitment-loan.model.js +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +3 -3
- package/dist/applicants/applicant-commitment-mortgage.model.js +1 -1
- package/dist/applicants/applicant-employment-income.model.d.ts +6 -6
- package/dist/applicants/applicant-employment-income.model.js +1 -1
- package/dist/applicants/applicant-income.model.d.ts +48 -0
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income.model.js +16 -0
- package/dist/applicants/applicant-pension-income.model.d.ts +483 -0
- package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-pension-income.model.js +14 -0
- package/dist/applicants/applicant-property-income.model.d.ts +871 -13
- package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-property-income.model.js +7 -5
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts +489 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -0
- package/dist/applicants/applicant-uk-tax-credits.model.js +11 -0
- package/dist/applicants/applicant.model.d.ts +94 -6360
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- package/dist/applicants/applicant.model.js +5 -14
- package/dist/applicants/index.d.ts +4 -0
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applicants/index.js +4 -0
- package/dist/applications/application-productfeatures.model.d.ts +765 -0
- package/dist/applications/application-productfeatures.model.d.ts.map +1 -0
- package/dist/applications/application-productfeatures.model.js +96 -0
- package/dist/applications/application.model.d.ts +0 -726
- package/dist/applications/application.model.d.ts.map +1 -1
- package/dist/applications/application.model.js +0 -2
- package/dist/applications/index.d.ts +1 -1
- package/dist/applications/index.d.ts.map +1 -1
- package/dist/applications/index.js +1 -1
- package/dist/entities/applicants/index.d.ts +12 -13
- package/dist/entities/applicants/index.d.ts.map +1 -1
- package/dist/entities/applicants/index.js +10 -11
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/entities/applications/application.entity.ts +5 -1
- package/package.json +2 -2
- package/prisma/applicants/applicant.prisma +1 -1
- package/prisma/applications/application-company.prisma +6 -6
- package/prisma/applications/application-document.prisma +23 -23
- package/prisma/applications/application.prisma +80 -88
- package/prisma/applications/broker.prisma +1 -1
- package/prisma/applications/company.prisma +62 -62
- package/prisma/applications/solicitor.prisma +1 -1
- package/prisma/product-catalogues/product.prisma +1 -1
- package/prisma/properties/security.prisma +1 -1
- package/prisma/schema.prisma +173 -180
- package/prisma/shared/lookup.prisma +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.model.d.ts","sourceRoot":"","sources":["../../applications/application.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"application.model.d.ts","sourceRoot":"","sources":["../../applications/application.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AA6KhC,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAmD,CAAC;AAC1E,eAAe,gBAAgB,CAAC"}
|
|
@@ -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,11 +11,11 @@ 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';
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../applications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAC,MAAM,kCAAkC,CAAA;AACxF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../applications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAC,MAAM,kCAAkC,CAAA;AACxF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACzF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,+BAA+B,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -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';
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import type { Applicant,
|
|
2
|
-
export type { Applicant,
|
|
1
|
+
import type { Applicant, ApplicantCreditData, ApplicantCreditProfile, ApplicantEmployment, ApplicantEmploymentIncome, ApplicantExpenditure, ApplicantIncome, ApplicantIncomeSource, ApplicantOtherIncome, ApplicantPropertyIncome, CreditCardCommitment, LoanCommitment, MortgageCommitment, ResidenceCommitment, SecuredLoanCommitment, UnsecuredLoanCommitment } from '@prisma/client';
|
|
2
|
+
export type { Applicant, ApplicantCreditData, ApplicantCreditProfile, ApplicantEmployment, ApplicantEmploymentIncome, ApplicantExpenditure, ApplicantIncome, ApplicantIncomeSource, ApplicantOtherIncome, ApplicantPropertyIncome, CreditCardCommitment, LoanCommitment, MortgageCommitment, ResidenceCommitment, SecuredLoanCommitment, UnsecuredLoanCommitment };
|
|
3
3
|
export * from './applicant.entity';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './unsecured-loan-commitment.entity';
|
|
6
|
-
export * from './property-income.entity';
|
|
7
|
-
export * from './residence-commitment.entity';
|
|
8
|
-
export * from './mortgage-commitment.entity';
|
|
9
|
-
export * from './other-income.entity';
|
|
10
|
-
export * from './applicant-income-source.entity';
|
|
11
|
-
export * from './applicant-income.entity';
|
|
12
|
-
export * from './loan-commitment.entity';
|
|
4
|
+
export * from './applicant-credit-data.entity';
|
|
13
5
|
export * from './applicant-credit-profile.entity';
|
|
14
6
|
export * from './applicant-employment.entity';
|
|
15
7
|
export * from './applicant-expenditure.entity';
|
|
16
|
-
export * from './applicant-
|
|
8
|
+
export * from './applicant-income.entity';
|
|
9
|
+
export * from './applicant-income-source.entity';
|
|
17
10
|
export * from './credit-card-commitment.entity';
|
|
18
|
-
export * from './
|
|
11
|
+
export * from './loan-commitment.entity';
|
|
12
|
+
export * from './mortgage-commitment.entity';
|
|
13
|
+
export * from './other-income.entity';
|
|
14
|
+
export * from './property-income.entity';
|
|
15
|
+
export * from './residence-commitment.entity';
|
|
16
|
+
export * from './secure-loan-commitment.entity';
|
|
17
|
+
export * from './unsecured-loan-commitment.entity';
|
|
19
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../entities/applicants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../entities/applicants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EAC1B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACR,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EAC1B,CAAC;AAGF,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
// Export entity classes
|
|
2
2
|
export * from './applicant.entity';
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './unsecured-loan-commitment.entity';
|
|
5
|
-
export * from './property-income.entity';
|
|
6
|
-
export * from './residence-commitment.entity';
|
|
7
|
-
export * from './mortgage-commitment.entity';
|
|
8
|
-
export * from './other-income.entity';
|
|
9
|
-
export * from './applicant-income-source.entity';
|
|
10
|
-
export * from './applicant-income.entity';
|
|
11
|
-
export * from './loan-commitment.entity';
|
|
3
|
+
export * from './applicant-credit-data.entity';
|
|
12
4
|
export * from './applicant-credit-profile.entity';
|
|
13
5
|
export * from './applicant-employment.entity';
|
|
14
6
|
export * from './applicant-expenditure.entity';
|
|
15
|
-
export * from './applicant-
|
|
7
|
+
export * from './applicant-income.entity';
|
|
8
|
+
export * from './applicant-income-source.entity';
|
|
16
9
|
export * from './credit-card-commitment.entity';
|
|
17
|
-
export * from './
|
|
10
|
+
export * from './loan-commitment.entity';
|
|
11
|
+
export * from './mortgage-commitment.entity';
|
|
12
|
+
export * from './other-income.entity';
|
|
13
|
+
export * from './property-income.entity';
|
|
14
|
+
export * from './residence-commitment.entity';
|
|
15
|
+
export * from './secure-loan-commitment.entity';
|
|
16
|
+
export * from './unsecured-loan-commitment.entity';
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wBAAwB,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { ApplicationCompanyEntity } from './application-company.entity';
|
|
|
9
9
|
import { ApplicationRationaleEntity } from './application-rationale.entity';
|
|
10
10
|
import { ApplicantEntity } from '../applicants/applicant.entity';
|
|
11
11
|
import { PropertyEntity } from '../properties/property.entity';
|
|
12
|
+
import { ApplicationCreditProfileEntity } from './application-credit-profile.entity';
|
|
12
13
|
|
|
13
14
|
export class ApplicationEntity {
|
|
14
15
|
id!: string;
|
|
@@ -63,6 +64,7 @@ export class ApplicationEntity {
|
|
|
63
64
|
rationaleId?: string;
|
|
64
65
|
newAuditRecordsCount!: string;
|
|
65
66
|
currentApprivoAuditId?: string;
|
|
67
|
+
applicantIds!: string[];
|
|
66
68
|
propertyIds!: string[];
|
|
67
69
|
createdAt!: Date;
|
|
68
70
|
updatedAt!: Date;
|
|
@@ -78,12 +80,14 @@ export class ApplicationEntity {
|
|
|
78
80
|
solicitor?: SolicitorEntity;
|
|
79
81
|
product?: ProductEntity;
|
|
80
82
|
directDebit?: ApplicationDirectDebitEntity;
|
|
83
|
+
creditProfile?: ApplicationCreditProfileEntity;
|
|
81
84
|
mortgage?: ApplicationMortgageEntity;
|
|
82
85
|
company?: ApplicationCompanyEntity;
|
|
83
86
|
rationale?: ApplicationRationaleEntity;
|
|
84
87
|
applicants?: ApplicantEntity[];
|
|
85
88
|
sourceOfWealth?: LookupEntity[];
|
|
86
89
|
properties?: PropertyEntity[];
|
|
90
|
+
companies?: ApplicationCompanyEntity[];
|
|
87
91
|
|
|
88
92
|
constructor(partial: Partial<ApplicationEntity>) {
|
|
89
93
|
Object.assign(this, partial);
|
|
@@ -91,7 +95,7 @@ export class ApplicationEntity {
|
|
|
91
95
|
|
|
92
96
|
// Virtual properties from Mongoose model
|
|
93
97
|
get noOfApplicants(): number {
|
|
94
|
-
return this.
|
|
98
|
+
return this.applicantIds?.length ?? 0;
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
get applicationTypeName(): string | null {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamatix/gb-schemas",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
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
|
}
|
|
@@ -93,7 +93,7 @@ model Applicant {
|
|
|
93
93
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
94
94
|
|
|
95
95
|
// Relations
|
|
96
|
-
application Application @relation(fields: [applicationId], references: [id])
|
|
96
|
+
application Application @relation("ApplicationApplicants", fields: [applicationId], references: [id])
|
|
97
97
|
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
98
98
|
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
99
99
|
countryOfResidence Lookup @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
model ApplicationCompany {
|
|
2
|
-
id
|
|
3
|
-
applicationId
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicationId String @unique @map("application_id")
|
|
4
4
|
name String
|
|
5
5
|
registrationNumber String? @map("registration_number")
|
|
6
|
-
createdAt
|
|
7
|
-
updatedAt
|
|
6
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
7
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
8
|
|
|
9
9
|
// Relations
|
|
10
|
-
application
|
|
10
|
+
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
11
11
|
|
|
12
12
|
@@map("application_companies")
|
|
13
|
-
}
|
|
13
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
model ApplicationDocument {
|
|
2
|
-
id
|
|
3
|
-
applicationId
|
|
4
|
-
documentId
|
|
5
|
-
owningEntityId
|
|
6
|
-
documentTypeLid
|
|
7
|
-
documentTypeId
|
|
8
|
-
fileName
|
|
9
|
-
contentType
|
|
10
|
-
created
|
|
11
|
-
createdBy
|
|
12
|
-
isGenerated
|
|
13
|
-
data
|
|
14
|
-
envelopeId
|
|
15
|
-
signers
|
|
16
|
-
documentTypeDisplayName String?
|
|
17
|
-
documentTypeValue
|
|
18
|
-
documentTypeData
|
|
19
|
-
documentUrl
|
|
20
|
-
createdAt
|
|
21
|
-
updatedAt
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicationId String? @map("application_id")
|
|
4
|
+
documentId String @map("document_id")
|
|
5
|
+
owningEntityId String? @map("owning_entity_id")
|
|
6
|
+
documentTypeLid String? @map("document_type_lid")
|
|
7
|
+
documentTypeId String? @map("document_type_id")
|
|
8
|
+
fileName String? @map("file_name")
|
|
9
|
+
contentType String? @map("content_type")
|
|
10
|
+
created String? @map("created")
|
|
11
|
+
createdBy String? @map("created_by")
|
|
12
|
+
isGenerated String? @map("is_generated")
|
|
13
|
+
data String? @map("data")
|
|
14
|
+
envelopeId String? @map("envelope_id")
|
|
15
|
+
signers Json @default("[]") @map("signers")
|
|
16
|
+
documentTypeDisplayName String? @map("document_type_display_name")
|
|
17
|
+
documentTypeValue String? @map("document_type_value")
|
|
18
|
+
documentTypeData Json? @map("document_type_data")
|
|
19
|
+
documentUrl String? @map("document_url")
|
|
20
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
21
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
22
22
|
|
|
23
23
|
// Relations
|
|
24
|
-
application
|
|
25
|
-
documentType
|
|
24
|
+
application Application? @relation(fields: [applicationId], references: [id])
|
|
25
|
+
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
26
26
|
|
|
27
27
|
@@map("application_documents")
|
|
28
|
-
}
|
|
28
|
+
}
|
|
@@ -1,99 +1,91 @@
|
|
|
1
1
|
model Application {
|
|
2
|
-
id
|
|
3
|
-
queueId
|
|
4
|
-
assignedToUserId
|
|
5
|
-
applicationId
|
|
6
|
-
isApplicationFeePaid
|
|
7
|
-
applicationNumber
|
|
8
|
-
applicationTypeLid
|
|
9
|
-
bankSolicitor
|
|
10
|
-
brokerId
|
|
11
|
-
caseManager
|
|
12
|
-
caseManagerAccepted
|
|
13
|
-
completedReason
|
|
14
|
-
isIntendToOccupy
|
|
15
|
-
introducer
|
|
16
|
-
isIntroducerSubmission
|
|
17
|
-
isBrokerAssigned
|
|
18
|
-
isFinanceRecommendedToApplicant
|
|
19
|
-
isWorkflowTaskCreated
|
|
20
|
-
lastUpdated
|
|
21
|
-
lendingTypeLid
|
|
22
|
-
networkClubName
|
|
23
|
-
isNetworkClubSubmission
|
|
24
|
-
newReason
|
|
25
|
-
purchaseTypeLid
|
|
26
|
-
rejectedReason
|
|
27
|
-
repaymentTypeLid
|
|
28
|
-
selectedProduct
|
|
29
|
-
sourceOfWealthLids
|
|
30
|
-
sowBusiness
|
|
31
|
-
sowInheritance
|
|
32
|
-
sowOther
|
|
33
|
-
sowProperty
|
|
34
|
-
sowSalary
|
|
35
|
-
statusLid
|
|
36
|
-
submitReason
|
|
37
|
-
submittedDate
|
|
38
|
-
underwriter
|
|
39
|
-
isValuationFeePaid
|
|
40
|
-
withdrawalReason
|
|
41
|
-
withdrawalReasonCode
|
|
42
|
-
productId
|
|
43
|
-
securityId
|
|
44
|
-
solicitorId
|
|
45
|
-
isActive
|
|
46
|
-
isUkResident
|
|
47
|
-
riskRating
|
|
48
|
-
directDebitId
|
|
49
|
-
mortgageId
|
|
50
|
-
companyId
|
|
51
|
-
rationaleId
|
|
52
|
-
newAuditRecordsCount
|
|
53
|
-
currentApprivoAuditId
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
57
|
-
pageValidFlag Boolean @default(false)
|
|
58
|
-
applicationStatusLid String @map("application_status_lid")
|
|
59
|
-
applicationSubTypeLid String @map("application_sub_type_lid")
|
|
60
|
-
applicationSubTypeOther String? @map("application_sub_type_other")
|
|
61
|
-
applicationSubTypeOtherDetails String? @map("application_sub_type_other_details")
|
|
62
|
-
applicationSubTypeOtherLid String? @map("application_sub_type_other_lid")
|
|
63
|
-
applicationSubTypeOtherLidDetails String? @map("application_sub_type_other_lid_details")
|
|
64
|
-
applicationSubTypeOtherLidOther String? @map("application_sub_type_other_lid_other")
|
|
65
|
-
applicationSubTypeOtherLidOtherDetails String? @map("application_sub_type_other_lid_other_details")
|
|
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 String @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 String @default("false") @map("case_manager_accepted")
|
|
13
|
+
completedReason String @default("") @map("completed_reason")
|
|
14
|
+
isIntendToOccupy String @map("is_intend_to_occupy")
|
|
15
|
+
introducer String @default("") @map("introducer")
|
|
16
|
+
isIntroducerSubmission String @map("is_introducer_submission")
|
|
17
|
+
isBrokerAssigned String @default("false") @map("is_broker_assigned")
|
|
18
|
+
isFinanceRecommendedToApplicant String @map("is_finance_recommended_to_applicant")
|
|
19
|
+
isWorkflowTaskCreated String @map("is_workflow_task_created")
|
|
20
|
+
lastUpdated String? @map("last_updated")
|
|
21
|
+
lendingTypeLid String @map("lending_type_lid")
|
|
22
|
+
networkClubName String @default("") @map("network_club_name")
|
|
23
|
+
isNetworkClubSubmission String @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 String? @map("submitted_date")
|
|
38
|
+
underwriter String @default("") @map("underwriter")
|
|
39
|
+
isValuationFeePaid String @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 String @default("false") @map("is_active")
|
|
46
|
+
isUkResident String @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")
|
|
66
56
|
|
|
67
57
|
// Relations
|
|
68
|
-
broker
|
|
69
|
-
security
|
|
70
|
-
solicitor
|
|
71
|
-
product
|
|
72
|
-
directDebit
|
|
58
|
+
broker Broker? @relation("ApplicationBroker", fields: [brokerId], references: [id])
|
|
59
|
+
security Security? @relation("ApplicationSecurity")
|
|
60
|
+
solicitor Solicitor? @relation("ApplicationSolicitor")
|
|
61
|
+
product Product? @relation("ApplicationProduct", fields: [productId], references: [id])
|
|
62
|
+
directDebit ApplicationDirectDebit? @relation("ApplicationDirectDebit")
|
|
73
63
|
creditProfile ApplicationCreditProfile? @relation("ApplicationCreditProfile")
|
|
74
|
-
mortgage
|
|
75
|
-
company
|
|
76
|
-
rationale
|
|
77
|
-
applicants
|
|
78
|
-
properties
|
|
79
|
-
documents
|
|
80
|
-
notes
|
|
81
|
-
audits
|
|
82
|
-
underwriters
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
64
|
+
mortgage ApplicationMortgage? @relation("ApplicationMortgage")
|
|
65
|
+
company ApplicationCompany? @relation("ApplicationCompany")
|
|
66
|
+
rationale ApplicationRationale? @relation("ApplicationRationale")
|
|
67
|
+
applicants Applicant[] @relation("ApplicationApplicants")
|
|
68
|
+
properties Property[] @relation("ApplicationProperties")
|
|
69
|
+
documents ApplicationDocument[]
|
|
70
|
+
notes ApplicationNote[]
|
|
71
|
+
audits ApplicationAudit[]
|
|
72
|
+
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
73
|
+
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
74
|
+
companies Company[] @relation("Company")
|
|
75
|
+
|
|
87
76
|
// Lookup relations
|
|
88
|
-
applicationType
|
|
89
|
-
lendingType
|
|
90
|
-
purchaseType
|
|
91
|
-
repaymentType
|
|
77
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
78
|
+
lendingType Lookup @relation("LendingType", fields: [lendingTypeLid], references: [id])
|
|
79
|
+
purchaseType Lookup @relation("PurchaseType", fields: [purchaseTypeLid], references: [id])
|
|
80
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
81
|
+
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
82
|
+
sourceOfWealth Lookup[] @relation("SourceOfWealth")
|
|
92
83
|
|
|
93
|
-
@@map("applications")
|
|
94
84
|
@@index([applicationTypeLid])
|
|
95
85
|
@@index([lendingTypeLid])
|
|
96
86
|
@@index([purchaseTypeLid])
|
|
97
87
|
@@index([statusLid])
|
|
98
88
|
@@index([repaymentTypeLid])
|
|
99
|
-
|
|
89
|
+
@@index([sourceOfWealthLids])
|
|
90
|
+
@@map("applications")
|
|
91
|
+
}
|