@dynamatix/gb-schemas 2.0.1 → 2.0.3
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-commitment-creditCard.model.d.ts +26 -0
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-loan.model.d.ts +26 -0
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +26 -0
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-residence.model.d.ts +26 -0
- package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +26 -0
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +26 -0
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-credit-data.model.d.ts +27 -0
- package/dist/applicants/applicant-credit-data.model.d.ts.map +1 -1
- package/dist/applicants/applicant-credit-profile.model.d.ts +27 -0
- package/dist/applicants/applicant-credit-profile.model.d.ts.map +1 -1
- package/dist/applicants/applicant-direct-debit.model.d.ts +27 -0
- package/dist/applicants/applicant-direct-debit.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment-income.model.d.ts +201 -0
- package/dist/applicants/applicant-employment-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-employment-income.model.js +9 -0
- package/dist/applicants/applicant-employment.model.d.ts +26 -18
- package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment.model.js +0 -6
- package/dist/applicants/applicant-expenditure.model.d.ts +99 -50
- package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.js +49 -18
- package/dist/applicants/applicant-income-source.model.d.ts +27 -0
- package/dist/applicants/applicant-income-source.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income.model.d.ts +38 -0
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income.model.js +5 -1
- package/dist/applicants/applicant-other-income.model.d.ts +26 -0
- package/dist/applicants/applicant-other-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-property-income.model.d.ts +26 -0
- package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-risk-narrative.model.d.ts +27 -0
- package/dist/applicants/applicant-risk-narrative.model.d.ts.map +1 -1
- package/dist/applicants/applicant.model.d.ts +716 -3096
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- package/dist/applicants/applicant.model.js +0 -2
- package/dist/applicants/index.d.ts +2 -0
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applicants/index.js +2 -0
- package/dist/applications/application-audit.model.d.ts +27 -0
- package/dist/applications/application-audit.model.d.ts.map +1 -1
- package/dist/applications/application-checklist-Item.model.d.ts +27 -0
- package/dist/applications/application-checklist-Item.model.d.ts.map +1 -1
- package/dist/applications/application-company-model.d.ts +26 -0
- package/dist/applications/application-company-model.d.ts.map +1 -1
- package/dist/applications/application-credit-profile.model.d.ts +27 -0
- package/dist/applications/application-credit-profile.model.d.ts.map +1 -1
- package/dist/applications/application-direct-debit.model.d.ts +26 -0
- package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
- package/dist/applications/application-document.model.d.ts +27 -0
- package/dist/applications/application-document.model.d.ts.map +1 -1
- package/dist/applications/application-fieldconfig.model.d.ts +27 -0
- package/dist/applications/application-fieldconfig.model.d.ts.map +1 -1
- package/dist/applications/application-illustration-model.d.ts +27 -0
- package/dist/applications/application-illustration-model.d.ts.map +1 -1
- package/dist/applications/application-legal.model.d.ts +27 -0
- package/dist/applications/application-legal.model.d.ts.map +1 -1
- package/dist/applications/application-mortgage.model.d.ts +26 -0
- package/dist/applications/application-mortgage.model.d.ts.map +1 -1
- package/dist/applications/application-note.model.d.ts +27 -0
- package/dist/applications/application-note.model.d.ts.map +1 -1
- package/dist/applications/application-offer.model.d.ts +27 -0
- package/dist/applications/application-offer.model.d.ts.map +1 -1
- package/dist/applications/application-onboarding.model.d.ts +27 -0
- package/dist/applications/application-onboarding.model.d.ts.map +1 -1
- package/dist/applications/application-product.model.d.ts +27 -0
- package/dist/applications/application-product.model.d.ts.map +1 -1
- package/dist/applications/application-rationale.model.d.ts +27 -0
- package/dist/applications/application-rationale.model.d.ts.map +1 -1
- package/dist/applications/application-risk-narrative.model.d.ts +27 -0
- package/dist/applications/application-risk-narrative.model.d.ts.map +1 -1
- package/dist/applications/application-valuation.model.d.ts +27 -0
- package/dist/applications/application-valuation.model.d.ts.map +1 -1
- package/dist/applications/application.model.d.ts +27 -0
- package/dist/applications/application.model.d.ts.map +1 -1
- package/dist/applications/broker.model.d.ts +27 -0
- package/dist/applications/broker.model.d.ts.map +1 -1
- package/dist/applications/document.model.d.ts +27 -0
- package/dist/applications/document.model.d.ts.map +1 -1
- package/dist/applications/productfeatures.model.d.ts +27 -0
- package/dist/applications/productfeatures.model.d.ts.map +1 -1
- package/dist/applications/solicitor.model.d.ts +26 -0
- package/dist/applications/solicitor.model.d.ts.map +1 -1
- package/dist/entities/applicants/applicant.entity.d.ts +0 -3
- package/dist/entities/applicants/applicant.entity.d.ts.map +1 -1
- package/dist/entities/applicants/applicant.entity.js +0 -3
- package/dist/entities/applicants/employment.entity.d.ts +1 -3
- package/dist/entities/applicants/employment.entity.d.ts.map +1 -1
- package/dist/entities/applicants/employment.entity.js +1 -9
- package/dist/entities/applications/company.entity.d.ts +2 -2
- package/dist/entities/applications/solicitor.entity.d.ts +1 -1
- package/dist/entities/properties/property.entity.d.ts +2 -2
- package/dist/entities/properties/property.entity.d.ts.map +1 -1
- package/dist/product-catalogues/product-catalogue.model.d.ts +27 -0
- package/dist/product-catalogues/product-catalogue.model.d.ts.map +1 -1
- package/dist/product-catalogues/product-definitions.model.d.ts +27 -0
- package/dist/product-catalogues/product-definitions.model.d.ts.map +1 -1
- package/dist/product-catalogues/product-variant.model.d.ts +27 -0
- package/dist/product-catalogues/product-variant.model.d.ts.map +1 -1
- package/dist/properties/property.model.d.ts +26 -0
- package/dist/properties/property.model.d.ts.map +1 -1
- package/dist/properties/security.model.d.ts +27 -0
- package/dist/properties/security.model.d.ts.map +1 -1
- package/dist/shared/alert.model.d.ts +27 -0
- package/dist/shared/alert.model.d.ts.map +1 -1
- package/dist/shared/apprivo-sync-journey.model.d.ts +27 -0
- package/dist/shared/apprivo-sync-journey.model.d.ts.map +1 -1
- package/dist/shared/checklist.model.d.ts +27 -0
- package/dist/shared/checklist.model.d.ts.map +1 -1
- package/dist/shared/document-type-model.d.ts +27 -0
- package/dist/shared/document-type-model.d.ts.map +1 -1
- package/dist/shared/job-run.model.d.ts +27 -0
- package/dist/shared/job-run.model.d.ts.map +1 -1
- package/dist/shared/job-setting.model.d.ts +27 -0
- package/dist/shared/job-setting.model.d.ts.map +1 -1
- package/dist/shared/lookup-group.model.d.ts +27 -0
- package/dist/shared/lookup-group.model.d.ts.map +1 -1
- package/dist/shared/lookup.model.d.ts +27 -0
- package/dist/shared/lookup.model.d.ts.map +1 -1
- package/dist/shared/schema-doc.model.d.ts +27 -0
- package/dist/shared/schema-doc.model.d.ts.map +1 -1
- package/dist/shared/system-parameter.model.d.ts +27 -0
- package/dist/shared/system-parameter.model.d.ts.map +1 -1
- package/dist/shared/task-document.model.d.ts +27 -0
- package/dist/shared/task-document.model.d.ts.map +1 -1
- package/dist/shared/task.model.d.ts +27 -0
- package/dist/shared/task.model.d.ts.map +1 -1
- package/dist/underwriter/underwriter.model.d.ts +27 -0
- package/dist/underwriter/underwriter.model.d.ts.map +1 -1
- package/dist/users/auth-log.model.d.ts +27 -0
- package/dist/users/auth-log.model.d.ts.map +1 -1
- package/dist/users/permission.model.d.ts +27 -0
- package/dist/users/permission.model.d.ts.map +1 -1
- package/dist/users/role-group.model.d.ts +27 -0
- package/dist/users/role-group.model.d.ts.map +1 -1
- package/dist/users/role.model.d.ts +27 -0
- package/dist/users/role.model.d.ts.map +1 -1
- package/dist/users/tasks.model.d.ts +27 -0
- package/dist/users/tasks.model.d.ts.map +1 -1
- package/dist/users/user.model.d.ts +27 -0
- package/dist/users/user.model.d.ts.map +1 -1
- package/dist/value-objects/pound.d.ts +26 -0
- package/dist/value-objects/pound.d.ts.map +1 -1
- package/dist/value-objects/sort-code.d.ts +26 -0
- package/dist/value-objects/sort-code.d.ts.map +1 -1
- package/entities/applicants/{credit-data.entity.ts → applicant-credit-data.entity.ts} +2 -2
- package/entities/{applications/credit-profile.entity.ts → applicants/applicant-credit-profile.entity.ts} +8 -2
- package/entities/applicants/applicant-employment-income.entity.ts +14 -0
- package/entities/applicants/{employment.entity.ts → applicant-employment.entity.ts} +1 -17
- package/entities/applicants/applicant-expenditure.entity.ts +15 -0
- package/entities/applicants/{income-source.entity.ts → applicant-income-source.entity.ts} +2 -2
- package/entities/applicants/{income.entity.ts → applicant-income.entity.ts} +9 -6
- package/entities/applicants/applicant.entity.ts +11 -17
- package/entities/applicants/index.ts +6 -6
- package/entities/{applicants/credit-profile.entity.ts → applications/application-credit-profile.entity.ts} +2 -2
- package/entities/applications/application-rationale.entity.ts +1 -1
- package/entities/applications/company.entity.ts +2 -1
- package/entities/applications/index.ts +1 -1
- package/entities/applications/solicitor.entity.ts +1 -1
- package/entities/properties/property.entity.ts +2 -2
- package/package.json +2 -2
- package/prisma/applicants/{credit-data.prisma → applicant-credit-data.prisma} +2 -2
- package/prisma/applicants/{credit-profile.prisma → applicant-credit-profile.prisma} +3 -2
- package/prisma/applicants/applicant-employment-income.prisma +14 -0
- package/prisma/applicants/applicant-employment.prisma +54 -0
- package/prisma/applicants/applicant-expenditure.prisma +14 -0
- package/prisma/applicants/{income-source.prisma → applicant-income-source.prisma} +2 -2
- package/prisma/applicants/{income.prisma → applicant-income.prisma} +10 -5
- package/prisma/applicants/{other-income.prisma → applicant-other-income.prisma} +2 -2
- package/prisma/applicants/{property-income.prisma → applicant-property-income.prisma} +3 -2
- package/prisma/applicants/applicant.prisma +10 -10
- package/prisma/applications/{credit-profile.prisma → application-credit-profile.prisma} +6 -2
- package/prisma/applications/application.prisma +1 -1
- package/prisma/migrations/{20250430124915_initial_migration → 20250501070203_initial_migration}/migration.sql +309 -382
- package/prisma/schema.prisma +1187 -1258
- package/prisma/shared/lookup.prisma +17 -26
- package/entities/applicants/direct-debit.entity.ts +0 -30
- package/entities/applicants/expenditure.entity.ts +0 -29
- package/entities/applicants/risk-narrative.entity.ts +0 -28
- package/entities/applications/application-risk-narrative.entity.ts +0 -22
- package/entities/applications/application-valuation.entity.ts +0 -20
- package/prisma/applicants/direct-debit.prisma +0 -26
- package/prisma/applicants/employment.prisma +0 -59
- package/prisma/applicants/expenditure.prisma +0 -26
- package/prisma/applicants/risk-narrative.prisma +0 -23
- package/prisma/applications/application-risk-narrative.prisma +0 -18
- package/prisma/applications/application-valuation.prisma +0 -18
- package/prisma/lookup.entity.ts +0 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
model
|
|
1
|
+
model ApplicantCreditProfile {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
4
4
|
bankruptcyNo String @map("bankruptcy_no")
|
|
@@ -6,9 +6,10 @@ model CreditProfile {
|
|
|
6
6
|
defaultsInLastYearNo String @map("defaults_in_last_year_no")
|
|
7
7
|
createdAt DateTime @default(now()) @map("created_at")
|
|
8
8
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
9
|
+
applicantId String @unique @map("applicant_id")
|
|
9
10
|
|
|
10
11
|
// Relations
|
|
11
|
-
|
|
12
|
+
applicant Applicant @relation("ApplicantCreditProfile", fields: [applicantId], references: [id])
|
|
12
13
|
|
|
13
14
|
@@map("applicant_credit_profiles")
|
|
14
15
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
model ApplicantEmploymentIncome {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicantId String @unique @map("applicant_id")
|
|
4
|
+
incomeTypeLid String @map("income_type_lid")
|
|
5
|
+
amount Decimal @map("amount")
|
|
6
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
7
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
|
+
|
|
9
|
+
// Relations
|
|
10
|
+
applicant Applicant @relation("ApplicantEmploymentIncome", fields: [applicantId], references: [id])
|
|
11
|
+
incomeType Lookup @relation("ApplicantEmploymentIncomeType", fields: [incomeTypeLid], references: [id])
|
|
12
|
+
|
|
13
|
+
@@map("applicant_employment_incomes")
|
|
14
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
model ApplicantEmployment {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
4
|
+
acceptableIncomeLids String[] @map("acceptable_income_lids")
|
|
5
|
+
addressCity String? @map("address_city")
|
|
6
|
+
addressCountryLid String @map("address_country_lid")
|
|
7
|
+
addressLine1 String @map("address_line1")
|
|
8
|
+
addressLine2 String? @map("address_line2")
|
|
9
|
+
addressLine3 String? @map("address_line3")
|
|
10
|
+
addressPostCode String @map("address_post_code")
|
|
11
|
+
averageBonusPreviousTwoYears Decimal @default(0.00) @map("average_bonus_previous_two_years")
|
|
12
|
+
basicGrossIncome Decimal @default(0.00) @map("basic_gross_income")
|
|
13
|
+
contractRemaining String? @map("contract_remaining")
|
|
14
|
+
dateJoined String @map("date_joined")
|
|
15
|
+
disabilityLiving Decimal @default(0.00) @map("disability_living")
|
|
16
|
+
employerName String @map("employer_name")
|
|
17
|
+
employerTelephone String? @map("employer_telephone")
|
|
18
|
+
housingAllowance Decimal @default(0.00) @map("housing_allowance")
|
|
19
|
+
industryLid String @map("industry_lid")
|
|
20
|
+
isUnderTerminationNotice Boolean @default(false) @map("is_under_termination_notice")
|
|
21
|
+
jobTitleLid String @map("job_title_lid")
|
|
22
|
+
maintenance Decimal @default(0.00) @map("maintenance")
|
|
23
|
+
maternityIncome Decimal @default(0.00) @map("maternity_income")
|
|
24
|
+
natureOfBusiness String @map("nature_of_business")
|
|
25
|
+
pensionIncome Decimal @default(0.00) @map("pension_income")
|
|
26
|
+
previousAddressCity String? @map("previous_address_city")
|
|
27
|
+
previousAddressCountry String @map("previous_address_country")
|
|
28
|
+
previousAddressLine1 String @map("previous_address_line1")
|
|
29
|
+
previousAddressLine2 String? @map("previous_address_line2")
|
|
30
|
+
previousAddressLine3 String? @map("previous_address_line3")
|
|
31
|
+
previousAddressPostCode String @map("previous_address_post_code")
|
|
32
|
+
previousBasicGrossIncome Decimal @default(0.00) @map("previous_basic_gross_income")
|
|
33
|
+
previousDateJoined String @map("previous_date_joined")
|
|
34
|
+
previousDateLeft String @map("previous_date_left")
|
|
35
|
+
previousEmployerName String @map("previous_employer_name")
|
|
36
|
+
previousEmployerTelephone String? @map("previous_employer_telephone")
|
|
37
|
+
previousJobTitle String @map("previous_job_title")
|
|
38
|
+
previousNatureOfBusiness String @map("previous_nature_of_business")
|
|
39
|
+
referenceContact String? @map("reference_contact")
|
|
40
|
+
referenceContactEmail String @map("reference_contact_email")
|
|
41
|
+
underTerminationNoticeNote String? @map("under_termination_notice_note")
|
|
42
|
+
applicantId String @unique @map("applicant_id")
|
|
43
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
44
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
45
|
+
|
|
46
|
+
// Relations
|
|
47
|
+
applicant Applicant @relation("ApplicantEmployment", fields: [applicantId], references: [id])
|
|
48
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
49
|
+
industry Lookup @relation("Industry", fields: [industryLid], references: [id])
|
|
50
|
+
jobTitle Lookup @relation("JobTitle", fields: [jobTitleLid], references: [id])
|
|
51
|
+
acceptableIncomeTypes Lookup[] @relation("AcceptableIncomeTypes")
|
|
52
|
+
|
|
53
|
+
@@map("applicant_employments")
|
|
54
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
model ApplicantExpenditure {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
applicantId String @map("applicant_id")
|
|
4
|
+
expenditureTypeLid String @map("expenditure_type_lid")
|
|
5
|
+
amount Decimal @map("amount")
|
|
6
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
7
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
8
|
+
|
|
9
|
+
// Relations
|
|
10
|
+
applicant Applicant @relation("ApplicantExpenditures",fields: [applicantId], references: [id])
|
|
11
|
+
expenditureType Lookup @relation("ExpenditureType", fields: [expenditureTypeLid], references: [id])
|
|
12
|
+
|
|
13
|
+
@@map("applicant_expenditures")
|
|
14
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
model
|
|
1
|
+
model ApplicantIncomeSource {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
employmentStatusLid String? @map("employment_status_lid")
|
|
4
4
|
incomeFromEmployment String?
|
|
@@ -10,7 +10,7 @@ model IncomeSource {
|
|
|
10
10
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
11
11
|
|
|
12
12
|
// Relations
|
|
13
|
-
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
13
|
+
applicant Applicant @relation("ApplicantIncomeSource", fields: [applicantId], references: [id])
|
|
14
14
|
employmentStatus Lookup? @relation("IncomeSourceEmploymentStatus", fields: [employmentStatusLid], references: [id])
|
|
15
15
|
|
|
16
16
|
@@map("applicant_income_source")
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
model
|
|
1
|
+
model ApplicantIncome {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
+
applicantId String @map("applicant_id")
|
|
3
4
|
accountantsAddressLine1 String @map("accountants_address_line1")
|
|
4
5
|
accountantsAddressLine2 String @map("accountants_address_line2")
|
|
5
6
|
accountantsAddressLine3 String @map("accountants_address_line3")
|
|
@@ -47,6 +48,10 @@ model Income {
|
|
|
47
48
|
yearEnd1 Int? @map("year_end1")
|
|
48
49
|
yearEnd2 Int? @map("year_end2")
|
|
49
50
|
yearEnd3 Int? @map("year_end3")
|
|
51
|
+
totalEmploymentGrossIncome Decimal @map("total_employment_gross_income")
|
|
52
|
+
totalEmploymentNetIncome Decimal @map("total_employment_net_income")
|
|
53
|
+
isEmploymentIncomeConfirmed Boolean @map("is_employment_income_confirmed")
|
|
54
|
+
employmentIncomeRationale String
|
|
50
55
|
createdAt DateTime @default(now()) @map("created_at")
|
|
51
56
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
52
57
|
|
|
@@ -56,7 +61,7 @@ model Income {
|
|
|
56
61
|
businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
|
|
57
62
|
charteredCertifiedOrOther Lookup @relation("CharteredCertifiedOrOther", fields: [charteredCertifiedOrOtherLid], references: [id])
|
|
58
63
|
registeredCountry Lookup @relation("RegisteredCountry", fields: [registeredCountryLid], references: [id])
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
@@map("
|
|
62
|
-
}
|
|
64
|
+
applicant Applicant @relation("ApplicantIncome", fields: [applicantId], references: [id])
|
|
65
|
+
|
|
66
|
+
@@map("applicant_incomes")
|
|
67
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
model
|
|
1
|
+
model ApplicantOtherIncome {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
// Income Source 1
|
|
4
4
|
sourceDetails1 String?
|
|
@@ -35,7 +35,7 @@ model OtherIncome {
|
|
|
35
35
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
36
36
|
|
|
37
37
|
// Relations
|
|
38
|
-
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
38
|
+
applicant Applicant @relation("ApplicantOtherIncome", fields: [applicantId], references: [id])
|
|
39
39
|
payFrequency1 Lookup? @relation("PayFrequency1", fields: [payFrequency1Lid], references: [id])
|
|
40
40
|
payFrequency2 Lookup? @relation("PayFrequency2", fields: [payFrequency2Lid], references: [id])
|
|
41
41
|
payFrequency3 Lookup? @relation("PayFrequency3", fields: [payFrequency3Lid], references: [id])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
model
|
|
1
|
+
model ApplicantPropertyIncome {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
4
4
|
yearEnd1 String @map("year_end_1")
|
|
@@ -10,11 +10,12 @@ model PropertyIncome {
|
|
|
10
10
|
yearEnd3 String @map("year_end_3")
|
|
11
11
|
rentalIncome3 Decimal @map("rental_income_3")
|
|
12
12
|
netProfit3 Decimal @map("net_profit_3")
|
|
13
|
+
applicantId String @unique @map("applicant_id")
|
|
13
14
|
createdAt DateTime @default(now()) @map("created_at")
|
|
14
15
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
15
16
|
|
|
16
17
|
// Relations
|
|
17
|
-
|
|
18
|
+
applicant Applicant @relation("ApplicantPropertyIncome", fields: [applicantId], references: [id])
|
|
18
19
|
|
|
19
20
|
@@map("applicant_property_income")
|
|
20
21
|
}
|
|
@@ -108,16 +108,16 @@ model Applicant {
|
|
|
108
108
|
taxPayer Lookup @relation("TaxPayer", fields: [taxPayerLid], references: [id])
|
|
109
109
|
ukPassportProfession Lookup? @relation("UkPassportProfession", fields: [ukPassportProfessionLid], references: [id])
|
|
110
110
|
vulnerabilityTypes Lookup[] @relation("VulnerabilityTypes")
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
employment
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
otherIncome ApplicantOtherIncome? @relation("ApplicantOtherIncome")
|
|
112
|
+
incomeSource ApplicantIncomeSource? @relation("ApplicantIncomeSource")
|
|
113
|
+
creditProfile ApplicantCreditProfile? @relation("ApplicantCreditProfile")
|
|
114
|
+
propertyIncome ApplicantPropertyIncome? @relation("ApplicantPropertyIncome")
|
|
115
|
+
|
|
116
|
+
employment ApplicantEmployment? @relation("ApplicantEmployment")
|
|
117
|
+
creditData ApplicantCreditData? @relation("ApplicantCreditData")
|
|
118
|
+
employmentIncome ApplicantEmploymentIncome? @relation("ApplicantEmploymentIncome")
|
|
119
|
+
expenditures ApplicantExpenditure[] @relation("ApplicantExpenditures")
|
|
120
|
+
incomes ApplicantIncome[] @relation("ApplicantIncome")
|
|
121
121
|
creditCardCommitments CreditCardCommitment[] @relation("ApplicantCreditCardCommitments")
|
|
122
122
|
loanCommitments LoanCommitment[] @relation("ApplicantLoanCommitments")
|
|
123
123
|
mortgageCommitments MortgageCommitment[] @relation("ApplicantMortgageCommitments")
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
model
|
|
1
|
+
model ApplicationCreditProfile {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
4
4
|
bankruptcyNo String @map("bankruptcy_no")
|
|
5
5
|
ccjInLastThreeYearNo String @map("ccj_in_last_three_year_no")
|
|
6
6
|
defaultsInLastYearNo String @map("defaults_in_last_year_no")
|
|
7
|
+
applicationId String @unique @map("application_id")
|
|
7
8
|
createdAt DateTime @default(now()) @map("created_at")
|
|
8
9
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
// Relations
|
|
12
|
+
application Application @relation("ApplicationCreditProfile", fields: [applicationId], references: [id])
|
|
13
|
+
|
|
14
|
+
@@map("application_credit_profiles")
|
|
11
15
|
}
|
|
@@ -70,6 +70,7 @@ model Application {
|
|
|
70
70
|
solicitor Solicitor?
|
|
71
71
|
product Product? @relation(fields: [productId], references: [id])
|
|
72
72
|
directDebit ApplicationDirectDebit? @relation("ApplicationDirectDebit")
|
|
73
|
+
creditProfile ApplicationCreditProfile? @relation("ApplicationCreditProfile")
|
|
73
74
|
mortgage ApplicationMortgage? @relation("ApplicationMortgage")
|
|
74
75
|
company ApplicationCompany? @relation("ApplicationCompany")
|
|
75
76
|
rationale ApplicationRationale? @relation("ApplicationRationale")
|
|
@@ -80,7 +81,6 @@ model Application {
|
|
|
80
81
|
audits ApplicationAudit[]
|
|
81
82
|
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
82
83
|
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
83
|
-
directDebits DirectDebit[] @relation("ApplicationDirectDebits")
|
|
84
84
|
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
85
85
|
companies Company[] @relation("ApplicationCompany")
|
|
86
86
|
|