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