@dynamatix/gb-schemas 1.2.80 → 2.0.0
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 +0 -26
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-loan.model.d.ts +0 -26
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +0 -26
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-residence.model.d.ts +0 -26
- package/dist/applicants/applicant-commitment-residence.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +0 -26
- package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +0 -26
- package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-credit-data.model.d.ts +0 -27
- package/dist/applicants/applicant-credit-data.model.d.ts.map +1 -1
- package/dist/applicants/applicant-credit-profile.model.d.ts +0 -27
- package/dist/applicants/applicant-credit-profile.model.d.ts.map +1 -1
- package/dist/applicants/applicant-direct-debit.model.d.ts +0 -27
- package/dist/applicants/applicant-direct-debit.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment.model.d.ts +0 -26
- package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.d.ts +50 -99
- package/dist/applicants/applicant-expenditure.model.d.ts.map +1 -1
- package/dist/applicants/applicant-expenditure.model.js +18 -49
- package/dist/applicants/applicant-income-source.model.d.ts +0 -27
- package/dist/applicants/applicant-income-source.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income.model.d.ts +0 -26
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-other-income.model.d.ts +0 -26
- package/dist/applicants/applicant-other-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-property-income.model.d.ts +0 -26
- package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-risk-narrative.model.d.ts +0 -27
- package/dist/applicants/applicant-risk-narrative.model.d.ts.map +1 -1
- package/dist/applicants/applicant.model.d.ts +0 -26
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- package/dist/applicants/index.d.ts +0 -1
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applicants/index.js +0 -1
- package/dist/applications/application-audit.model.d.ts +0 -27
- package/dist/applications/application-audit.model.d.ts.map +1 -1
- package/dist/applications/application-checklist-Item.model.d.ts +0 -27
- package/dist/applications/application-checklist-Item.model.d.ts.map +1 -1
- package/dist/applications/application-company-model.d.ts +0 -26
- package/dist/applications/application-company-model.d.ts.map +1 -1
- package/dist/applications/application-credit-profile.model.d.ts +0 -27
- package/dist/applications/application-credit-profile.model.d.ts.map +1 -1
- package/dist/applications/application-direct-debit.model.d.ts +0 -26
- package/dist/applications/application-direct-debit.model.d.ts.map +1 -1
- package/dist/applications/application-document.model.d.ts +0 -27
- package/dist/applications/application-document.model.d.ts.map +1 -1
- package/dist/applications/application-fieldconfig.model.d.ts +0 -27
- package/dist/applications/application-fieldconfig.model.d.ts.map +1 -1
- package/dist/applications/application-illustration-model.d.ts +0 -27
- package/dist/applications/application-illustration-model.d.ts.map +1 -1
- package/dist/applications/application-legal.model.d.ts +0 -27
- package/dist/applications/application-legal.model.d.ts.map +1 -1
- package/dist/applications/application-mortgage.model.d.ts +0 -26
- package/dist/applications/application-mortgage.model.d.ts.map +1 -1
- package/dist/applications/application-note.model.d.ts +0 -27
- package/dist/applications/application-note.model.d.ts.map +1 -1
- package/dist/applications/application-offer.model.d.ts +0 -27
- package/dist/applications/application-offer.model.d.ts.map +1 -1
- package/dist/applications/application-onboarding.model.d.ts +0 -27
- package/dist/applications/application-onboarding.model.d.ts.map +1 -1
- package/dist/applications/application-product.model.d.ts +0 -27
- package/dist/applications/application-product.model.d.ts.map +1 -1
- package/dist/applications/application-rationale.model.d.ts +0 -27
- package/dist/applications/application-rationale.model.d.ts.map +1 -1
- package/dist/applications/application-risk-narrative.model.d.ts +0 -27
- package/dist/applications/application-risk-narrative.model.d.ts.map +1 -1
- package/dist/applications/application-valuation.model.d.ts +0 -27
- package/dist/applications/application-valuation.model.d.ts.map +1 -1
- package/dist/applications/application.model.d.ts +0 -27
- package/dist/applications/application.model.d.ts.map +1 -1
- package/dist/applications/broker.model.d.ts +0 -27
- package/dist/applications/broker.model.d.ts.map +1 -1
- package/dist/applications/document.model.d.ts +0 -27
- package/dist/applications/document.model.d.ts.map +1 -1
- package/dist/applications/productfeatures.model.d.ts +0 -27
- package/dist/applications/productfeatures.model.d.ts.map +1 -1
- package/dist/applications/solicitor.model.d.ts +0 -26
- package/dist/applications/solicitor.model.d.ts.map +1 -1
- package/dist/entities/applicants/applicant.entity.d.ts +148 -0
- package/dist/entities/applicants/applicant.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant.entity.js +51 -0
- package/dist/entities/applicants/credit-card-commitment.entity.d.ts +16 -0
- package/dist/entities/applicants/credit-card-commitment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/credit-card-commitment.entity.js +5 -0
- package/dist/entities/applicants/credit-data.entity.d.ts +19 -0
- package/dist/entities/applicants/credit-data.entity.d.ts.map +1 -0
- package/dist/entities/applicants/credit-data.entity.js +5 -0
- package/dist/entities/applicants/credit-profile.entity.d.ts +11 -0
- package/dist/entities/applicants/credit-profile.entity.d.ts.map +1 -0
- package/dist/entities/applicants/credit-profile.entity.js +5 -0
- package/dist/entities/applicants/direct-debit.entity.d.ts +25 -0
- package/dist/entities/applicants/direct-debit.entity.d.ts.map +1 -0
- package/dist/entities/applicants/direct-debit.entity.js +5 -0
- package/dist/entities/applicants/employment.entity.d.ts +61 -0
- package/dist/entities/applicants/employment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/employment.entity.js +10 -0
- package/dist/entities/applicants/expenditure.entity.d.ts +24 -0
- package/dist/entities/applicants/expenditure.entity.d.ts.map +1 -0
- package/dist/entities/applicants/expenditure.entity.js +5 -0
- package/dist/entities/applicants/income-source.entity.d.ts +17 -0
- package/dist/entities/applicants/income-source.entity.d.ts.map +1 -0
- package/dist/entities/applicants/income-source.entity.js +5 -0
- package/dist/entities/applicants/income.entity.d.ts +54 -0
- package/dist/entities/applicants/income.entity.d.ts.map +1 -0
- package/dist/entities/applicants/income.entity.js +5 -0
- package/dist/entities/applicants/index.d.ts +20 -0
- package/dist/entities/applicants/index.d.ts.map +1 -0
- package/dist/entities/applicants/index.js +18 -0
- package/dist/entities/applicants/loan-commitment.entity.d.ts +20 -0
- package/dist/entities/applicants/loan-commitment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/loan-commitment.entity.js +5 -0
- package/dist/entities/applicants/lookup.entity.d.ts +10 -0
- package/dist/entities/applicants/lookup.entity.d.ts.map +1 -0
- package/dist/entities/applicants/lookup.entity.js +5 -0
- package/dist/entities/applicants/mortgage-commitment.entity.d.ts +37 -0
- package/dist/entities/applicants/mortgage-commitment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/mortgage-commitment.entity.js +19 -0
- package/dist/entities/applicants/other-income.entity.d.ts +41 -0
- package/dist/entities/applicants/other-income.entity.d.ts.map +1 -0
- package/dist/entities/applicants/other-income.entity.js +19 -0
- package/dist/entities/applicants/property-income.entity.d.ts +17 -0
- package/dist/entities/applicants/property-income.entity.d.ts.map +1 -0
- package/dist/entities/applicants/property-income.entity.js +5 -0
- package/dist/entities/applicants/residence-commitment.entity.d.ts +44 -0
- package/dist/entities/applicants/residence-commitment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/residence-commitment.entity.js +19 -0
- package/dist/entities/applicants/risk-narrative.entity.d.ts +23 -0
- package/dist/entities/applicants/risk-narrative.entity.d.ts.map +1 -0
- package/dist/entities/applicants/risk-narrative.entity.js +5 -0
- package/dist/entities/applicants/secure-loan-commitment.entity.d.ts +21 -0
- package/dist/entities/applicants/secure-loan-commitment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/secure-loan-commitment.entity.js +9 -0
- package/dist/entities/applicants/unsecured-loan-commitment.entity.d.ts +20 -0
- package/dist/entities/applicants/unsecured-loan-commitment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/unsecured-loan-commitment.entity.js +10 -0
- package/dist/entities/applications/application-audit.entity.d.ts +18 -0
- package/dist/entities/applications/application-audit.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-audit.entity.js +5 -0
- package/dist/entities/applications/application-company.entity.d.ts +12 -0
- package/dist/entities/applications/application-company.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-company.entity.js +5 -0
- package/dist/entities/applications/application-direct-debit.entity.d.ts +12 -0
- package/dist/entities/applications/application-direct-debit.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-direct-debit.entity.js +5 -0
- package/dist/entities/applications/application-document.entity.d.ts +28 -0
- package/dist/entities/applications/application-document.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-document.entity.js +5 -0
- package/dist/entities/applications/application-fieldconfig.entity.d.ts +9 -0
- package/dist/entities/applications/application-fieldconfig.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-fieldconfig.entity.js +5 -0
- package/dist/entities/applications/application-illustration.entity.d.ts +8 -0
- package/dist/entities/applications/application-illustration.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-illustration.entity.js +5 -0
- package/dist/entities/applications/application-legal.entity.d.ts +9 -0
- package/dist/entities/applications/application-legal.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-legal.entity.js +5 -0
- package/dist/entities/applications/application-mortgage.entity.d.ts +55 -0
- package/dist/entities/applications/application-mortgage.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-mortgage.entity.js +27 -0
- package/dist/entities/applications/application-note.entity.d.ts +36 -0
- package/dist/entities/applications/application-note.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-note.entity.js +5 -0
- package/dist/entities/applications/application-offer.entity.d.ts +8 -0
- package/dist/entities/applications/application-offer.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-offer.entity.js +5 -0
- package/dist/entities/applications/application-onboarding.entity.d.ts +11 -0
- package/dist/entities/applications/application-onboarding.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-onboarding.entity.js +5 -0
- package/dist/entities/applications/application-product.entity.d.ts +33 -0
- package/dist/entities/applications/application-product.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-product.entity.js +5 -0
- package/dist/entities/applications/application-rationale.entity.d.ts +51 -0
- package/dist/entities/applications/application-rationale.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-rationale.entity.js +5 -0
- package/dist/entities/applications/application-risk-narrative.entity.d.ts +17 -0
- package/dist/entities/applications/application-risk-narrative.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-risk-narrative.entity.js +5 -0
- package/dist/entities/applications/application-valuation.entity.d.ts +18 -0
- package/dist/entities/applications/application-valuation.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-valuation.entity.js +5 -0
- package/dist/entities/applications/application.entity.d.ts +99 -0
- package/dist/entities/applications/application.entity.d.ts.map +1 -0
- package/dist/entities/applications/application.entity.js +66 -0
- package/dist/entities/applications/broker.entity.d.ts +23 -0
- package/dist/entities/applications/broker.entity.d.ts.map +1 -0
- package/dist/entities/applications/broker.entity.js +5 -0
- package/dist/entities/applications/checklist-item.entity.d.ts +47 -0
- package/dist/entities/applications/checklist-item.entity.d.ts.map +1 -0
- package/dist/entities/applications/checklist-item.entity.js +5 -0
- package/dist/entities/applications/company.entity.d.ts +77 -0
- package/dist/entities/applications/company.entity.d.ts.map +1 -0
- package/dist/entities/applications/company.entity.js +23 -0
- package/dist/entities/applications/credit-profile.entity.d.ts +11 -0
- package/dist/entities/applications/credit-profile.entity.d.ts.map +1 -0
- package/dist/entities/applications/credit-profile.entity.js +5 -0
- package/dist/entities/applications/index.d.ts +25 -0
- package/dist/entities/applications/index.d.ts.map +1 -0
- package/dist/entities/applications/index.js +23 -0
- package/dist/entities/applications/product-features.entity.d.ts +54 -0
- package/dist/entities/applications/product-features.entity.d.ts.map +1 -0
- package/dist/entities/applications/product-features.entity.js +5 -0
- package/dist/entities/applications/solicitor.entity.d.ts +33 -0
- package/dist/entities/applications/solicitor.entity.d.ts.map +1 -0
- package/dist/entities/applications/solicitor.entity.js +5 -0
- package/dist/entities/index.d.ts +10 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +10 -0
- package/dist/entities/prisma.d.ts +3 -0
- package/dist/entities/prisma.d.ts.map +1 -0
- package/dist/entities/prisma.js +10 -0
- package/dist/entities/product-catalogues/index.d.ts +8 -0
- package/dist/entities/product-catalogues/index.d.ts.map +1 -0
- package/dist/entities/product-catalogues/index.js +6 -0
- package/dist/entities/product-catalogues/product-catalogue.entity.d.ts +22 -0
- package/dist/entities/product-catalogues/product-catalogue.entity.d.ts.map +1 -0
- package/dist/entities/product-catalogues/product-catalogue.entity.js +5 -0
- package/dist/entities/product-catalogues/product-definition.entity.d.ts +16 -0
- package/dist/entities/product-catalogues/product-definition.entity.d.ts.map +1 -0
- package/dist/entities/product-catalogues/product-definition.entity.js +5 -0
- package/dist/entities/product-catalogues/product-variant.entity.d.ts +14 -0
- package/dist/entities/product-catalogues/product-variant.entity.d.ts.map +1 -0
- package/dist/entities/product-catalogues/product-variant.entity.js +5 -0
- package/dist/entities/product-catalogues/product.entity.d.ts +11 -0
- package/dist/entities/product-catalogues/product.entity.d.ts.map +1 -0
- package/dist/entities/product-catalogues/product.entity.js +5 -0
- package/dist/entities/product-catalogues/rule.entity.d.ts +21 -0
- package/dist/entities/product-catalogues/rule.entity.d.ts.map +1 -0
- package/dist/entities/product-catalogues/rule.entity.js +5 -0
- package/dist/entities/properties/data-street.entity.d.ts +22 -0
- package/dist/entities/properties/data-street.entity.d.ts.map +1 -0
- package/dist/entities/properties/data-street.entity.js +5 -0
- package/dist/entities/properties/index.d.ts +6 -0
- package/dist/entities/properties/index.d.ts.map +1 -0
- package/dist/entities/properties/index.js +4 -0
- package/dist/entities/properties/property.entity.d.ts +30 -0
- package/dist/entities/properties/property.entity.d.ts.map +1 -0
- package/dist/entities/properties/property.entity.js +5 -0
- package/dist/entities/properties/security.entity.d.ts +57 -0
- package/dist/entities/properties/security.entity.d.ts.map +1 -0
- package/dist/entities/properties/security.entity.js +5 -0
- package/dist/entities/shared/alert.entity.d.ts +14 -0
- package/dist/entities/shared/alert.entity.d.ts.map +1 -0
- package/dist/entities/shared/alert.entity.js +5 -0
- package/dist/entities/shared/apprivo-sync-journey.entity.d.ts +16 -0
- package/dist/entities/shared/apprivo-sync-journey.entity.d.ts.map +1 -0
- package/dist/entities/shared/apprivo-sync-journey.entity.js +5 -0
- package/dist/entities/shared/checklist.entity.d.ts +15 -0
- package/dist/entities/shared/checklist.entity.d.ts.map +1 -0
- package/dist/entities/shared/checklist.entity.js +5 -0
- package/dist/entities/shared/document-type.entity.d.ts +9 -0
- package/dist/entities/shared/document-type.entity.d.ts.map +1 -0
- package/dist/entities/shared/document-type.entity.js +5 -0
- package/dist/entities/shared/index.d.ts +12 -0
- package/dist/entities/shared/index.d.ts.map +1 -0
- package/dist/entities/shared/index.js +10 -0
- package/dist/entities/shared/job-run.entity.d.ts +11 -0
- package/dist/entities/shared/job-run.entity.d.ts.map +1 -0
- package/dist/entities/shared/job-run.entity.js +5 -0
- package/dist/entities/shared/job-setting.entity.d.ts +11 -0
- package/dist/entities/shared/job-setting.entity.d.ts.map +1 -0
- package/dist/entities/shared/job-setting.entity.js +5 -0
- package/dist/entities/shared/lookup-group.entity.d.ts +11 -0
- package/dist/entities/shared/lookup-group.entity.d.ts.map +1 -0
- package/dist/entities/shared/lookup-group.entity.js +5 -0
- package/dist/entities/shared/lookup.entity.d.ts +14 -0
- package/dist/entities/shared/lookup.entity.d.ts.map +1 -0
- package/dist/entities/shared/lookup.entity.js +5 -0
- package/dist/entities/shared/system-parameter.entity.d.ts +10 -0
- package/dist/entities/shared/system-parameter.entity.d.ts.map +1 -0
- package/dist/entities/shared/system-parameter.entity.js +5 -0
- package/dist/entities/underwriter/index.d.ts +4 -0
- package/dist/entities/underwriter/index.d.ts.map +1 -0
- package/dist/entities/underwriter/index.js +2 -0
- package/dist/entities/underwriter/underwriter.entity.d.ts +16 -0
- package/dist/entities/underwriter/underwriter.entity.d.ts.map +1 -0
- package/dist/entities/underwriter/underwriter.entity.js +5 -0
- package/dist/entities/users/auth-log.entity.d.ts +11 -0
- package/dist/entities/users/auth-log.entity.d.ts.map +1 -0
- package/dist/entities/users/auth-log.entity.js +5 -0
- package/dist/entities/users/index.d.ts +8 -0
- package/dist/entities/users/index.d.ts.map +1 -0
- package/dist/entities/users/index.js +6 -0
- package/dist/entities/users/permission.entity.d.ts +12 -0
- package/dist/entities/users/permission.entity.d.ts.map +1 -0
- package/dist/entities/users/permission.entity.js +5 -0
- package/dist/entities/users/role-group.entity.d.ts +12 -0
- package/dist/entities/users/role-group.entity.d.ts.map +1 -0
- package/dist/entities/users/role-group.entity.js +5 -0
- package/dist/entities/users/role.entity.d.ts +14 -0
- package/dist/entities/users/role.entity.d.ts.map +1 -0
- package/dist/entities/users/role.entity.js +5 -0
- package/dist/entities/users/user.entity.d.ts +35 -0
- package/dist/entities/users/user.entity.d.ts.map +1 -0
- package/dist/entities/users/user.entity.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/product-catalogues/product-catalogue.model.d.ts +0 -27
- package/dist/product-catalogues/product-catalogue.model.d.ts.map +1 -1
- package/dist/product-catalogues/product-definitions.model.d.ts +0 -27
- package/dist/product-catalogues/product-definitions.model.d.ts.map +1 -1
- package/dist/product-catalogues/product-variant.model.d.ts +0 -27
- package/dist/product-catalogues/product-variant.model.d.ts.map +1 -1
- package/dist/properties/property.model.d.ts +0 -26
- package/dist/properties/property.model.d.ts.map +1 -1
- package/dist/properties/security.model.d.ts +0 -27
- package/dist/properties/security.model.d.ts.map +1 -1
- package/dist/shared/alert.model.d.ts +0 -27
- package/dist/shared/alert.model.d.ts.map +1 -1
- package/dist/shared/apprivo-sync-journey.model.d.ts +0 -27
- package/dist/shared/apprivo-sync-journey.model.d.ts.map +1 -1
- package/dist/shared/checklist.model.d.ts +0 -27
- package/dist/shared/checklist.model.d.ts.map +1 -1
- package/dist/shared/document-type-model.d.ts +0 -27
- package/dist/shared/document-type-model.d.ts.map +1 -1
- package/dist/shared/job-run.model.d.ts +0 -27
- package/dist/shared/job-run.model.d.ts.map +1 -1
- package/dist/shared/job-setting.model.d.ts +0 -27
- package/dist/shared/job-setting.model.d.ts.map +1 -1
- package/dist/shared/lookup-group.model.d.ts +0 -27
- package/dist/shared/lookup-group.model.d.ts.map +1 -1
- package/dist/shared/lookup.model.d.ts +0 -27
- package/dist/shared/lookup.model.d.ts.map +1 -1
- package/dist/shared/schema-doc.model.d.ts +0 -27
- package/dist/shared/schema-doc.model.d.ts.map +1 -1
- package/dist/shared/system-parameter.model.d.ts +0 -27
- package/dist/shared/system-parameter.model.d.ts.map +1 -1
- package/dist/shared/task-document.model.d.ts +0 -27
- package/dist/shared/task-document.model.d.ts.map +1 -1
- package/dist/shared/task.model.d.ts +0 -27
- package/dist/shared/task.model.d.ts.map +1 -1
- package/dist/underwriter/underwriter.model.d.ts +0 -27
- package/dist/underwriter/underwriter.model.d.ts.map +1 -1
- package/dist/users/auth-log.model.d.ts +0 -27
- package/dist/users/auth-log.model.d.ts.map +1 -1
- package/dist/users/permission.model.d.ts +0 -27
- package/dist/users/permission.model.d.ts.map +1 -1
- package/dist/users/role-group.model.d.ts +0 -27
- package/dist/users/role-group.model.d.ts.map +1 -1
- package/dist/users/role.model.d.ts +0 -27
- package/dist/users/role.model.d.ts.map +1 -1
- package/dist/users/tasks.model.d.ts +0 -27
- package/dist/users/tasks.model.d.ts.map +1 -1
- package/dist/users/user.model.d.ts +0 -27
- package/dist/users/user.model.d.ts.map +1 -1
- package/dist/value-objects/pound.d.ts +0 -26
- package/dist/value-objects/pound.d.ts.map +1 -1
- package/dist/value-objects/sort-code.d.ts +0 -26
- package/dist/value-objects/sort-code.d.ts.map +1 -1
- package/entities/applicants/applicant.entity.ts +201 -0
- package/entities/applicants/credit-card-commitment.entity.ts +20 -0
- package/entities/applicants/credit-data.entity.ts +24 -0
- package/entities/applicants/credit-profile.entity.ts +13 -0
- package/entities/applicants/direct-debit.entity.ts +30 -0
- package/entities/applicants/employment.entity.ts +71 -0
- package/entities/applicants/expenditure.entity.ts +29 -0
- package/entities/applicants/income-source.entity.ts +22 -0
- package/entities/applicants/income.entity.ts +58 -0
- package/entities/applicants/index.ts +59 -0
- package/entities/applicants/loan-commitment.entity.ts +24 -0
- package/entities/applicants/mortgage-commitment.entity.ts +56 -0
- package/entities/applicants/other-income.entity.ts +68 -0
- package/entities/applicants/property-income.entity.ts +19 -0
- package/entities/applicants/residence-commitment.entity.ts +63 -0
- package/entities/applicants/risk-narrative.entity.ts +28 -0
- package/entities/applicants/secure-loan-commitment.entity.ts +30 -0
- package/entities/applicants/unsecured-loan-commitment.entity.ts +30 -0
- package/entities/applications/application-audit.entity.ts +23 -0
- package/entities/applications/application-company.entity.ts +17 -0
- package/entities/applications/application-direct-debit.entity.ts +17 -0
- package/entities/applications/application-document.entity.ts +33 -0
- package/entities/applications/application-fieldconfig.entity.ts +11 -0
- package/entities/applications/application-illustration.entity.ts +10 -0
- package/entities/applications/application-legal.entity.ts +11 -0
- package/entities/applications/application-mortgage.entity.ts +82 -0
- package/entities/applications/application-note.entity.ts +41 -0
- package/entities/applications/application-offer.entity.ts +10 -0
- package/entities/applications/application-onboarding.entity.ts +13 -0
- package/entities/applications/application-product.entity.ts +38 -0
- package/entities/applications/application-rationale.entity.ts +56 -0
- package/entities/applications/application-risk-narrative.entity.ts +22 -0
- package/entities/applications/application-valuation.entity.ts +20 -0
- package/entities/applications/application.entity.ts +165 -0
- package/entities/applications/broker.entity.ts +25 -0
- package/entities/applications/checklist-item.entity.ts +49 -0
- package/entities/applications/company.entity.ts +102 -0
- package/entities/applications/credit-profile.entity.ts +13 -0
- package/entities/applications/index.ts +74 -0
- package/entities/applications/product-features.entity.ts +56 -0
- package/entities/applications/solicitor.entity.ts +38 -0
- package/entities/index.ts +14 -0
- package/entities/prisma.ts +13 -0
- package/entities/product-catalogues/index.ts +23 -0
- package/entities/product-catalogues/product-catalogue.entity.ts +27 -0
- package/entities/product-catalogues/product-definition.entity.ts +21 -0
- package/entities/product-catalogues/product-variant.entity.ts +19 -0
- package/entities/product-catalogues/product.entity.ts +16 -0
- package/entities/product-catalogues/rule.entity.ts +26 -0
- package/entities/properties/data-street.entity.ts +27 -0
- package/entities/properties/index.ts +17 -0
- package/entities/properties/property.entity.ts +36 -0
- package/entities/properties/security.entity.ts +62 -0
- package/entities/shared/alert.entity.ts +19 -0
- package/entities/shared/apprivo-sync-journey.entity.ts +21 -0
- package/entities/shared/checklist.entity.ts +20 -0
- package/entities/shared/document-type.entity.ts +11 -0
- package/entities/shared/index.ts +35 -0
- package/entities/shared/job-run.entity.ts +13 -0
- package/entities/shared/job-setting.entity.ts +13 -0
- package/entities/shared/lookup-group.entity.ts +16 -0
- package/entities/shared/lookup.entity.ts +19 -0
- package/entities/shared/system-parameter.entity.ts +13 -0
- package/entities/underwriter/index.ts +7 -0
- package/entities/underwriter/underwriter.entity.ts +19 -0
- package/entities/users/auth-log.entity.ts +13 -0
- package/entities/users/index.ts +23 -0
- package/entities/users/permission.entity.ts +17 -0
- package/entities/users/role-group.entity.ts +17 -0
- package/entities/users/role.entity.ts +19 -0
- package/entities/users/user.entity.ts +44 -0
- package/package.json +30 -17
- package/prisma/applicants/applicant.prisma +125 -0
- package/prisma/applicants/credit-card-commitment.prisma +21 -0
- package/prisma/applicants/credit-data.prisma +19 -0
- package/prisma/applicants/credit-profile.prisma +14 -0
- package/prisma/applicants/direct-debit.prisma +25 -0
- package/prisma/applicants/employment.prisma +59 -0
- package/prisma/applicants/expenditure.prisma +26 -0
- package/prisma/applicants/income-source.prisma +17 -0
- package/prisma/applicants/income.prisma +61 -0
- package/prisma/applicants/loan-commitment.prisma +25 -0
- package/prisma/applicants/mortgage-commitment.prisma +33 -0
- package/prisma/applicants/other-income.prisma +45 -0
- package/prisma/applicants/property-income.prisma +17 -0
- package/prisma/applicants/residence-commitment.prisma +40 -0
- package/prisma/applicants/risk-narrative.prisma +23 -0
- package/prisma/applicants/secured-loan-commitment.prisma +21 -0
- package/prisma/applicants/unsecured-loan-commitment.prisma +20 -0
- package/prisma/applications/application-audit.prisma +19 -0
- package/prisma/applications/application-company.prisma +11 -0
- package/prisma/applications/application-direct-debit.prisma +11 -0
- package/prisma/applications/application-document.prisma +28 -0
- package/prisma/applications/application-fieldconfig.prisma +9 -0
- package/prisma/applications/application-illustration.prisma +8 -0
- package/prisma/applications/application-legal.prisma +9 -0
- package/prisma/applications/application-mortgage.prisma +48 -0
- package/prisma/applications/application-note.prisma +35 -0
- package/prisma/applications/application-offer.prisma +8 -0
- package/prisma/applications/application-onboarding.prisma +11 -0
- package/prisma/applications/application-product.prisma +33 -0
- package/prisma/applications/application-rationale.prisma +51 -0
- package/prisma/applications/application-risk-narrative.prisma +18 -0
- package/prisma/applications/application-valuation.prisma +18 -0
- package/prisma/applications/application.prisma +83 -0
- package/prisma/applications/broker.prisma +23 -0
- package/prisma/applications/checklist-item.prisma +47 -0
- package/prisma/applications/checklist.prisma +19 -0
- package/prisma/applications/company.prisma +76 -0
- package/prisma/applications/credit-profile.prisma +11 -0
- package/prisma/applications/product-features.prisma +54 -0
- package/prisma/applications/solicitor.prisma +33 -0
- package/prisma/migrations/20250430085825_initial_migration/migration.sql +2090 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/product-catalogues/product-catalogue.prisma +22 -0
- package/prisma/product-catalogues/product-definition.prisma +39 -0
- package/prisma/product-catalogues/product-variant.prisma +15 -0
- package/prisma/product-catalogues/product.prisma +10 -0
- package/prisma/properties/property.prisma +30 -0
- package/prisma/properties/security.prisma +80 -0
- package/prisma/schema.prisma +1925 -0
- package/prisma/shared/alert.prisma +15 -0
- package/prisma/shared/apprivo-sync-journey.prisma +12 -0
- package/prisma/shared/checklist.prisma +10 -0
- package/prisma/shared/document-type.prisma +9 -0
- package/prisma/shared/job-run.prisma +11 -0
- package/prisma/shared/job-setting.prisma +11 -0
- package/prisma/shared/lookup-group.prisma +12 -0
- package/prisma/shared/lookup.prisma +144 -0
- package/prisma/shared/system-parameter.prisma +16 -0
- package/prisma/underwriter/underwriter.prisma +21 -0
- package/prisma/users/auth-log.prisma +11 -0
- package/prisma/users/permission.prisma +13 -0
- package/prisma/users/role-group.prisma +14 -0
- package/prisma/users/role.prisma +14 -0
- package/prisma/users/user.prisma +44 -0
|
@@ -0,0 +1,1925 @@
|
|
|
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
|
+
// From prisma/shared/alert.prisma
|
|
14
|
+
model Alert {
|
|
15
|
+
id String @id @default(uuid())
|
|
16
|
+
title String
|
|
17
|
+
message String
|
|
18
|
+
type String
|
|
19
|
+
isRead Boolean @default(false) @map("is_read")
|
|
20
|
+
userId String @map("user_id")
|
|
21
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
22
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
23
|
+
|
|
24
|
+
// Relations
|
|
25
|
+
user User @relation(fields: [userId], references: [id])
|
|
26
|
+
|
|
27
|
+
@@map("alerts")
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// From prisma/shared/apprivo-sync-journey.prisma
|
|
31
|
+
model ApprivoSyncJourney {
|
|
32
|
+
id String @id @default(uuid())
|
|
33
|
+
journeyId String @map("journey_id")
|
|
34
|
+
status String
|
|
35
|
+
error String?
|
|
36
|
+
startedAt DateTime @map("started_at")
|
|
37
|
+
completedAt DateTime? @map("completed_at")
|
|
38
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
39
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
40
|
+
|
|
41
|
+
@@map("apprivo_sync_journeys")
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// From prisma/shared/checklist.prisma
|
|
45
|
+
model Checklist {
|
|
46
|
+
id String @id @default(uuid())
|
|
47
|
+
name String
|
|
48
|
+
description String?
|
|
49
|
+
isActive Boolean @default(true) @map("is_active")
|
|
50
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
51
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
52
|
+
|
|
53
|
+
@@map("checklists")
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// From prisma/shared/document-type.prisma
|
|
57
|
+
model DocumentType {
|
|
58
|
+
id String @id @default(uuid())
|
|
59
|
+
name String
|
|
60
|
+
description String?
|
|
61
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
62
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
63
|
+
|
|
64
|
+
@@map("document_types")
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// From prisma/shared/job-run.prisma
|
|
68
|
+
model JobRun {
|
|
69
|
+
id String @id @default(uuid())
|
|
70
|
+
jobName String @map("job_name")
|
|
71
|
+
status String
|
|
72
|
+
startedAt DateTime @map("started_at")
|
|
73
|
+
completedAt DateTime? @map("completed_at")
|
|
74
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
75
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
76
|
+
|
|
77
|
+
@@map("job_runs")
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// From prisma/shared/job-setting.prisma
|
|
81
|
+
model JobSetting {
|
|
82
|
+
id String @id @default(uuid())
|
|
83
|
+
jobName String @map("job_name")
|
|
84
|
+
isActive Boolean @default(true) @map("is_active")
|
|
85
|
+
frequency String @default("2 hours") @map("frequency")
|
|
86
|
+
jobParams Json @default("{}") @map("job_params")
|
|
87
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
88
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
89
|
+
|
|
90
|
+
@@map("job_settings")
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// From prisma/shared/lookup-group.prisma
|
|
94
|
+
model LookupGroup {
|
|
95
|
+
id String @id @default(uuid())
|
|
96
|
+
name String
|
|
97
|
+
description String?
|
|
98
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
99
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
100
|
+
|
|
101
|
+
// Relations
|
|
102
|
+
lookups Lookup[] @relation("LookupToGroup")
|
|
103
|
+
|
|
104
|
+
@@map("lookup_groups")
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// From prisma/shared/lookup.prisma
|
|
108
|
+
model Lookup {
|
|
109
|
+
id String @id @default(uuid())
|
|
110
|
+
groupId String @map("group_id")
|
|
111
|
+
name String
|
|
112
|
+
value String
|
|
113
|
+
text String
|
|
114
|
+
description String?
|
|
115
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
116
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
117
|
+
|
|
118
|
+
// Relations
|
|
119
|
+
group LookupGroup @relation("LookupToGroup", fields: [groupId], references: [id])
|
|
120
|
+
|
|
121
|
+
// Application Relations
|
|
122
|
+
applicationType_applications Application[] @relation("ApplicationType")
|
|
123
|
+
lendingType_applications Application[] @relation("LendingType")
|
|
124
|
+
purchaseType_applications Application[] @relation("PurchaseType")
|
|
125
|
+
status_applications Application[] @relation("Status")
|
|
126
|
+
repaymentType_applications Application[] @relation("RepaymentType")
|
|
127
|
+
|
|
128
|
+
// ApplicationDocument Relations
|
|
129
|
+
documentType_documents ApplicationDocument[] @relation("DocumentType")
|
|
130
|
+
|
|
131
|
+
// ApplicationMortgage Relations
|
|
132
|
+
repaymentType_mortgages ApplicationMortgage[] @relation("RepaymentType")
|
|
133
|
+
exitStrategy_mortgages ApplicationMortgage[] @relation("ExitStrategy")
|
|
134
|
+
sourceOfFunds_mortgages ApplicationMortgage[] @relation("SourceOfFunds")
|
|
135
|
+
saleMade_mortgages ApplicationMortgage[] @relation("SaleMade")
|
|
136
|
+
leaseType_mortgages ApplicationMortgage[] @relation("LeaseType")
|
|
137
|
+
depositComeFrom_mortgages ApplicationMortgage[] @relation("DepositComeFrom")
|
|
138
|
+
proposedTenants_mortgages ApplicationMortgage[] @relation("ProposedTenants")
|
|
139
|
+
|
|
140
|
+
// ApplicationNote Relations
|
|
141
|
+
noteType_notes ApplicationNote[] @relation("NoteType")
|
|
142
|
+
noteSubType_notes ApplicationNote[] @relation("NoteSubType")
|
|
143
|
+
|
|
144
|
+
// ApplicationProduct Relations
|
|
145
|
+
lendingType_products ApplicationProduct[] @relation("LendingType")
|
|
146
|
+
repaymentType_products ApplicationProduct[] @relation("RepaymentType")
|
|
147
|
+
financeRecommended_products ApplicationProduct[] @relation("FinanceRecommended")
|
|
148
|
+
procFeeRate_products ApplicationProduct[] @relation("ProcFeeRate")
|
|
149
|
+
clubNetworkName_products ApplicationProduct[] @relation("ClubNetworkName")
|
|
150
|
+
productFeePaymentType_products ApplicationProduct[] @relation("ProductFeePaymentType")
|
|
151
|
+
|
|
152
|
+
// ApplicationRationale Relations
|
|
153
|
+
affordabilityStatus_rationales ApplicationRationale[] @relation("AffordabilityStatus")
|
|
154
|
+
applicantsStatus_rationales ApplicationRationale[] @relation("ApplicantsStatus")
|
|
155
|
+
creditConductStatus_rationales ApplicationRationale[] @relation("CreditConductStatus")
|
|
156
|
+
fraudCheckStatus_rationales ApplicationRationale[] @relation("FraudCheckStatus")
|
|
157
|
+
incomeSourceStatus_rationales ApplicationRationale[] @relation("IncomeSourceStatus")
|
|
158
|
+
loanStatus_rationales ApplicationRationale[] @relation("LoanStatus")
|
|
159
|
+
securityStatus_rationales ApplicationRationale[] @relation("SecurityStatus")
|
|
160
|
+
propertyStatus_rationales ApplicationRationale[] @relation("PropertyStatus")
|
|
161
|
+
|
|
162
|
+
// ApplicationRiskNarrative Relations
|
|
163
|
+
call2Status_ApplicationriskNarratives ApplicationRiskNarrative[] @relation("Call2Status")
|
|
164
|
+
status_ApplicationriskNarratives ApplicationRiskNarrative[] @relation("Status")
|
|
165
|
+
|
|
166
|
+
// RiskNarrative Relations
|
|
167
|
+
call2Status_RiskNarratives RiskNarrative[] @relation("Call2Status")
|
|
168
|
+
status_RiskNarratives RiskNarrative[] @relation("Status")
|
|
169
|
+
docVerificationStatus_RiskNarratives RiskNarrative[] @relation("DocVerificationStatus")
|
|
170
|
+
|
|
171
|
+
// Company Relations
|
|
172
|
+
businessType_companies Company[] @relation("BusinessType")
|
|
173
|
+
taxJurisdiction_companies Company[] @relation("TaxJurisdiction")
|
|
174
|
+
addressCountry_companies Company[] @relation("AddressCountry")
|
|
175
|
+
applicationType_companies Company[] @relation("ApplicationType")
|
|
176
|
+
|
|
177
|
+
// ResidenceCommitment Relations
|
|
178
|
+
financeTypeHpp_residenceCommitments ResidenceCommitment[] @relation("FinanceTypeHpp")
|
|
179
|
+
hppRepaymentType_residenceCommitments ResidenceCommitment[] @relation("HppRepaymentType")
|
|
180
|
+
mortgageType_residenceCommitments ResidenceCommitment[] @relation("MortgageType")
|
|
181
|
+
financeHomeType_residenceCommitments ResidenceCommitment[] @relation("FinanceHomeType")
|
|
182
|
+
chargeType_residenceCommitments ResidenceCommitment[] @relation("ChargeType")
|
|
183
|
+
|
|
184
|
+
// ApplicantShareholding Relations
|
|
185
|
+
directorShareholder_shareholdings ApplicantShareholding[] @relation("DirectorShareholder")
|
|
186
|
+
|
|
187
|
+
// Solicitor Relations
|
|
188
|
+
addressCountry_solicitors Solicitor[] @relation("AddressCountry")
|
|
189
|
+
|
|
190
|
+
// Property Relations
|
|
191
|
+
country_properties Property[] @relation("PropertyCountry")
|
|
192
|
+
|
|
193
|
+
// Security Relations
|
|
194
|
+
propertyAddressCountry_securities Security[] @relation("PropertyAddressCountry")
|
|
195
|
+
propertyTenure_securities Security[] @relation("PropertyTenure")
|
|
196
|
+
propertyType_securities Security[] @relation("PropertyType")
|
|
197
|
+
|
|
198
|
+
// MortgageCommitment Relations
|
|
199
|
+
repaymentType_mortgageCommitments MortgageCommitment[] @relation("RepaymentType")
|
|
200
|
+
mortgageType_mortgageCommitments MortgageCommitment[] @relation("MortgageType")
|
|
201
|
+
commitmentType_mortgageCommitments MortgageCommitment[] @relation("CommitmentType")
|
|
202
|
+
|
|
203
|
+
// OtherIncome Relations
|
|
204
|
+
payFrequency1_otherIncomes OtherIncome[] @relation("PayFrequency1")
|
|
205
|
+
payFrequency2_otherIncomes OtherIncome[] @relation("PayFrequency2")
|
|
206
|
+
payFrequency3_otherIncomes OtherIncome[] @relation("PayFrequency3")
|
|
207
|
+
payFrequency4_otherIncomes OtherIncome[] @relation("PayFrequency4")
|
|
208
|
+
|
|
209
|
+
// Income Relations
|
|
210
|
+
accountantsCountry_incomes Income[] @relation("AccountantsCountry")
|
|
211
|
+
businessCountry_incomes Income[] @relation("BusinessCountry")
|
|
212
|
+
businessType_incomes Income[] @relation("BusinessType")
|
|
213
|
+
charteredCertifiedOrOther_incomes Income[] @relation("CharteredCertifiedOrOther")
|
|
214
|
+
registeredCountry_incomes Income[] @relation("RegisteredCountry")
|
|
215
|
+
|
|
216
|
+
// LoanCommitment Relations
|
|
217
|
+
commitmentType_loanCommitments LoanCommitment[] @relation("CommitmentType")
|
|
218
|
+
loanType_loanCommitments LoanCommitment[] @relation("LoanType")
|
|
219
|
+
|
|
220
|
+
// Applicant Relations
|
|
221
|
+
addressCountry_applicants Applicant[] @relation("AddressCountry")
|
|
222
|
+
correspondenceAddressCountry_applicants Applicant[] @relation("CorrespondenceAddressCountry")
|
|
223
|
+
countryOfResidence_applicants Applicant[] @relation("CountryOfResidence")
|
|
224
|
+
class_applicants Applicant[] @relation("Class")
|
|
225
|
+
linkedJurisdictionCountry_applicants Applicant[] @relation("LinkedJurisdictionCountry")
|
|
226
|
+
maritalStatus_applicants Applicant[] @relation("MaritalStatus")
|
|
227
|
+
nationality_applicants Applicant[] @relation("Nationality")
|
|
228
|
+
previous1AddressCountry_applicants Applicant[] @relation("Previous1AddressCountry")
|
|
229
|
+
previous2AddressCountry_applicants Applicant[] @relation("Previous2AddressCountry")
|
|
230
|
+
residentialStatus_applicants Applicant[] @relation("ResidentialStatus")
|
|
231
|
+
taxJurisdiction_applicants Applicant[] @relation("TaxJurisdiction")
|
|
232
|
+
taxPayer_applicants Applicant[] @relation("TaxPayer")
|
|
233
|
+
ukPassportProfession_applicants Applicant[] @relation("UkPassportProfession")
|
|
234
|
+
vulnerabilityTypes_applicants Applicant[] @relation("VulnerabilityTypes")
|
|
235
|
+
|
|
236
|
+
// Employment Relations
|
|
237
|
+
addressCountry_employments Employment[] @relation("AddressCountry")
|
|
238
|
+
industry_employments Employment[] @relation("Industry")
|
|
239
|
+
jobTitle_employments Employment[] @relation("JobTitle")
|
|
240
|
+
acceptableIncomeTypes_employments Employment[] @relation("AcceptableIncomeTypes")
|
|
241
|
+
|
|
242
|
+
// CreditCardCommitment Relations
|
|
243
|
+
commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
244
|
+
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
245
|
+
CreditData CreditData[]
|
|
246
|
+
IncomeSource IncomeSource[]
|
|
247
|
+
|
|
248
|
+
@@unique([groupId, value])
|
|
249
|
+
@@map("lookups")
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// From prisma/shared/system-parameter.prisma
|
|
253
|
+
model SystemParameter {
|
|
254
|
+
id String @id @default(uuid())
|
|
255
|
+
name String @unique
|
|
256
|
+
value String
|
|
257
|
+
description String?
|
|
258
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
259
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
260
|
+
createdById String? @map("created_by_id")
|
|
261
|
+
updatedById String? @map("updated_by_id")
|
|
262
|
+
|
|
263
|
+
// Relations
|
|
264
|
+
createdBy User? @relation("CreatedByUser", fields: [createdById], references: [id])
|
|
265
|
+
updatedBy User? @relation("UpdatedByUser", fields: [updatedById], references: [id])
|
|
266
|
+
|
|
267
|
+
@@map("system_parameters")
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// From prisma/users/auth-log.prisma
|
|
271
|
+
model AuthLog {
|
|
272
|
+
id String @id @default(uuid())
|
|
273
|
+
userEmail String @map("user_email")
|
|
274
|
+
loggedInTimestamp DateTime @map("logged_in_timestamp")
|
|
275
|
+
isSuccess Boolean @map("is_success")
|
|
276
|
+
activity String
|
|
277
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
278
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
279
|
+
|
|
280
|
+
@@map("auth_logs")
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// From prisma/users/permission.prisma
|
|
284
|
+
model Permission {
|
|
285
|
+
id String @id @default(uuid())
|
|
286
|
+
name String
|
|
287
|
+
controllerName String @map("controller_name")
|
|
288
|
+
methodName String @map("method_name")
|
|
289
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
290
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
291
|
+
|
|
292
|
+
// Relations
|
|
293
|
+
roles Role[]
|
|
294
|
+
|
|
295
|
+
@@map("permissions")
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// From prisma/users/role-group.prisma
|
|
299
|
+
model RoleGroup {
|
|
300
|
+
id String @id @default(uuid())
|
|
301
|
+
groupId String @unique @map("group_id")
|
|
302
|
+
name String @map("name")
|
|
303
|
+
description String? @map("description")
|
|
304
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
305
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
306
|
+
|
|
307
|
+
// Relations
|
|
308
|
+
roles Role[] @relation("RoleToRoleGroup")
|
|
309
|
+
users User[] @relation("UserToRoleGroup")
|
|
310
|
+
|
|
311
|
+
@@map("role_groups")
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// From prisma/users/role.prisma
|
|
315
|
+
model Role {
|
|
316
|
+
id String @id @default(uuid())
|
|
317
|
+
roleId String @unique @map("role_id")
|
|
318
|
+
name String
|
|
319
|
+
description String?
|
|
320
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
321
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
322
|
+
|
|
323
|
+
// Relations
|
|
324
|
+
permissions Permission[]
|
|
325
|
+
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
326
|
+
|
|
327
|
+
@@map("roles")
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// From prisma/users/user.prisma
|
|
331
|
+
model User {
|
|
332
|
+
id String @id @default(uuid())
|
|
333
|
+
accountId String @unique @map("account_id")
|
|
334
|
+
email String @unique
|
|
335
|
+
fullName String @map("full_name")
|
|
336
|
+
password String
|
|
337
|
+
organisationId String? @map("organisation_id")
|
|
338
|
+
status String
|
|
339
|
+
modifiedOn DateTime? @map("modified_on")
|
|
340
|
+
modifiedById String? @map("modified_by_id")
|
|
341
|
+
createdOnInApprivo DateTime? @map("created_on_in_apprivo")
|
|
342
|
+
createdById String? @map("created_by_id")
|
|
343
|
+
deletedOn DateTime? @map("deleted_on")
|
|
344
|
+
deletedById String? @map("deleted_by_id")
|
|
345
|
+
token String?
|
|
346
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
347
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
348
|
+
|
|
349
|
+
// Relations
|
|
350
|
+
groups RoleGroup[] @relation("UserToRoleGroup")
|
|
351
|
+
claims Claim[]
|
|
352
|
+
createdSystemParameters SystemParameter[] @relation("CreatedByUser")
|
|
353
|
+
updatedSystemParameters SystemParameter[] @relation("UpdatedByUser")
|
|
354
|
+
createdNotes ApplicationNote[] @relation("CreatedByUser")
|
|
355
|
+
assignedNotes ApplicationNote[] @relation("AssignedByUser")
|
|
356
|
+
alerts Alert[]
|
|
357
|
+
underwriters Underwriter[]
|
|
358
|
+
|
|
359
|
+
@@map("users")
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
model Claim {
|
|
363
|
+
id String @id @default(uuid())
|
|
364
|
+
key String
|
|
365
|
+
value String
|
|
366
|
+
userId String @map("user_id")
|
|
367
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
368
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
369
|
+
|
|
370
|
+
// Relations
|
|
371
|
+
user User @relation(fields: [userId], references: [id])
|
|
372
|
+
|
|
373
|
+
@@map("claims")
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// From prisma/product-catalogues/product-catalogue.prisma
|
|
377
|
+
model ProductCatalogue {
|
|
378
|
+
id String @id @default(uuid())
|
|
379
|
+
productCatalogueId String @map("product_catalogue_id")
|
|
380
|
+
name String @map("name")
|
|
381
|
+
description String? @map("description")
|
|
382
|
+
applyFrom String @map("apply_from")
|
|
383
|
+
applyUntil String @map("apply_until")
|
|
384
|
+
submitUntil String @map("submit_until")
|
|
385
|
+
status String @map("status")
|
|
386
|
+
lockedForEdit String @map("locked_for_edit")
|
|
387
|
+
baseRateName String? @map("base_rate_name")
|
|
388
|
+
baseRate String? @map("base_rate")
|
|
389
|
+
mapperName String? @map("mapper_name")
|
|
390
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
391
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
392
|
+
|
|
393
|
+
// Relations
|
|
394
|
+
productDefinitions ProductDefinition[]
|
|
395
|
+
productVariants ProductVariant[]
|
|
396
|
+
|
|
397
|
+
@@map("product_catalogues")
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
// From prisma/product-catalogues/product-definition.prisma
|
|
401
|
+
model ProductDefinition {
|
|
402
|
+
id String @id @default(uuid())
|
|
403
|
+
productDefinitionId String @map("product_definition_id")
|
|
404
|
+
productCatalogueId String @map("product_catalogue_id")
|
|
405
|
+
name String @map("name")
|
|
406
|
+
atLeastOnePass String @map("at_least_one_pass")
|
|
407
|
+
elements Json @default("[]") @map("elements")
|
|
408
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
409
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
410
|
+
|
|
411
|
+
// Relations
|
|
412
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
413
|
+
rules Rule[]
|
|
414
|
+
|
|
415
|
+
@@map("product_definitions")
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
model Rule {
|
|
419
|
+
id String @id @default(uuid())
|
|
420
|
+
ruleId String @map("rule_id")
|
|
421
|
+
rule String @map("rule")
|
|
422
|
+
name String @map("name")
|
|
423
|
+
description String? @map("description")
|
|
424
|
+
scope String? @map("scope")
|
|
425
|
+
mandatory String @map("mandatory")
|
|
426
|
+
overrideRuleType String? @map("override_rule_type")
|
|
427
|
+
overrideRuleMessage String? @map("override_rule_message")
|
|
428
|
+
inheritedFrom String? @map("inherited_from")
|
|
429
|
+
anyPass String @map("any_pass")
|
|
430
|
+
preCashflow String @map("pre_cashflow")
|
|
431
|
+
productDefinitionId String @map("product_definition_id")
|
|
432
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
433
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
434
|
+
|
|
435
|
+
// Relations
|
|
436
|
+
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
437
|
+
|
|
438
|
+
@@map("rules")
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// From prisma/product-catalogues/product-variant.prisma
|
|
442
|
+
model ProductVariant {
|
|
443
|
+
id String @id @default(uuid())
|
|
444
|
+
productCatalogueId String @map("product_catalogue_id")
|
|
445
|
+
variantid String @map("variant_id")
|
|
446
|
+
name String @map("name")
|
|
447
|
+
variantCode String @map("variant_code")
|
|
448
|
+
label String? @map("label")
|
|
449
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
450
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
451
|
+
|
|
452
|
+
// Relations
|
|
453
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
454
|
+
|
|
455
|
+
@@map("product_variants")
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// From prisma/product-catalogues/product.prisma
|
|
459
|
+
model Product {
|
|
460
|
+
id String @id @default(uuid())
|
|
461
|
+
name String
|
|
462
|
+
description String?
|
|
463
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
464
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
465
|
+
applications Application[]
|
|
466
|
+
|
|
467
|
+
@@map("products")
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
// From prisma/applicants/applicant.prisma
|
|
471
|
+
model Applicant {
|
|
472
|
+
id String @id @default(uuid())
|
|
473
|
+
applicantId String @unique
|
|
474
|
+
applicationId String @map("application_id")
|
|
475
|
+
addressCity String?
|
|
476
|
+
addressCountryLid String? @map("address_country_lid")
|
|
477
|
+
addressLine1 String?
|
|
478
|
+
addressLine2 String?
|
|
479
|
+
addressLine3 String?
|
|
480
|
+
addressMovedDate String?
|
|
481
|
+
addressPostCode String?
|
|
482
|
+
correspondenceAddressCity String?
|
|
483
|
+
correspondenceAddressCountryLid String? @map("correspondence_address_country_lid")
|
|
484
|
+
correspondenceAddressLine1 String?
|
|
485
|
+
correspondenceAddressLine2 String?
|
|
486
|
+
correspondenceAddressLine3 String?
|
|
487
|
+
correspondenceAddressPostCode String?
|
|
488
|
+
countryOfResidenceLid String @map("country_of_residence_lid")
|
|
489
|
+
dateOfBirth String
|
|
490
|
+
dependant10Age Int @default(0)
|
|
491
|
+
dependant1Age Int @default(0)
|
|
492
|
+
dependant2Age Int @default(0)
|
|
493
|
+
dependant3Age Int @default(0)
|
|
494
|
+
dependant4Age Int @default(0)
|
|
495
|
+
dependant5Age Int @default(0)
|
|
496
|
+
dependant6Age Int @default(0)
|
|
497
|
+
dependant7Age Int @default(0)
|
|
498
|
+
dependant8Age Int @default(0)
|
|
499
|
+
dependant9Age Int @default(0)
|
|
500
|
+
email String
|
|
501
|
+
employmentStatusDetails String?
|
|
502
|
+
firstName String
|
|
503
|
+
isFirstTimelandlord Boolean @default(false)
|
|
504
|
+
foreignIdForNationals String?
|
|
505
|
+
gdprEmail Boolean @default(false)
|
|
506
|
+
gdprPost Boolean @default(false)
|
|
507
|
+
gdprTelephone Boolean @default(false)
|
|
508
|
+
gdprTextMessage Boolean @default(false)
|
|
509
|
+
gender String
|
|
510
|
+
hasBrokerGivenConsentForVulnerabilities Boolean
|
|
511
|
+
hasLinkedJurisdiction Boolean @default(false)
|
|
512
|
+
isCorrespondence Boolean @default(true)
|
|
513
|
+
isCommitmentConfirmed Boolean @default(false)
|
|
514
|
+
isCurrentContract Boolean @default(false)
|
|
515
|
+
isCustomerVulnerable Boolean @default(false)
|
|
516
|
+
isExpat Boolean @default(false)
|
|
517
|
+
isFirstApplicant Boolean @default(false)
|
|
518
|
+
isUkPassport Boolean @default(false)
|
|
519
|
+
isUkResident Boolean
|
|
520
|
+
classLid String? @map("class_lid")
|
|
521
|
+
pageValidFlag Boolean @default(false)
|
|
522
|
+
lastName String
|
|
523
|
+
linkedJurisdictionCountryLid String? @map("linked_jurisdiction_country_lid")
|
|
524
|
+
linkedJurisdictionDetails String?
|
|
525
|
+
maidenName String?
|
|
526
|
+
maritalStatusLid String @map("marital_status_lid")
|
|
527
|
+
mobileNumber String?
|
|
528
|
+
nationalityLid String @map("nationality_lid")
|
|
529
|
+
netIncome Decimal @default(0.00)
|
|
530
|
+
niNumber String
|
|
531
|
+
numberOfDependants Int @default(0)
|
|
532
|
+
isOneYearPrior Boolean @default(false)
|
|
533
|
+
phoneNumber String?
|
|
534
|
+
previous1AddressCity String?
|
|
535
|
+
previous1AddressCountryLid String? @map("previous1_address_country_lid")
|
|
536
|
+
previous1AddressLine1 String?
|
|
537
|
+
previous1AddressLine2 String?
|
|
538
|
+
previous1AddressLine3 String?
|
|
539
|
+
previous1AddressMovedDate String?
|
|
540
|
+
previous1AddressPostCode String?
|
|
541
|
+
previous1AddressPropertyOwnedBy String?
|
|
542
|
+
previous2AddressCity String?
|
|
543
|
+
previous2AddressCountryLid String? @map("previous2_address_country_lid")
|
|
544
|
+
previous2AddressLine1 String?
|
|
545
|
+
previous2AddressLine2 String?
|
|
546
|
+
previous2AddressLine3 String?
|
|
547
|
+
previous2AddressMovedDate String?
|
|
548
|
+
previous2AddressPostCode String?
|
|
549
|
+
previous2AddressPropertyOwnedBy String?
|
|
550
|
+
relationshipToOthers String
|
|
551
|
+
residentialStatusLid String? @map("residential_status_lid")
|
|
552
|
+
retirementAge String
|
|
553
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
554
|
+
taxPayerLid String @map("tax_payer_lid")
|
|
555
|
+
timeResidedAtCountryOfResidence Int
|
|
556
|
+
title String
|
|
557
|
+
isTwoYearPrior Boolean @default(false)
|
|
558
|
+
understandEnglish Boolean
|
|
559
|
+
vulnerabilityNotes String?
|
|
560
|
+
vulnerabilityTypeLids String[] @map("vulnerability_type_lids")
|
|
561
|
+
ukPassportProfessionLid String? @map("uk_passport_profession_lid")
|
|
562
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
563
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
564
|
+
|
|
565
|
+
// Relations
|
|
566
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
567
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
568
|
+
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
569
|
+
countryOfResidence Lookup @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
570
|
+
class Lookup? @relation("Class", fields: [classLid], references: [id])
|
|
571
|
+
linkedJurisdictionCountry Lookup? @relation("LinkedJurisdictionCountry", fields: [linkedJurisdictionCountryLid], references: [id])
|
|
572
|
+
maritalStatus Lookup @relation("MaritalStatus", fields: [maritalStatusLid], references: [id])
|
|
573
|
+
nationality Lookup @relation("Nationality", fields: [nationalityLid], references: [id])
|
|
574
|
+
previous1AddressCountry Lookup? @relation("Previous1AddressCountry", fields: [previous1AddressCountryLid], references: [id])
|
|
575
|
+
previous2AddressCountry Lookup? @relation("Previous2AddressCountry", fields: [previous2AddressCountryLid], references: [id])
|
|
576
|
+
residentialStatus Lookup? @relation("ResidentialStatus", fields: [residentialStatusLid], references: [id])
|
|
577
|
+
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
578
|
+
taxPayer Lookup @relation("TaxPayer", fields: [taxPayerLid], references: [id])
|
|
579
|
+
ukPassportProfession Lookup? @relation("UkPassportProfession", fields: [ukPassportProfessionLid], references: [id])
|
|
580
|
+
vulnerabilityTypes Lookup[] @relation("VulnerabilityTypes")
|
|
581
|
+
|
|
582
|
+
// Nested schemas
|
|
583
|
+
creditData CreditData?
|
|
584
|
+
riskNarrative RiskNarrative?
|
|
585
|
+
otherIncome OtherIncome?
|
|
586
|
+
incomeSource IncomeSource?
|
|
587
|
+
expenditure Expenditure?
|
|
588
|
+
employment Employment?
|
|
589
|
+
directDebit DirectDebit?
|
|
590
|
+
creditProfile CreditProfile? @relation(fields: [creditProfileId], references: [id])
|
|
591
|
+
propertyIncome PropertyIncome? @relation(fields: [propertyIncomeId], references: [id])
|
|
592
|
+
income Income? @relation(fields: [incomeId], references: [id])
|
|
593
|
+
creditProfileId String?
|
|
594
|
+
propertyIncomeId String?
|
|
595
|
+
incomeId String?
|
|
596
|
+
CreditCardCommitment CreditCardCommitment[]
|
|
597
|
+
LoanCommitment LoanCommitment[]
|
|
598
|
+
MortgageCommitment MortgageCommitment[]
|
|
599
|
+
ResidenceCommitment ResidenceCommitment[]
|
|
600
|
+
SecuredLoanCommitment SecuredLoanCommitment[]
|
|
601
|
+
UnsecuredLoanCommitment UnsecuredLoanCommitment[]
|
|
602
|
+
ApplicantShareholding ApplicantShareholding[]
|
|
603
|
+
|
|
604
|
+
@@map("applicants")
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// From prisma/applicants/credit-card-commitment.prisma
|
|
608
|
+
model CreditCardCommitment {
|
|
609
|
+
id String @id @default(uuid())
|
|
610
|
+
applicantId String @map("applicant_id")
|
|
611
|
+
commitmentId String @map("commitment_id")
|
|
612
|
+
commitmentTypeLid String? @map("commitment_type_lid")
|
|
613
|
+
lenderName String @map("lender_name")
|
|
614
|
+
creditLimit Decimal @map("credit_limit")
|
|
615
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
616
|
+
creditCardRepaymentTypeLid String @map("credit_card_repayment_type_lid")
|
|
617
|
+
monthlyPayment Decimal @map("monthly_payment")
|
|
618
|
+
jointNames Boolean @map("joint_names")
|
|
619
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
620
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
621
|
+
|
|
622
|
+
// Relations
|
|
623
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
624
|
+
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
625
|
+
repaymentType Lookup @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
|
|
626
|
+
|
|
627
|
+
@@map("applicant_creditcard_commitments")
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// From prisma/applicants/credit-data.prisma
|
|
631
|
+
model CreditData {
|
|
632
|
+
id String @id @default(uuid())
|
|
633
|
+
bankruptcy String
|
|
634
|
+
countyCourtJudgment String
|
|
635
|
+
creditDefaults String?
|
|
636
|
+
securedArrears String
|
|
637
|
+
statusLid String @map("status_lid")
|
|
638
|
+
unsecuredArrears String
|
|
639
|
+
valid String
|
|
640
|
+
applicantId String @unique @map("applicant_id")
|
|
641
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
642
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
643
|
+
|
|
644
|
+
// Relations
|
|
645
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
646
|
+
status Lookup @relation(fields: [statusLid], references: [id])
|
|
647
|
+
|
|
648
|
+
@@map("applicant_credit_data")
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
// From prisma/applicants/credit-profile.prisma
|
|
652
|
+
model CreditProfile {
|
|
653
|
+
id String @id @default(uuid())
|
|
654
|
+
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
655
|
+
bankruptcyNo String @map("bankruptcy_no")
|
|
656
|
+
ccjInLastThreeYearNo String @map("ccj_in_last_three_year_no")
|
|
657
|
+
defaultsInLastYearNo String @map("defaults_in_last_year_no")
|
|
658
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
659
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
660
|
+
|
|
661
|
+
// Relations
|
|
662
|
+
applicants Applicant[]
|
|
663
|
+
|
|
664
|
+
@@map("applicant_credit_profiles")
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// From prisma/applicants/direct-debit.prisma
|
|
668
|
+
model DirectDebit {
|
|
669
|
+
id String @id @default(uuid())
|
|
670
|
+
applicationId String @map("application_id")
|
|
671
|
+
accountNumber String?
|
|
672
|
+
addressLine1 String?
|
|
673
|
+
addressLine2 String?
|
|
674
|
+
Applicants String?
|
|
675
|
+
branch String?
|
|
676
|
+
city String?
|
|
677
|
+
contactPostcode String?
|
|
678
|
+
institution String?
|
|
679
|
+
isConfirmDeclaration String? @default("false")
|
|
680
|
+
nameOfAccountHolder String?
|
|
681
|
+
selectedPaymentDay String?
|
|
682
|
+
sortCode String?
|
|
683
|
+
applicantId String @unique @map("applicant_id")
|
|
684
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
685
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
686
|
+
|
|
687
|
+
// Relations
|
|
688
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
689
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
690
|
+
|
|
691
|
+
@@map("applicant_direct_debit")
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
// From prisma/applicants/employment.prisma
|
|
695
|
+
model Employment {
|
|
696
|
+
id String @id @default(uuid())
|
|
697
|
+
pageValidFlag Boolean @default(false)
|
|
698
|
+
addressCity String?
|
|
699
|
+
addressCountryLid String @map("address_country_lid")
|
|
700
|
+
addressLine1 String
|
|
701
|
+
addressLine2 String?
|
|
702
|
+
addressLine3 String?
|
|
703
|
+
addressPostCode String
|
|
704
|
+
averageBonusPreviousTwoYears Decimal @default(0.00)
|
|
705
|
+
basicGrossIncome Decimal @default(0.00)
|
|
706
|
+
basicPay Decimal @default(0.00)
|
|
707
|
+
carAllowance Decimal @default(0.00)
|
|
708
|
+
childBenefit Decimal @default(0.00)
|
|
709
|
+
childBenefitOrSchoolAllowance Decimal @default(0.00)
|
|
710
|
+
contractRemaining String?
|
|
711
|
+
dateJoined String
|
|
712
|
+
disabilityLiving Decimal @default(0.00)
|
|
713
|
+
employerName String
|
|
714
|
+
employerTelephone String?
|
|
715
|
+
housingAllowance Decimal @default(0.00)
|
|
716
|
+
industryLid String @map("industry_lid")
|
|
717
|
+
isUnderTerminationNotice Boolean @default(false)
|
|
718
|
+
jobTitleLid String @map("job_title_lid")
|
|
719
|
+
maintenance Decimal @default(0.00)
|
|
720
|
+
maternityIncome Decimal @default(0.00)
|
|
721
|
+
natureOfBusiness String
|
|
722
|
+
pensionIncome Decimal @default(0.00)
|
|
723
|
+
previousAddressCity String?
|
|
724
|
+
previousAddressCountry String
|
|
725
|
+
previousAddressLine1 String
|
|
726
|
+
previousAddressLine2 String?
|
|
727
|
+
previousAddressLine3 String?
|
|
728
|
+
previousAddressPostCode String
|
|
729
|
+
previousBasicGrossIncome Decimal @default(0.00)
|
|
730
|
+
previousDateJoined String
|
|
731
|
+
previousDateLeft String
|
|
732
|
+
previousEmployerName String
|
|
733
|
+
previousEmployerTelephone String?
|
|
734
|
+
previousJobTitle String
|
|
735
|
+
previousNatureOfBusiness String
|
|
736
|
+
referenceContact String?
|
|
737
|
+
referenceContactEmail String
|
|
738
|
+
secondJob Decimal @default(0.00)
|
|
739
|
+
travelAllowance Decimal @default(0.00)
|
|
740
|
+
underTerminationNoticeNote String?
|
|
741
|
+
applicantId String @unique @map("applicant_id")
|
|
742
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
743
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
744
|
+
|
|
745
|
+
// Relations
|
|
746
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
747
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
748
|
+
industry Lookup @relation("Industry", fields: [industryLid], references: [id])
|
|
749
|
+
jobTitle Lookup @relation("JobTitle", fields: [jobTitleLid], references: [id])
|
|
750
|
+
acceptableIncomeTypes Lookup[] @relation("AcceptableIncomeTypes")
|
|
751
|
+
|
|
752
|
+
@@map("applicant_employment")
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
// From prisma/applicants/expenditure.prisma
|
|
756
|
+
model Expenditure {
|
|
757
|
+
id String @id @default(uuid())
|
|
758
|
+
pageValidFlag Boolean @default(false)
|
|
759
|
+
utilities Decimal
|
|
760
|
+
transport Decimal
|
|
761
|
+
subsistence Decimal
|
|
762
|
+
communication Decimal
|
|
763
|
+
health Decimal
|
|
764
|
+
groundRentOrServiceCharge Decimal
|
|
765
|
+
insurance Decimal
|
|
766
|
+
childCareForDependents Decimal
|
|
767
|
+
councilTax Decimal
|
|
768
|
+
clothingAndFootwear Decimal
|
|
769
|
+
vehicleInsurance Decimal
|
|
770
|
+
mortgagePaymentVehicle Decimal
|
|
771
|
+
other Decimal
|
|
772
|
+
totalMontlyExpenditure String?
|
|
773
|
+
applicantId String @unique @map("applicant_id")
|
|
774
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
775
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
776
|
+
|
|
777
|
+
// Relations
|
|
778
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
779
|
+
|
|
780
|
+
@@map("applicant_expenditure")
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
// From prisma/applicants/income-source.prisma
|
|
784
|
+
model IncomeSource {
|
|
785
|
+
id String @id @default(uuid())
|
|
786
|
+
employmentStatusLid String? @map("employment_status_lid")
|
|
787
|
+
incomeFromEmployment String?
|
|
788
|
+
incomeFromPension String?
|
|
789
|
+
incomeFromProperty String?
|
|
790
|
+
incomeFromSavings String?
|
|
791
|
+
applicantId String @unique @map("applicant_id")
|
|
792
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
793
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
794
|
+
|
|
795
|
+
// Relations
|
|
796
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
797
|
+
employmentStatus Lookup? @relation(fields: [employmentStatusLid], references: [id])
|
|
798
|
+
|
|
799
|
+
@@map("applicant_income_source")
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
// From prisma/applicants/income.prisma
|
|
803
|
+
model Income {
|
|
804
|
+
id String @id @default(uuid())
|
|
805
|
+
accountantsAddressLine1 String @map("accountants_address_line1")
|
|
806
|
+
accountantsAddressLine2 String @map("accountants_address_line2")
|
|
807
|
+
accountantsAddressLine3 String @map("accountants_address_line3")
|
|
808
|
+
accountantsCity String @default("") @map("accountants_city")
|
|
809
|
+
accountantsCountryLid String @map("accountants_country_lid")
|
|
810
|
+
accountantsEmail String @map("accountants_email")
|
|
811
|
+
accountantsPostCode String @map("accountants_post_code")
|
|
812
|
+
accountantsPractice String @map("accountants_practice")
|
|
813
|
+
accountantsTelephoneNumber String @map("accountants_telephone_number")
|
|
814
|
+
businessAddressLine1 String @map("business_address_line1")
|
|
815
|
+
businessAddressLine2 String @map("business_address_line2")
|
|
816
|
+
businessAddressLine3 String @map("business_address_line3")
|
|
817
|
+
businessCity String @default("") @map("business_city")
|
|
818
|
+
businessCountryLid String @map("business_country_lid")
|
|
819
|
+
businessPostCode String @map("business_post_code")
|
|
820
|
+
businessTelephoneNumber String @map("business_telephone_number")
|
|
821
|
+
businessTypeLid String @map("business_type_lid")
|
|
822
|
+
charteredCertifiedOrOtherLid String @map("chartered_certified_or_other_lid")
|
|
823
|
+
contactName String @map("contact_name")
|
|
824
|
+
currentYearEnd String @map("current_year_end")
|
|
825
|
+
dateEstablished String @map("date_established")
|
|
826
|
+
doYouHaveAccountant Boolean @map("do_you_have_accountant")
|
|
827
|
+
isBusinessAddressDifferent Boolean @map("is_business_address_different")
|
|
828
|
+
nameOfBusiness String @map("name_of_business")
|
|
829
|
+
natureOfBusiness String @map("nature_of_business")
|
|
830
|
+
netAssets1 Decimal @default(0.00) @map("net_assets1")
|
|
831
|
+
netAssets2 Decimal @default(0.00) @map("net_assets2")
|
|
832
|
+
netAssets3 Decimal @default(0.00) @map("net_assets3")
|
|
833
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
834
|
+
percentageOfShareholding Int @map("percentage_of_shareholding")
|
|
835
|
+
registeredAddressLine1 String @map("registered_address_line1")
|
|
836
|
+
registeredAddressLine2 String @map("registered_address_line2")
|
|
837
|
+
registeredAddressLine3 String @map("registered_address_line3")
|
|
838
|
+
registeredCity String @default("") @map("registered_city")
|
|
839
|
+
registeredCountryLid String @map("registered_country_lid")
|
|
840
|
+
registeredPostCode String @map("registered_post_code")
|
|
841
|
+
registeredTelephone String @map("registered_telephone")
|
|
842
|
+
selfEmployedDate String @map("self_employed_date")
|
|
843
|
+
turnover1 Decimal @default(0.00) @map("turnover1")
|
|
844
|
+
turnover2 Decimal @default(0.00) @map("turnover2")
|
|
845
|
+
turnover3 Decimal @default(0.00) @map("turnover3")
|
|
846
|
+
year1 Decimal @default(0.00) @map("year1")
|
|
847
|
+
year2 Decimal @default(0.00) @map("year2")
|
|
848
|
+
year3 Decimal @default(0.00) @map("year3")
|
|
849
|
+
yearEnd1 Int? @map("year_end1")
|
|
850
|
+
yearEnd2 Int? @map("year_end2")
|
|
851
|
+
yearEnd3 Int? @map("year_end3")
|
|
852
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
853
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
854
|
+
|
|
855
|
+
// Relations
|
|
856
|
+
accountantsCountry Lookup @relation("AccountantsCountry", fields: [accountantsCountryLid], references: [id])
|
|
857
|
+
businessCountry Lookup @relation("BusinessCountry", fields: [businessCountryLid], references: [id])
|
|
858
|
+
businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
|
|
859
|
+
charteredCertifiedOrOther Lookup @relation("CharteredCertifiedOrOther", fields: [charteredCertifiedOrOtherLid], references: [id])
|
|
860
|
+
registeredCountry Lookup @relation("RegisteredCountry", fields: [registeredCountryLid], references: [id])
|
|
861
|
+
Applicant Applicant[]
|
|
862
|
+
|
|
863
|
+
@@map("applicant_incomes")
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
// From prisma/applicants/loan-commitment.prisma
|
|
867
|
+
model LoanCommitment {
|
|
868
|
+
id String @id @default(uuid())
|
|
869
|
+
applicantId String @map("applicant_id")
|
|
870
|
+
commitmentId String @map("commitment_id")
|
|
871
|
+
commitmentTypeLid String? @map("commitment_type_lid")
|
|
872
|
+
lenderName String @map("lender_name")
|
|
873
|
+
loanTypeLid String @map("loan_type_lid")
|
|
874
|
+
securityDetails String @map("security_details")
|
|
875
|
+
purpose String? @map("purpose")
|
|
876
|
+
doHaveSharedResponsibility Boolean @map("do_have_shared_responsibility")
|
|
877
|
+
sharedMortgage String @map("shared_mortgage")
|
|
878
|
+
remainingTerm String? @map("remaining_term")
|
|
879
|
+
startDate String @map("start_date")
|
|
880
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
881
|
+
monthlyPayment Decimal @map("monthly_payment")
|
|
882
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
883
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
884
|
+
|
|
885
|
+
// Relations
|
|
886
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
887
|
+
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
888
|
+
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
889
|
+
|
|
890
|
+
@@map("applicant_loan_commitments")
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// From prisma/applicants/mortgage-commitment.prisma
|
|
894
|
+
model MortgageCommitment {
|
|
895
|
+
id String @id @default(uuid())
|
|
896
|
+
applicantId String @map("applicant_id")
|
|
897
|
+
lenderName String
|
|
898
|
+
propertyValue Decimal
|
|
899
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
900
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
901
|
+
fixedTerm String
|
|
902
|
+
originalLoanAmount Decimal
|
|
903
|
+
outstandingBalance Decimal
|
|
904
|
+
startDate String
|
|
905
|
+
monthlyPayment Decimal
|
|
906
|
+
commitmentId String
|
|
907
|
+
commitmentTypeLid String? @map("commitment_type_lid")
|
|
908
|
+
furtherAdvances Boolean
|
|
909
|
+
furtherAdvanceDetails String
|
|
910
|
+
accountUptoDate Boolean
|
|
911
|
+
accountUptoDateFailDetails String
|
|
912
|
+
accountInArrears Boolean
|
|
913
|
+
accountInArrearsDetails String
|
|
914
|
+
doHaveSharedResponsibility Boolean
|
|
915
|
+
sharedMortgage String
|
|
916
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
917
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
918
|
+
|
|
919
|
+
// Relations
|
|
920
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
921
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
922
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
923
|
+
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
924
|
+
|
|
925
|
+
@@map("applicant_mortgage_commitments")
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
// From prisma/applicants/other-income.prisma
|
|
929
|
+
model OtherIncome {
|
|
930
|
+
id String @id @default(uuid())
|
|
931
|
+
// Income Source 1
|
|
932
|
+
sourceDetails1 String?
|
|
933
|
+
amount1 Decimal @default(0.00)
|
|
934
|
+
payFrequency1Lid String? @map("pay_frequency1_lid")
|
|
935
|
+
guaranteed1 Boolean @default(false)
|
|
936
|
+
|
|
937
|
+
// Income Source 2
|
|
938
|
+
sourceDetails2 String?
|
|
939
|
+
amount2 Decimal @default(0.00)
|
|
940
|
+
payFrequency2Lid String? @map("pay_frequency2_lid")
|
|
941
|
+
guaranteed2 Boolean @default(false)
|
|
942
|
+
|
|
943
|
+
// Income Source 3
|
|
944
|
+
sourceDetails3 String?
|
|
945
|
+
amount3 Decimal @default(0.00)
|
|
946
|
+
payFrequency3Lid String? @map("pay_frequency3_lid")
|
|
947
|
+
guaranteed3 Boolean @default(false)
|
|
948
|
+
|
|
949
|
+
// Income Source 4
|
|
950
|
+
sourceDetails4 String?
|
|
951
|
+
amount4 Decimal @default(0.00)
|
|
952
|
+
payFrequency4Lid String? @map("pay_frequency4_lid")
|
|
953
|
+
guaranteed4 Boolean @default(false)
|
|
954
|
+
|
|
955
|
+
taxCredits Decimal @default(0.00)
|
|
956
|
+
maintenance Decimal @default(0.00)
|
|
957
|
+
otherBenefits Decimal @default(0.00)
|
|
958
|
+
grossPensionIncome Decimal @default(0.00)
|
|
959
|
+
privatePensionIncome Decimal @default(0.00)
|
|
960
|
+
statePensionIncome Decimal @default(0.00)
|
|
961
|
+
applicantId String @unique @map("applicant_id")
|
|
962
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
963
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
964
|
+
|
|
965
|
+
// Relations
|
|
966
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
967
|
+
payFrequency1 Lookup? @relation("PayFrequency1", fields: [payFrequency1Lid], references: [id])
|
|
968
|
+
payFrequency2 Lookup? @relation("PayFrequency2", fields: [payFrequency2Lid], references: [id])
|
|
969
|
+
payFrequency3 Lookup? @relation("PayFrequency3", fields: [payFrequency3Lid], references: [id])
|
|
970
|
+
payFrequency4 Lookup? @relation("PayFrequency4", fields: [payFrequency4Lid], references: [id])
|
|
971
|
+
|
|
972
|
+
@@map("applicant_other_income")
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
// From prisma/applicants/property-income.prisma
|
|
976
|
+
model PropertyIncome {
|
|
977
|
+
id String @id @default(uuid())
|
|
978
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
979
|
+
yearEnd1 Int @map("year_end1")
|
|
980
|
+
rentalIncome1 Decimal @map("rental_income1")
|
|
981
|
+
netProfit1 Decimal @map("net_profit1")
|
|
982
|
+
yearEnd2 Int @map("year_end2")
|
|
983
|
+
rentalIncome2 Decimal @map("rental_income2")
|
|
984
|
+
netProfit2 Decimal @map("net_profit2")
|
|
985
|
+
yearEnd3 Int @map("year_end3")
|
|
986
|
+
rentalIncome3 Decimal @map("rental_income3")
|
|
987
|
+
netProfit3 Decimal @map("net_profit3")
|
|
988
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
989
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
990
|
+
Applicant Applicant[]
|
|
991
|
+
|
|
992
|
+
@@map("applicant_property_incomes")
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
// From prisma/applicants/residence-commitment.prisma
|
|
996
|
+
model ResidenceCommitment {
|
|
997
|
+
id String @id @default(uuid())
|
|
998
|
+
applicantId String @map("applicant_id")
|
|
999
|
+
pageValidFlag Boolean @default(false)
|
|
1000
|
+
financeTypeHppLid String? @map("finance_type_hpp_lid")
|
|
1001
|
+
lenderName String
|
|
1002
|
+
propertyValue Decimal
|
|
1003
|
+
hppRepaymentTypeLid String @map("hpp_repayment_type_lid")
|
|
1004
|
+
mortgageTypeLid String? @map("mortgage_type_lid")
|
|
1005
|
+
fixedTerm String
|
|
1006
|
+
commitmentId String
|
|
1007
|
+
originalLoanAmount Decimal
|
|
1008
|
+
outstandingBalance Decimal
|
|
1009
|
+
startDate String
|
|
1010
|
+
mortgageRate Float
|
|
1011
|
+
remainingTermMonth Int
|
|
1012
|
+
financeHomeTypeLid String @map("finance_home_type_lid")
|
|
1013
|
+
chargeTypeLid String @map("charge_type_lid")
|
|
1014
|
+
monthlyPayment Decimal
|
|
1015
|
+
furtherAdvances Boolean
|
|
1016
|
+
furtherAdvanceDetails String
|
|
1017
|
+
accountUptoDate Boolean
|
|
1018
|
+
accountUptoDateFailDetails String
|
|
1019
|
+
accountInArrears Boolean
|
|
1020
|
+
accountInArrearsDetails String
|
|
1021
|
+
doHaveSharedResponsibility Boolean
|
|
1022
|
+
sharedMortgage String
|
|
1023
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1024
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1025
|
+
|
|
1026
|
+
// Relations
|
|
1027
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
1028
|
+
financeTypeHpp Lookup? @relation("FinanceTypeHpp", fields: [financeTypeHppLid], references: [id])
|
|
1029
|
+
hppRepaymentType Lookup @relation("HppRepaymentType", fields: [hppRepaymentTypeLid], references: [id])
|
|
1030
|
+
mortgageType Lookup? @relation("MortgageType", fields: [mortgageTypeLid], references: [id])
|
|
1031
|
+
financeHomeType Lookup @relation("FinanceHomeType", fields: [financeHomeTypeLid], references: [id])
|
|
1032
|
+
chargeType Lookup @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
1033
|
+
|
|
1034
|
+
@@map("applicant_residence_commitments")
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
// From prisma/applicants/risk-narrative.prisma
|
|
1038
|
+
model RiskNarrative {
|
|
1039
|
+
id String @id @default(uuid())
|
|
1040
|
+
call2StatusLid String? @map("call2_status_lid")
|
|
1041
|
+
clientReference String?
|
|
1042
|
+
docVerificationStatusLid String? @map("doc_verification_status_lid")
|
|
1043
|
+
isPoaTaskGenerated String?
|
|
1044
|
+
link String?
|
|
1045
|
+
riskLevel String?
|
|
1046
|
+
riskRating String?
|
|
1047
|
+
statusLid String? @map("status_lid")
|
|
1048
|
+
verificationLinkSentOn String?
|
|
1049
|
+
applicantId String @unique @map("applicant_id")
|
|
1050
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1051
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1052
|
+
|
|
1053
|
+
// Relations
|
|
1054
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
1055
|
+
call2Status Lookup? @relation("Call2Status", fields: [call2StatusLid], references: [id])
|
|
1056
|
+
docVerificationStatus Lookup? @relation("DocVerificationStatus", fields: [docVerificationStatusLid], references: [id])
|
|
1057
|
+
status Lookup? @relation("Status", fields: [statusLid], references: [id])
|
|
1058
|
+
|
|
1059
|
+
@@map("applicant_risk_narrative")
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1063
|
+
model SecuredLoanCommitment {
|
|
1064
|
+
id String @id @default(uuid())
|
|
1065
|
+
applicantId String @map("applicant_id")
|
|
1066
|
+
lenderName String
|
|
1067
|
+
commitmentId String
|
|
1068
|
+
securityDetails String
|
|
1069
|
+
purpose String
|
|
1070
|
+
doHaveSharedResponsibility Boolean
|
|
1071
|
+
sharedMortgage String
|
|
1072
|
+
remainingTerm String?
|
|
1073
|
+
startDate String
|
|
1074
|
+
outstandingBalance Decimal
|
|
1075
|
+
monthlyPayment Decimal
|
|
1076
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1077
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1078
|
+
|
|
1079
|
+
// Relations
|
|
1080
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
1081
|
+
|
|
1082
|
+
@@map("applicant_secured_loan_commitments")
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1086
|
+
model UnsecuredLoanCommitment {
|
|
1087
|
+
id String @id @default(uuid())
|
|
1088
|
+
applicantId String @map("applicant_id")
|
|
1089
|
+
lenderName String
|
|
1090
|
+
commitmentId String
|
|
1091
|
+
purpose String
|
|
1092
|
+
doHaveSharedResponsibility Boolean
|
|
1093
|
+
sharedMortgage String
|
|
1094
|
+
remainingTerm String?
|
|
1095
|
+
startDate String
|
|
1096
|
+
outstandingBalance Decimal
|
|
1097
|
+
monthlyPayment Decimal
|
|
1098
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1099
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1100
|
+
|
|
1101
|
+
// Relations
|
|
1102
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
1103
|
+
|
|
1104
|
+
@@map("applicant_unsecured_loan_commitments")
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// From prisma/applications/application-audit.prisma
|
|
1108
|
+
model ApplicationAudit {
|
|
1109
|
+
id String @id @default(uuid())
|
|
1110
|
+
auditId String @map("audit_id")
|
|
1111
|
+
accountId String @map("account_id")
|
|
1112
|
+
auditCorrelationId String @map("audit_correlation_id")
|
|
1113
|
+
auditDate DateTime @map("audit_date")
|
|
1114
|
+
changeType String @map("change_type")
|
|
1115
|
+
applicationId String @map("application_id")
|
|
1116
|
+
name String
|
|
1117
|
+
oldValue String @map("old_value")
|
|
1118
|
+
newValue String @map("new_value")
|
|
1119
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1120
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1121
|
+
|
|
1122
|
+
// Relations
|
|
1123
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1124
|
+
|
|
1125
|
+
@@map("application_audits")
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
// From prisma/applications/application-company.prisma
|
|
1129
|
+
model ApplicationCompany {
|
|
1130
|
+
id String @id @default(uuid())
|
|
1131
|
+
applicationId String @unique @map("application_id")
|
|
1132
|
+
name String
|
|
1133
|
+
registrationNumber String? @map("registration_number")
|
|
1134
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1135
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1136
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1137
|
+
|
|
1138
|
+
@@map("application_companies")
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
// From prisma/applications/application-direct-debit.prisma
|
|
1142
|
+
model ApplicationDirectDebit {
|
|
1143
|
+
id String @id @default(uuid())
|
|
1144
|
+
applicationId String @unique @map("application_id")
|
|
1145
|
+
accountNumber String @map("account_number")
|
|
1146
|
+
sortCode String @map("sort_code")
|
|
1147
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1148
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1149
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1150
|
+
|
|
1151
|
+
@@map("application_direct_debits")
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
// From prisma/applications/application-document.prisma
|
|
1155
|
+
model ApplicationDocument {
|
|
1156
|
+
id String @id @default(uuid())
|
|
1157
|
+
applicationId String? @map("application_id")
|
|
1158
|
+
documentId String @map("document_id")
|
|
1159
|
+
owningEntityId String? @map("owning_entity_id")
|
|
1160
|
+
documentTypeLid String? @map("document_type_lid")
|
|
1161
|
+
documentTypeId String? @map("document_type_id")
|
|
1162
|
+
fileName String? @map("file_name")
|
|
1163
|
+
contentType String? @map("content_type")
|
|
1164
|
+
created String? @map("created")
|
|
1165
|
+
createdBy String? @map("created_by")
|
|
1166
|
+
isGenerated String? @map("is_generated")
|
|
1167
|
+
data String? @map("data")
|
|
1168
|
+
envelopeId String? @map("envelope_id")
|
|
1169
|
+
signers Json @default("[]") @map("signers")
|
|
1170
|
+
documentTypeDisplayName String? @map("document_type_display_name")
|
|
1171
|
+
documentTypeValue String? @map("document_type_value")
|
|
1172
|
+
documentTypeData Json? @map("document_type_data")
|
|
1173
|
+
documentUrl String? @map("document_url")
|
|
1174
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1175
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1176
|
+
|
|
1177
|
+
// Relations
|
|
1178
|
+
application Application? @relation(fields: [applicationId], references: [id])
|
|
1179
|
+
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
1180
|
+
|
|
1181
|
+
@@map("application_documents")
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
// From prisma/applications/application-fieldconfig.prisma
|
|
1185
|
+
model ApplicationFieldConfig {
|
|
1186
|
+
id String @id @default(uuid())
|
|
1187
|
+
fieldName String @unique @map("field_name")
|
|
1188
|
+
validateProductOnChange String @default("true") @map("validate_product_on_change")
|
|
1189
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1190
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1191
|
+
|
|
1192
|
+
@@map("application_field_configs")
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
// From prisma/applications/application-illustration.prisma
|
|
1196
|
+
model ApplicationIllustration {
|
|
1197
|
+
id String @id @default(uuid())
|
|
1198
|
+
date DateTime @map("date")
|
|
1199
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1200
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1201
|
+
|
|
1202
|
+
@@map("application_illustrations")
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
// From prisma/applications/application-legal.prisma
|
|
1206
|
+
model ApplicationLegal {
|
|
1207
|
+
id String @id @default(uuid())
|
|
1208
|
+
assignedSolicitor String @default("") @map("assigned_solicitor")
|
|
1209
|
+
solicitorsReference String @default("") @map("solicitors_reference")
|
|
1210
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1211
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1212
|
+
|
|
1213
|
+
@@map("application_legals")
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
// From prisma/applications/application-mortgage.prisma
|
|
1217
|
+
model ApplicationMortgage {
|
|
1218
|
+
id String @id @default(uuid())
|
|
1219
|
+
applicationId String @unique @map("application_id")
|
|
1220
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
1221
|
+
existingMortgageLender String? @map("existing_mortgage_lender")
|
|
1222
|
+
topSlicing Boolean @default(false) @map("top_slicing")
|
|
1223
|
+
purposeOfMortgage String @map("purpose_of_mortgage")
|
|
1224
|
+
depositComeFromLids String[] @map("deposit_come_from_lids")
|
|
1225
|
+
ifOtherDetails String @map("if_other_details")
|
|
1226
|
+
purchasePrice Decimal @map("purchase_price")
|
|
1227
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
1228
|
+
exitStrategyLid String @map("exit_strategy_lid")
|
|
1229
|
+
isCapitalRaise Boolean @default(false) @map("is_capital_raise")
|
|
1230
|
+
purchaseDate String @map("purchase_date")
|
|
1231
|
+
estimatedValue Decimal @map("estimated_value")
|
|
1232
|
+
loanRequired Decimal @map("loan_required")
|
|
1233
|
+
monthlyRentalIncome Decimal @map("monthly_rental_income")
|
|
1234
|
+
outstandingBalance Decimal @map("outstanding_balance")
|
|
1235
|
+
fundRaisedFor String @map("fund_raised_for")
|
|
1236
|
+
sourceOfFundsLid String @map("source_of_funds_lid")
|
|
1237
|
+
sourceOfFundDetails String @map("source_of_fund_details")
|
|
1238
|
+
propertyValuationDetails String @map("property_valuation_details")
|
|
1239
|
+
telephoneNumber String @map("telephone_number")
|
|
1240
|
+
isDistressedSale Boolean @default(false) @map("is_distressed_sale")
|
|
1241
|
+
isPurchasedBelowMarketValue Boolean @default(false) @map("is_purchased_below_market_value")
|
|
1242
|
+
isPurchasedAsSale Boolean @default(false) @map("is_purchased_as_sale")
|
|
1243
|
+
isReadyToSell Boolean @default(false) @map("is_ready_to_sell")
|
|
1244
|
+
isGovernmentInitiative Boolean @default(false) @map("is_government_initiative")
|
|
1245
|
+
vendorsName String? @map("vendors_name")
|
|
1246
|
+
saleMadeLid String? @map("sale_made_lid")
|
|
1247
|
+
isTheIntentionToLet Boolean @default(false) @map("is_the_intention_to_let")
|
|
1248
|
+
proposedTenantsLids String[] @map("proposed_tenants_lids")
|
|
1249
|
+
leaseTypeLid String @map("lease_type_lid")
|
|
1250
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1251
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1252
|
+
|
|
1253
|
+
// Relations
|
|
1254
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1255
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1256
|
+
exitStrategy Lookup @relation("ExitStrategy", fields: [exitStrategyLid], references: [id])
|
|
1257
|
+
sourceOfFunds Lookup @relation("SourceOfFunds", fields: [sourceOfFundsLid], references: [id])
|
|
1258
|
+
saleMade Lookup? @relation("SaleMade", fields: [saleMadeLid], references: [id])
|
|
1259
|
+
leaseType Lookup @relation("LeaseType", fields: [leaseTypeLid], references: [id])
|
|
1260
|
+
depositComeFrom Lookup[] @relation("DepositComeFrom")
|
|
1261
|
+
proposedTenants Lookup[] @relation("ProposedTenants")
|
|
1262
|
+
|
|
1263
|
+
@@map("application_mortgages")
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
// From prisma/applications/application-note.prisma
|
|
1267
|
+
model ApplicationNote {
|
|
1268
|
+
id String @id @default(uuid())
|
|
1269
|
+
applicationId String @map("application_id")
|
|
1270
|
+
noteId String? @map("note_id")
|
|
1271
|
+
createdOn String? @map("created_on")
|
|
1272
|
+
createdBy String? @map("created_by")
|
|
1273
|
+
username String? @map("username")
|
|
1274
|
+
createdByUserId String? @map("created_by_user_id")
|
|
1275
|
+
typeLid String? @map("type_lid")
|
|
1276
|
+
subTypeLid String? @map("sub_type_lid")
|
|
1277
|
+
subject String? @map("subject")
|
|
1278
|
+
note String @map("note")
|
|
1279
|
+
reminderDate String? @map("reminder_date")
|
|
1280
|
+
attachmentDocumentId String? @map("attachment_document_id")
|
|
1281
|
+
assignedOperation String @default("") @map("assigned_operation")
|
|
1282
|
+
autoCreated String @default("false") @map("auto_created")
|
|
1283
|
+
additionalData Json? @map("additional_data")
|
|
1284
|
+
autoCreatedId String? @map("auto_created_id")
|
|
1285
|
+
assignedTo String @default("") @map("assigned_to")
|
|
1286
|
+
assignedBy String? @map("assigned_by")
|
|
1287
|
+
assignedByUserId String? @map("assigned_by_user_id")
|
|
1288
|
+
comment String? @map("comment")
|
|
1289
|
+
reminderStatus String @default("None") @map("reminder_status")
|
|
1290
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1291
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1292
|
+
|
|
1293
|
+
// Relations
|
|
1294
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1295
|
+
type Lookup? @relation("NoteType", fields: [typeLid], references: [id])
|
|
1296
|
+
subType Lookup? @relation("NoteSubType", fields: [subTypeLid], references: [id])
|
|
1297
|
+
createdByUser User? @relation("CreatedByUser", fields: [createdByUserId], references: [id])
|
|
1298
|
+
assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
|
|
1299
|
+
|
|
1300
|
+
@@map("application_notes")
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
// From prisma/applications/application-offer.prisma
|
|
1304
|
+
model ApplicationOffer {
|
|
1305
|
+
id String @id @default(uuid())
|
|
1306
|
+
date String @map("date")
|
|
1307
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1308
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1309
|
+
|
|
1310
|
+
@@map("application_offers")
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
// From prisma/applications/application-onboarding.prisma
|
|
1314
|
+
model ApplicationOnboarding {
|
|
1315
|
+
id String @id @default(uuid())
|
|
1316
|
+
errors String @default("")
|
|
1317
|
+
status String @default("")
|
|
1318
|
+
statusDate String?
|
|
1319
|
+
warnings String @default("")
|
|
1320
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1321
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1322
|
+
|
|
1323
|
+
@@map("application_onboardings")
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
// From prisma/applications/application-product.prisma
|
|
1327
|
+
model ApplicationProduct {
|
|
1328
|
+
id String @id @default(uuid())
|
|
1329
|
+
applicationId String @map("application_id")
|
|
1330
|
+
selectedProduct String @default("") @map("selected_product")
|
|
1331
|
+
lendingTypeLid String? @map("lending_type_lid")
|
|
1332
|
+
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
1333
|
+
repaymentTypeLid String? @map("repayment_type_lid")
|
|
1334
|
+
numberOfYearsToRepay Int @default(0) @map("number_of_years_to_repay")
|
|
1335
|
+
repaymentVehicle String @map("repayment_vehicle")
|
|
1336
|
+
fixedAmount Decimal @default(0.00) @map("fixed_amount")
|
|
1337
|
+
isFinanceRecommendedToApplicantLid String? @map("is_finance_recommended_to_applicant_lid")
|
|
1338
|
+
procFeeRateLid String? @map("proc_fee_rate_lid")
|
|
1339
|
+
networkClubSubmission Boolean @default(false) @map("network_club_submission")
|
|
1340
|
+
clubNetworkNameLid String? @map("club_network_name_lid")
|
|
1341
|
+
introducerSubmission Boolean @default(false) @map("introducer_submission")
|
|
1342
|
+
introducer String @default("") @map("introducer")
|
|
1343
|
+
bdm String @map("bdm")
|
|
1344
|
+
tempAppFee Decimal @default(0.00) @map("temp_app_fee")
|
|
1345
|
+
productFeePaymentTypeLid String? @map("product_fee_payment_type_lid")
|
|
1346
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1347
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1348
|
+
|
|
1349
|
+
// Relations
|
|
1350
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1351
|
+
lendingType Lookup? @relation("LendingType", fields: [lendingTypeLid], references: [id])
|
|
1352
|
+
repaymentType Lookup? @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1353
|
+
isFinanceRecommendedToApplicant Lookup? @relation("FinanceRecommended", fields: [isFinanceRecommendedToApplicantLid], references: [id])
|
|
1354
|
+
procFeeRate Lookup? @relation("ProcFeeRate", fields: [procFeeRateLid], references: [id])
|
|
1355
|
+
clubNetworkName Lookup? @relation("ClubNetworkName", fields: [clubNetworkNameLid], references: [id])
|
|
1356
|
+
productFeePaymentType Lookup? @relation("ProductFeePaymentType", fields: [productFeePaymentTypeLid], references: [id])
|
|
1357
|
+
|
|
1358
|
+
@@map("application_products")
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
// From prisma/applications/application-rationale.prisma
|
|
1362
|
+
model ApplicationRationale {
|
|
1363
|
+
id String @id @default(uuid())
|
|
1364
|
+
applicationId String @unique @map("application_id")
|
|
1365
|
+
affordabilityDescription String @default("") @map("affordability_description")
|
|
1366
|
+
affordabilityAreaOfOfferCondition String @default("") @map("affordability_area_of_offer_condition")
|
|
1367
|
+
affordabilityAreaOfConcern String @default("") @map("affordability_area_of_concern")
|
|
1368
|
+
affordabilityStatusLid String? @map("affordability_status_lid")
|
|
1369
|
+
applicantsDescription String @default("") @map("applicants_description")
|
|
1370
|
+
applicantsAreaOfOfferCondition String @default("") @map("applicants_area_of_offer_condition")
|
|
1371
|
+
applicantsAreaOfConcern String @default("") @map("applicants_area_of_concern")
|
|
1372
|
+
applicantsStatusLid String? @map("applicants_status_lid")
|
|
1373
|
+
creditConductDescription String @default("") @map("credit_conduct_description")
|
|
1374
|
+
creditConductAreaOfOfferCondition String @default("") @map("credit_conduct_area_of_offer_condition")
|
|
1375
|
+
creditConductAreaOfConcern String @default("") @map("credit_conduct_area_of_concern")
|
|
1376
|
+
creditConductStatusLid String? @map("credit_conduct_status_lid")
|
|
1377
|
+
fraudCheckDescription String @default("") @map("fraud_check_description")
|
|
1378
|
+
fraudCheckAreaOfOfferCondition String @default("") @map("fraud_check_area_of_offer_condition")
|
|
1379
|
+
fraudCheckAreaOfConcern String @default("") @map("fraud_check_area_of_concern")
|
|
1380
|
+
fraudCheckStatusLid String? @map("fraud_check_status_lid")
|
|
1381
|
+
incomeSourceDescription String @default("") @map("income_source_description")
|
|
1382
|
+
incomeSourceAreaOfOfferCondition String @default("") @map("income_source_area_of_offer_condition")
|
|
1383
|
+
incomeSourceAreaOfConcern String @default("") @map("income_source_area_of_concern")
|
|
1384
|
+
incomeSourceStatusLid String? @map("income_source_status_lid")
|
|
1385
|
+
loanDescription String @default("") @map("loan_description")
|
|
1386
|
+
loanAreaOfOfferCondition String @default("") @map("loan_area_of_offer_condition")
|
|
1387
|
+
loanAreaOfConcern String @default("") @map("loan_area_of_concern")
|
|
1388
|
+
loanStatusLid String? @map("loan_status_lid")
|
|
1389
|
+
securityDescription String @default("") @map("security_description")
|
|
1390
|
+
securityAreaOfOfferCondition String @default("") @map("security_area_of_offer_condition")
|
|
1391
|
+
securityAreaOfConcern String @default("") @map("security_area_of_concern")
|
|
1392
|
+
securityStatusLid String? @map("security_status_lid")
|
|
1393
|
+
propertyDescription String @default("") @map("property_description")
|
|
1394
|
+
propertyAreaOfOfferCondition String @default("") @map("property_area_of_offer_condition")
|
|
1395
|
+
propertyAreaOfConcern String @default("") @map("property_area_of_concern")
|
|
1396
|
+
propertyStatusLid String? @map("property_status_lid")
|
|
1397
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1398
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1399
|
+
|
|
1400
|
+
// Relations
|
|
1401
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1402
|
+
affordabilityStatus Lookup? @relation("AffordabilityStatus", fields: [affordabilityStatusLid], references: [id])
|
|
1403
|
+
applicantsStatus Lookup? @relation("ApplicantsStatus", fields: [applicantsStatusLid], references: [id])
|
|
1404
|
+
creditConductStatus Lookup? @relation("CreditConductStatus", fields: [creditConductStatusLid], references: [id])
|
|
1405
|
+
fraudCheckStatus Lookup? @relation("FraudCheckStatus", fields: [fraudCheckStatusLid], references: [id])
|
|
1406
|
+
incomeSourceStatus Lookup? @relation("IncomeSourceStatus", fields: [incomeSourceStatusLid], references: [id])
|
|
1407
|
+
loanStatus Lookup? @relation("LoanStatus", fields: [loanStatusLid], references: [id])
|
|
1408
|
+
securityStatus Lookup? @relation("SecurityStatus", fields: [securityStatusLid], references: [id])
|
|
1409
|
+
propertyStatus Lookup? @relation("PropertyStatus", fields: [propertyStatusLid], references: [id])
|
|
1410
|
+
|
|
1411
|
+
@@map("application_rationales")
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
// From prisma/applications/application-risk-narrative.prisma
|
|
1415
|
+
model ApplicationRiskNarrative {
|
|
1416
|
+
id String @id @default(uuid())
|
|
1417
|
+
call1RequestedOn String? @map("call1_requested_on")
|
|
1418
|
+
call2RequestedOn String? @map("call2_requested_on")
|
|
1419
|
+
call2StatusLid String? @map("call2_status_lid")
|
|
1420
|
+
rationaleForRiskRating String? @map("rationale_for_risk_rating")
|
|
1421
|
+
retryCount String? @map("retry_count")
|
|
1422
|
+
riskRating String? @map("risk_rating")
|
|
1423
|
+
statusLid String? @map("status_lid")
|
|
1424
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1425
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1426
|
+
|
|
1427
|
+
// Relations
|
|
1428
|
+
call2Status Lookup? @relation("Call2Status", fields: [call2StatusLid], references: [id])
|
|
1429
|
+
status Lookup? @relation("Status", fields: [statusLid], references: [id])
|
|
1430
|
+
|
|
1431
|
+
@@map("application_risk_narratives")
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
// From prisma/applications/application-valuation.prisma
|
|
1435
|
+
model ApplicationValuation {
|
|
1436
|
+
id String @id @default(uuid())
|
|
1437
|
+
amount String? @map("amount")
|
|
1438
|
+
epcRating String @default("") @map("epc_rating")
|
|
1439
|
+
epcScore String? @map("epc_score")
|
|
1440
|
+
estimatedRentalValue String? @map("estimated_rental_value")
|
|
1441
|
+
instructionId String @default("") @map("instruction_id")
|
|
1442
|
+
instructionStatus String @default("") @map("instruction_status")
|
|
1443
|
+
instructionStatusComment String @default("") @map("instruction_status_comment")
|
|
1444
|
+
isManual String @default("false") @map("is_manual")
|
|
1445
|
+
squareMetres String? @map("square_metres")
|
|
1446
|
+
valuerNotes String @default("") @map("valuer_notes")
|
|
1447
|
+
version String @default("") @map("version")
|
|
1448
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1449
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1450
|
+
|
|
1451
|
+
@@map("application_valuations")
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
// From prisma/applications/application.prisma
|
|
1455
|
+
model Application {
|
|
1456
|
+
id String @id @default(uuid())
|
|
1457
|
+
queueId String[] @map("queue_id")
|
|
1458
|
+
assignedToUserId String? @map("assigned_to_user_id")
|
|
1459
|
+
applicationId String @map("application_id")
|
|
1460
|
+
isApplicationFeePaid String @map("is_application_fee_paid")
|
|
1461
|
+
applicationNumber String @map("application_number")
|
|
1462
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1463
|
+
bankSolicitor String @default("") @map("bank_solicitor")
|
|
1464
|
+
brokerId String @map("broker_id")
|
|
1465
|
+
caseManager String @default("") @map("case_manager")
|
|
1466
|
+
caseManagerAccepted String @default("false") @map("case_manager_accepted")
|
|
1467
|
+
completedReason String @default("") @map("completed_reason")
|
|
1468
|
+
isIntendToOccupy String @map("is_intend_to_occupy")
|
|
1469
|
+
introducer String @default("") @map("introducer")
|
|
1470
|
+
isIntroducerSubmission String @map("is_introducer_submission")
|
|
1471
|
+
isBrokerAssigned String @default("false") @map("is_broker_assigned")
|
|
1472
|
+
isFinanceRecommendedToApplicant String @map("is_finance_recommended_to_applicant")
|
|
1473
|
+
isWorkflowTaskCreated String @map("is_workflow_task_created")
|
|
1474
|
+
lastUpdated String? @map("last_updated")
|
|
1475
|
+
lendingTypeLid String @map("lending_type_lid")
|
|
1476
|
+
networkClubName String @default("") @map("network_club_name")
|
|
1477
|
+
isNetworkClubSubmission String @map("is_network_club_submission")
|
|
1478
|
+
newReason String @default("") @map("new_reason")
|
|
1479
|
+
purchaseTypeLid String @map("purchase_type_lid")
|
|
1480
|
+
rejectedReason String @default("") @map("rejected_reason")
|
|
1481
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
1482
|
+
selectedProduct String? @map("selected_product")
|
|
1483
|
+
sourceOfWealthLids String[] @map("source_of_wealth_lids")
|
|
1484
|
+
sowBusiness String @default("") @map("sow_business")
|
|
1485
|
+
sowInheritance String @default("") @map("sow_inheritance")
|
|
1486
|
+
sowOther String @default("") @map("sow_other")
|
|
1487
|
+
sowProperty String @default("") @map("sow_property")
|
|
1488
|
+
sowSalary String @default("") @map("sow_salary")
|
|
1489
|
+
statusLid String @map("status_lid")
|
|
1490
|
+
submitReason String @default("") @map("submit_reason")
|
|
1491
|
+
submittedDate String? @map("submitted_date")
|
|
1492
|
+
underwriter String @default("") @map("underwriter")
|
|
1493
|
+
isValuationFeePaid String @map("is_valuation_fee_paid")
|
|
1494
|
+
withdrawalReason String @default("") @map("withdrawal_reason")
|
|
1495
|
+
withdrawalReasonCode String @default("") @map("withdrawal_reason_code")
|
|
1496
|
+
productId String? @map("product_id")
|
|
1497
|
+
securityId String @unique @map("security_id")
|
|
1498
|
+
solicitorId String @unique @map("solicitor_id")
|
|
1499
|
+
isActive String @default("false") @map("is_active")
|
|
1500
|
+
isUkResident String @default("true") @map("is_uk_resident")
|
|
1501
|
+
riskRating String? @map("risk_rating")
|
|
1502
|
+
directDebitId String? @unique @map("direct_debit_id")
|
|
1503
|
+
mortgageId String? @unique @map("mortgage_id")
|
|
1504
|
+
companyId String? @unique @map("company_id")
|
|
1505
|
+
rationaleId String? @unique @map("rationale_id")
|
|
1506
|
+
newAuditRecordsCount String @default("0") @map("new_audit_records_count")
|
|
1507
|
+
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
1508
|
+
propertyIds String[] @map("property_ids")
|
|
1509
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1510
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1511
|
+
|
|
1512
|
+
// Relations
|
|
1513
|
+
broker Broker @relation(fields: [brokerId], references: [id])
|
|
1514
|
+
security Security?
|
|
1515
|
+
solicitor Solicitor?
|
|
1516
|
+
product Product? @relation(fields: [productId], references: [id])
|
|
1517
|
+
directDebit ApplicationDirectDebit? @relation
|
|
1518
|
+
mortgage ApplicationMortgage? @relation
|
|
1519
|
+
company ApplicationCompany? @relation
|
|
1520
|
+
rationale ApplicationRationale? @relation
|
|
1521
|
+
applicants Applicant[]
|
|
1522
|
+
properties Property[] @relation("ApplicationProperties")
|
|
1523
|
+
|
|
1524
|
+
// Lookup relations
|
|
1525
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
1526
|
+
lendingType Lookup @relation("LendingType", fields: [lendingTypeLid], references: [id])
|
|
1527
|
+
purchaseType Lookup @relation("PurchaseType", fields: [purchaseTypeLid], references: [id])
|
|
1528
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1529
|
+
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
1530
|
+
DirectDebit DirectDebit[]
|
|
1531
|
+
ApplicationAudit ApplicationAudit[]
|
|
1532
|
+
ApplicationDocument ApplicationDocument[]
|
|
1533
|
+
ApplicationNote ApplicationNote[]
|
|
1534
|
+
ApplicationProduct ApplicationProduct[]
|
|
1535
|
+
Company Company[]
|
|
1536
|
+
Underwriter Underwriter[]
|
|
1537
|
+
|
|
1538
|
+
@@index([applicationTypeLid])
|
|
1539
|
+
@@index([lendingTypeLid])
|
|
1540
|
+
@@index([purchaseTypeLid])
|
|
1541
|
+
@@index([statusLid])
|
|
1542
|
+
@@index([repaymentTypeLid])
|
|
1543
|
+
@@map("applications")
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// From prisma/applications/broker.prisma
|
|
1547
|
+
model Broker {
|
|
1548
|
+
id String @id @default(uuid())
|
|
1549
|
+
brokerId String? @map("broker_id")
|
|
1550
|
+
landlinePhone String? @map("landline_phone")
|
|
1551
|
+
mobileTelephone String? @map("mobile_telephone")
|
|
1552
|
+
addressPostCode String? @map("address_post_code")
|
|
1553
|
+
addressLine1 String? @map("address_line1")
|
|
1554
|
+
addressLine2 String? @map("address_line2")
|
|
1555
|
+
addressLine3 String? @map("address_line3")
|
|
1556
|
+
addressCity String? @map("address_city")
|
|
1557
|
+
addressCountry String? @map("address_country")
|
|
1558
|
+
tradingName String? @map("trading_name")
|
|
1559
|
+
fcaNumber String? @map("fca_number")
|
|
1560
|
+
brokerType String? @map("broker_type")
|
|
1561
|
+
email String? @map("email")
|
|
1562
|
+
network String? @map("network")
|
|
1563
|
+
firstName String? @map("first_name")
|
|
1564
|
+
lastName String? @map("last_name")
|
|
1565
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1566
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1567
|
+
Application Application[]
|
|
1568
|
+
|
|
1569
|
+
@@map("brokers")
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
// From prisma/applications/checklist-item.prisma
|
|
1573
|
+
model ChecklistItem {
|
|
1574
|
+
id String @id @default(uuid())
|
|
1575
|
+
additionalOfferConditions String @default("") @map("additional_offer_conditions")
|
|
1576
|
+
appFormSignedNotes String @default("") @map("app_form_signed_notes")
|
|
1577
|
+
applicationCompletionDate String? @map("application_completion_date")
|
|
1578
|
+
buildingInsuranceInsurerName String @default("") @map("building_insurance_insurer_name")
|
|
1579
|
+
buildingInsurancePolicyNumber String @default("") @map("building_insurance_policy_number")
|
|
1580
|
+
buildingInsuranceReceived String @default("") @map("building_insurance_received")
|
|
1581
|
+
buildingInsuranceRenewalDate String? @map("building_insurance_renewal_date")
|
|
1582
|
+
dateOfValuationReceived String? @map("date_of_valuation_received")
|
|
1583
|
+
feePaidDocumentsDownloaded String @default("") @map("fee_paid_documents_downloaded")
|
|
1584
|
+
feePaidNotes String @default("") @map("fee_paid_notes")
|
|
1585
|
+
fundsNotes String @default("") @map("funds_notes")
|
|
1586
|
+
fundsReleasedDate String? @map("funds_released_date")
|
|
1587
|
+
hasAllDocsReviewedAndAccepted String @default("") @map("has_all_docs_reviewed_and_accepted")
|
|
1588
|
+
idnPorReceived String @default("") @map("idn_por_received")
|
|
1589
|
+
legalCompletionDate String? @map("legal_completion_date")
|
|
1590
|
+
legalDocsReceived String @default("") @map("legal_docs_received")
|
|
1591
|
+
legalNotes String @default("") @map("legal_notes")
|
|
1592
|
+
ninetyDaysValuationAmount String @default("") @map("ninety_days_valuation_amount")
|
|
1593
|
+
offerConditionsItems String @default("") @map("offer_conditions_items")
|
|
1594
|
+
offerConditionsMet String @default("") @map("offer_conditions_met")
|
|
1595
|
+
offerNotes String @default("") @map("offer_notes")
|
|
1596
|
+
offerOfferPrepared String @default("") @map("offer_offer_prepared")
|
|
1597
|
+
offerOfferReviewed String @default("") @map("offer_offer_reviewed")
|
|
1598
|
+
offerSignedNotes String @default("") @map("offer_signed_notes")
|
|
1599
|
+
offerSolicitorInstructedDate String? @map("offer_solicitor_instructed_date")
|
|
1600
|
+
packagingNotes String @default("") @map("packaging_notes")
|
|
1601
|
+
preOfferNotes String @default("") @map("pre_offer_notes")
|
|
1602
|
+
reinstatementAmount String @default("") @map("reinstatement_amount")
|
|
1603
|
+
rotReceived String @default("") @map("rot_received")
|
|
1604
|
+
rotReceivedDate String? @map("rot_received_date")
|
|
1605
|
+
salesContractReceived String @default("") @map("sales_contract_received")
|
|
1606
|
+
underwritingNotes String @default("") @map("underwriting_notes")
|
|
1607
|
+
underwritingValuationNotes String @default("") @map("underwriting_valuation_notes")
|
|
1608
|
+
valuationAccepted String? @map("valuation_accepted")
|
|
1609
|
+
valuationFurtherConditions String @default("") @map("valuation_further_conditions")
|
|
1610
|
+
valuationNotes String @default("") @map("valuation_notes")
|
|
1611
|
+
valuationReceived String? @map("valuation_received")
|
|
1612
|
+
valuationRequestedDate String? @map("valuation_requested_date")
|
|
1613
|
+
valuationScheduledDate String? @map("valuation_scheduled_date")
|
|
1614
|
+
valuationSurveyorDetails String @default("") @map("valuation_surveyor_details")
|
|
1615
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1616
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1617
|
+
|
|
1618
|
+
@@map("checklist_items")
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
// From prisma/applications/company.prisma
|
|
1622
|
+
model Company {
|
|
1623
|
+
id String @id @default(uuid())
|
|
1624
|
+
applicationId String @map("application_id")
|
|
1625
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1626
|
+
registeredName String @map("registered_name")
|
|
1627
|
+
businessTypeLid String @map("business_type_lid")
|
|
1628
|
+
registeredNumber Int @map("registered_number")
|
|
1629
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
1630
|
+
tradingSince String? @map("trading_since")
|
|
1631
|
+
natureOfBusiness String @default("") @map("nature_of_business")
|
|
1632
|
+
yearEnd String? @map("year_end")
|
|
1633
|
+
addressPostCode String @default("") @map("address_post_code")
|
|
1634
|
+
addressLine1 String @map("address_line1")
|
|
1635
|
+
addressLine2 String? @map("address_line2")
|
|
1636
|
+
addressLine3 String? @map("address_line3")
|
|
1637
|
+
addressCity String? @map("address_city")
|
|
1638
|
+
addressCountryLid String @map("address_country_lid")
|
|
1639
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1640
|
+
yearEnd1 Int @map("year_end1")
|
|
1641
|
+
turnoverYear1 Decimal @default(0.00) @map("turnover_year1")
|
|
1642
|
+
netProfitYear1 Decimal @default(0.00) @map("net_profit_year1")
|
|
1643
|
+
yearEnd2 Int @map("year_end2")
|
|
1644
|
+
turnoverYear2 Decimal @default(0.00) @map("turnover_year2")
|
|
1645
|
+
netProfitYear2 Decimal @default(0.00) @map("net_profit_year2")
|
|
1646
|
+
yearEnd3 Int @map("year_end3")
|
|
1647
|
+
turnoverYear3 Decimal @default(0.00) @map("turnover_year3")
|
|
1648
|
+
netProfitYear3 Decimal @default(0.00) @map("net_profit_year3")
|
|
1649
|
+
companyCreditDefaults String @default("") @map("company_credit_defaults")
|
|
1650
|
+
companyCountyCourtJudgment String @default("") @map("company_county_court_judgment")
|
|
1651
|
+
companySecuredArrears String @default("") @map("company_secured_arrears")
|
|
1652
|
+
companyUnsecuredArrears String @default("") @map("company_unsecured_arrears")
|
|
1653
|
+
companyBankruptcy String @default("") @map("company_bankruptcy")
|
|
1654
|
+
companyBankruptcyYes Boolean @default(false) @map("company_bankruptcy_yes")
|
|
1655
|
+
companyBankruptcyNo Boolean @default(true) @map("company_bankruptcy_no")
|
|
1656
|
+
companyCCJInLastThreeYearYes Boolean @default(false) @map("company_ccj_in_last_three_year_yes")
|
|
1657
|
+
companyCCJInLastThreeYearNo Boolean @default(true) @map("company_ccj_in_last_three_year_no")
|
|
1658
|
+
companyDefaultsInLastYearYes Boolean @default(false) @map("company_defaults_in_last_year_yes")
|
|
1659
|
+
companyDefaultsInLastYearNo Boolean @default(true) @map("company_defaults_in_last_year_no")
|
|
1660
|
+
companyAnyVoluntaryEnforcedPossessionYes Boolean @default(false) @map("company_any_voluntary_enforced_possession_yes")
|
|
1661
|
+
companyAnyVoluntaryEnforcedPossessionNo Boolean @default(true) @map("company_any_voluntary_enforced_possession_no")
|
|
1662
|
+
doYouKnowRegisteredNumber Boolean @default(true) @map("do_you_know_registered_number")
|
|
1663
|
+
sicCodes String[] @map("sic_codes")
|
|
1664
|
+
epc String @default("") @map("epc")
|
|
1665
|
+
remainingLease String @default("") @map("remaining_lease")
|
|
1666
|
+
dateOfIncorporation String? @map("date_of_incorporation")
|
|
1667
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1668
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1669
|
+
|
|
1670
|
+
// Relations
|
|
1671
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1672
|
+
businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
|
|
1673
|
+
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
1674
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1675
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
1676
|
+
applicantShareholdings ApplicantShareholding[]
|
|
1677
|
+
|
|
1678
|
+
@@map("companies")
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
model ApplicantShareholding {
|
|
1682
|
+
id String @id @default(uuid())
|
|
1683
|
+
companyId String @map("company_id")
|
|
1684
|
+
applicantId String @map("applicant_id")
|
|
1685
|
+
applicantName String @default("") @map("applicant_name")
|
|
1686
|
+
directorShareholderLid String? @map("director_shareholder_lid")
|
|
1687
|
+
shareholding Int? @map("shareholding")
|
|
1688
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1689
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1690
|
+
|
|
1691
|
+
// Relations
|
|
1692
|
+
company Company @relation(fields: [companyId], references: [id])
|
|
1693
|
+
applicant Applicant @relation(fields: [applicantId], references: [id])
|
|
1694
|
+
directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
|
|
1695
|
+
|
|
1696
|
+
@@map("applicant_shareholdings")
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
// From prisma/applications/product-features.prisma
|
|
1700
|
+
model ProductFeatures {
|
|
1701
|
+
id String @id @default(uuid())
|
|
1702
|
+
name String @map("name")
|
|
1703
|
+
clientAdvance String @map("client_advance")
|
|
1704
|
+
ltv String @map("ltv")
|
|
1705
|
+
repayment String @map("repayment")
|
|
1706
|
+
variableRepayment String @map("variable_repayment")
|
|
1707
|
+
reversionRateWithoutBaseRate String? @map("reversion_rate_without_base_rate")
|
|
1708
|
+
totalReversionRate String? @map("total_reversion_rate")
|
|
1709
|
+
initialRate String @map("initial_rate")
|
|
1710
|
+
fixedTerm String @map("fixed_term")
|
|
1711
|
+
fixedTermEndDate String? @map("fixed_term_end_date")
|
|
1712
|
+
baseRate String? @map("base_rate")
|
|
1713
|
+
productRate String? @map("product_rate")
|
|
1714
|
+
apr String? @map("apr")
|
|
1715
|
+
rentalCoverage String? @map("rental_coverage")
|
|
1716
|
+
repaymentType String? @map("repayment_type")
|
|
1717
|
+
applicationCategory String? @map("application_category")
|
|
1718
|
+
securityType String? @map("security_type")
|
|
1719
|
+
erc String? @map("erc")
|
|
1720
|
+
loanType String? @map("loan_type")
|
|
1721
|
+
maxLtvLimit String? @map("max_ltv_limit")
|
|
1722
|
+
reimbursement String? @map("reimbursement")
|
|
1723
|
+
reimbursementPerPound String? @map("reimbursement_per_pound")
|
|
1724
|
+
stressedApr String? @map("stressed_apr")
|
|
1725
|
+
stressedRate String? @map("stressed_rate")
|
|
1726
|
+
stressedRepayment String? @map("stressed_repayment")
|
|
1727
|
+
liborFloorRate String? @map("libor_floor_rate")
|
|
1728
|
+
totalTermInMonths String? @map("total_term_in_months")
|
|
1729
|
+
chargeType String @default("") @map("charge_type")
|
|
1730
|
+
productCategory String @default("") @map("product_category")
|
|
1731
|
+
ercCode String @default("") @map("erc_code")
|
|
1732
|
+
variableTerm String? @map("variable_term")
|
|
1733
|
+
totalFeePayable String? @map("total_fee_payable")
|
|
1734
|
+
dipIssueDate String? @map("dip_issue_date")
|
|
1735
|
+
estimatedCompletionDate String? @map("estimated_completion_date")
|
|
1736
|
+
dipExpiryDate String? @map("dip_expiry_date")
|
|
1737
|
+
fixedRepaymentUntillDate String? @map("fixed_repayment_untill_date")
|
|
1738
|
+
rentalReviewDate String? @map("rental_review_date")
|
|
1739
|
+
totalReimbursementWithFee String? @map("total_reimbursement_with_fee")
|
|
1740
|
+
finalRentPayment String? @map("final_rent_payment")
|
|
1741
|
+
clientDeposit String? @map("client_deposit")
|
|
1742
|
+
firstRentPayment String? @map("first_rent_payment")
|
|
1743
|
+
ercFeatures Json? @map("erc_features")
|
|
1744
|
+
icr String? @map("icr")
|
|
1745
|
+
ufssProductCode String? @map("ufss_product_code")
|
|
1746
|
+
ufssInterestRateCode String? @map("ufss_interest_rate_code")
|
|
1747
|
+
stressedPayment String? @map("stressed_payment")
|
|
1748
|
+
stressedPaymentRate String? @map("stressed_payment_rate")
|
|
1749
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1750
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1751
|
+
|
|
1752
|
+
@@map("product_features")
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
// From prisma/applications/solicitor.prisma
|
|
1756
|
+
model Solicitor {
|
|
1757
|
+
id String @id @default(uuid())
|
|
1758
|
+
applicationId String @unique @map("application_id")
|
|
1759
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1760
|
+
accountNumber Int? @map("account_number")
|
|
1761
|
+
addressCity String? @map("address_city")
|
|
1762
|
+
addressCountryLid String? @map("address_country_lid")
|
|
1763
|
+
addressLine1 String? @map("address_line1")
|
|
1764
|
+
addressLine2 String? @map("address_line2")
|
|
1765
|
+
addressLine3 String? @map("address_line3")
|
|
1766
|
+
addressPostCode String? @map("address_post_code")
|
|
1767
|
+
bankAddressLine1 String? @map("bank_address_line1")
|
|
1768
|
+
bankAddressLine2 String? @map("bank_address_line2")
|
|
1769
|
+
bankBranch String? @map("bank_branch")
|
|
1770
|
+
bankCity String? @map("bank_city")
|
|
1771
|
+
contactPostcode String? @map("contact_postcode")
|
|
1772
|
+
email String? @map("email")
|
|
1773
|
+
institution String? @map("institution")
|
|
1774
|
+
nameOfAccountHolder String? @map("name_of_account_holder")
|
|
1775
|
+
nameOfFirm String? @map("name_of_firm")
|
|
1776
|
+
signatory String? @map("signatory")
|
|
1777
|
+
solicitorActing String? @map("solicitor_acting")
|
|
1778
|
+
sortCode String? @map("sort_code")
|
|
1779
|
+
telephone String? @map("telephone")
|
|
1780
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1781
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1782
|
+
|
|
1783
|
+
// Relations
|
|
1784
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1785
|
+
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1786
|
+
|
|
1787
|
+
@@map("solicitors")
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
// From prisma/properties/property.prisma
|
|
1791
|
+
model Property {
|
|
1792
|
+
id String @id @default(uuid())
|
|
1793
|
+
applicationId String @map("application_id")
|
|
1794
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1795
|
+
propertyId String @unique @map("property_id")
|
|
1796
|
+
addressLine1 String @map("address_line1")
|
|
1797
|
+
addressLine2 String? @map("address_line2")
|
|
1798
|
+
addressLine3 String? @map("address_line3")
|
|
1799
|
+
associatedLoanPartiesIds String[] @map("associated_loan_parties_ids")
|
|
1800
|
+
city String? @map("city")
|
|
1801
|
+
countryLid String @map("country_lid")
|
|
1802
|
+
lender String @map("lender")
|
|
1803
|
+
marketValue Decimal @default(0.00) @map("market_value")
|
|
1804
|
+
monthlyRent Decimal @default(0.00) @map("monthly_rent")
|
|
1805
|
+
monthlyRepayment Decimal @default(0.00) @map("monthly_repayment")
|
|
1806
|
+
originalLoanBalance Decimal @default(0.00) @map("original_loan_balance")
|
|
1807
|
+
outstandingBalance Decimal @default(0.00) @map("outstanding_balance")
|
|
1808
|
+
otherOwnershipParties String? @map("other_ownership_parties")
|
|
1809
|
+
postCode String @map("post_code")
|
|
1810
|
+
remainingTerm Int @map("remaining_term")
|
|
1811
|
+
portfolioFile String? @map("portfolio_file")
|
|
1812
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1813
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1814
|
+
|
|
1815
|
+
// Relations
|
|
1816
|
+
application Application @relation("ApplicationProperties", fields: [applicationId], references: [id])
|
|
1817
|
+
country Lookup @relation("PropertyCountry", fields: [countryLid], references: [id])
|
|
1818
|
+
|
|
1819
|
+
@@map("properties")
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
// From prisma/properties/security.prisma
|
|
1823
|
+
model Security {
|
|
1824
|
+
id String @id @default(uuid())
|
|
1825
|
+
applicationId String @unique @map("application_id")
|
|
1826
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1827
|
+
haveAnyBuyToLetProperties Boolean @default(false) @map("have_any_buy_to_let_properties")
|
|
1828
|
+
isPropertyInEnglandOrWales Boolean @default(false) @map("is_property_in_england_or_wales")
|
|
1829
|
+
noOfBuyToLetProperties Int @default(0) @map("no_of_buy_to_let_properties")
|
|
1830
|
+
totalMonthlyRentalIncome Decimal @default(0.00) @map("total_monthly_rental_income")
|
|
1831
|
+
totalMonthlyRepayment Decimal @default(0.00) @map("total_monthly_repayment")
|
|
1832
|
+
totalOutstandingBalance Decimal @default(0.00) @map("total_outstanding_balance")
|
|
1833
|
+
areAllBedRoomsOver10sqm Boolean @default(false) @map("are_all_bed_rooms_over_10sqm")
|
|
1834
|
+
isBrickTileConstruction Boolean @default(false) @map("is_brick_tile_construction")
|
|
1835
|
+
constructionDetails String @default("") @map("construction_details")
|
|
1836
|
+
isExLAExclusion Boolean @default(false) @map("is_ex_la_exclusion")
|
|
1837
|
+
isFlatLift Boolean @default(false) @map("is_flat_lift")
|
|
1838
|
+
flatNumberOfBedrooms Int @default(0) @map("flat_number_of_bedrooms")
|
|
1839
|
+
isGreenEPC Boolean @default(false) @map("is_green_epc")
|
|
1840
|
+
isGroundRent Decimal @default(0.00) @map("is_ground_rent")
|
|
1841
|
+
isHouseLicensed Boolean @default(false) @map("is_house_licensed")
|
|
1842
|
+
houseNumberOfFloors Int @default(0) @map("house_number_of_floors")
|
|
1843
|
+
houseNumberOfKitchens Int @default(0) @map("house_number_of_kitchens")
|
|
1844
|
+
houseNumberOfLivingRooms Int @default(0) @map("house_number_of_living_rooms")
|
|
1845
|
+
houseNumberOfBathrooms Int @default(0) @map("house_number_of_bathrooms")
|
|
1846
|
+
houseNumberOfTenancies Int @default(0) @map("house_number_of_tenancies")
|
|
1847
|
+
hasHousePlanningPermission Boolean @default(false) @map("has_house_planning_permission")
|
|
1848
|
+
isGarage Boolean @default(false) @map("is_garage")
|
|
1849
|
+
isNewBuild Boolean @default(false) @map("is_new_build")
|
|
1850
|
+
propertyAddressCity String @default("") @map("property_address_city")
|
|
1851
|
+
propertyAddressCountryLid String @map("property_address_country_lid")
|
|
1852
|
+
propertyAddressLine1 String @default("") @map("property_address_line1")
|
|
1853
|
+
propertyAddressLine2 String @default("") @map("property_address_line2")
|
|
1854
|
+
propertyAddressLine3 String @default("") @map("property_address_line3")
|
|
1855
|
+
propertyAddressPostCode String @default("") @map("property_address_post_code")
|
|
1856
|
+
propertyTenureLid String @map("property_tenure_lid")
|
|
1857
|
+
propertyTypeLid String? @map("property_type_lid")
|
|
1858
|
+
propertyYearBuilt Int @default(0) @map("property_year_built")
|
|
1859
|
+
receiptOfAnyDiscount Boolean @default(false) @map("receipt_of_any_discount")
|
|
1860
|
+
receiptOfDiscountDetails String @default("") @map("receipt_of_discount_details")
|
|
1861
|
+
sectorExperience String @default("") @map("sector_experience")
|
|
1862
|
+
serviceCharge Decimal @default(0.00) @map("service_charge")
|
|
1863
|
+
unexpiredRemainingLease Int @default(0) @map("unexpired_remaining_lease")
|
|
1864
|
+
yearLeaseExpires Int @default(0) @map("year_lease_expires")
|
|
1865
|
+
energyEfficiencyRating String? @map("energy_efficiency_rating")
|
|
1866
|
+
energyEfficiencyRatingValue String? @map("energy_efficiency_rating_value")
|
|
1867
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1868
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1869
|
+
|
|
1870
|
+
// Relations
|
|
1871
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1872
|
+
propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
|
|
1873
|
+
propertyTenure Lookup @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
|
|
1874
|
+
propertyType Lookup? @relation("PropertyType", fields: [propertyTypeLid], references: [id])
|
|
1875
|
+
dataStreet DataStreet?
|
|
1876
|
+
|
|
1877
|
+
@@map("securities")
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
model DataStreet {
|
|
1881
|
+
id String @id @default(uuid())
|
|
1882
|
+
floorArea String @default("") @map("floor_area")
|
|
1883
|
+
propertyType String @default("") @map("property_type")
|
|
1884
|
+
noOfBedrooms String @default("0") @map("no_of_bedrooms")
|
|
1885
|
+
noOfBathrooms String @default("0") @map("no_of_bathrooms")
|
|
1886
|
+
lats String? @map("lats")
|
|
1887
|
+
longs String? @map("longs")
|
|
1888
|
+
lmkKey String @default("") @map("lmk_key")
|
|
1889
|
+
matchConfidence String @default("0") @map("match_confidence")
|
|
1890
|
+
transactions Json @default("[]") @map("transactions")
|
|
1891
|
+
nearByListings Json @default("[]") @map("near_by_listings")
|
|
1892
|
+
nearByCompletedTransactions Json @default("[]") @map("near_by_completed_transactions")
|
|
1893
|
+
risk Json @default("{}") @map("risk")
|
|
1894
|
+
securityId String @unique @map("security_id")
|
|
1895
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1896
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1897
|
+
|
|
1898
|
+
// Relations
|
|
1899
|
+
security Security @relation(fields: [securityId], references: [id])
|
|
1900
|
+
|
|
1901
|
+
@@map("data_streets")
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
// From prisma/underwriter/underwriter.prisma
|
|
1905
|
+
model Underwriter {
|
|
1906
|
+
id String @id @default(uuid())
|
|
1907
|
+
applicationId String @map("application_id")
|
|
1908
|
+
status String
|
|
1909
|
+
decision String?
|
|
1910
|
+
decisionDate DateTime? @map("decision_date")
|
|
1911
|
+
decisionNotes String? @map("decision_notes")
|
|
1912
|
+
riskRating String? @map("risk_rating")
|
|
1913
|
+
riskNotes String? @map("risk_notes")
|
|
1914
|
+
underwriterId String @map("underwriter_id")
|
|
1915
|
+
assignedDate DateTime @map("assigned_date")
|
|
1916
|
+
completedDate DateTime? @map("completed_date")
|
|
1917
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1918
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1919
|
+
|
|
1920
|
+
// Relations
|
|
1921
|
+
application Application @relation(fields: [applicationId], references: [id])
|
|
1922
|
+
underwriter User @relation(fields: [underwriterId], references: [id])
|
|
1923
|
+
|
|
1924
|
+
@@map("underwriters")
|
|
1925
|
+
}
|