@dynamatix/gb-schemas 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/applicants/applicant-additional-income.model.d.ts +1120 -0
- package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-additional-income.model.js +33 -0
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +3 -3
- package/dist/applicants/applicant-commitment-creditCard.model.js +1 -1
- package/dist/applicants/applicant-commitment-loan.model.d.ts +3 -3
- package/dist/applicants/applicant-commitment-loan.model.js +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +3 -3
- package/dist/applicants/applicant-commitment-mortgage.model.js +1 -1
- package/dist/applicants/applicant-employment-income.model.d.ts +6 -6
- package/dist/applicants/applicant-employment-income.model.js +1 -1
- package/dist/applicants/applicant-income.model.d.ts +48 -0
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-pension-income.model.d.ts +483 -0
- package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -0
- package/dist/applicants/applicant-pension-income.model.js +14 -0
- package/dist/applicants/applicant-property-income.model.d.ts +871 -13
- package/dist/applicants/applicant-property-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-property-income.model.js +7 -5
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts +489 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -0
- package/dist/applicants/applicant-uk-tax-credits.model.js +11 -0
- package/dist/applicants/applicant.model.d.ts +94 -6360
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- package/dist/applicants/index.d.ts +4 -0
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applications/application-productfeatures.model.d.ts +765 -0
- package/dist/applications/application-productfeatures.model.d.ts.map +1 -0
- package/dist/applications/application-productfeatures.model.js +96 -0
- package/dist/applications/application.model.d.ts +0 -726
- package/dist/applications/application.model.d.ts.map +1 -1
- package/dist/applications/index.d.ts +1 -1
- package/dist/applications/index.d.ts.map +1 -1
- package/dist/entities/applicants/applicant-credit-data.entity.d.ts +19 -0
- package/dist/entities/applicants/applicant-credit-data.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-credit-data.entity.js +5 -0
- package/dist/entities/applicants/applicant-credit-profile.entity.d.ts +14 -0
- package/dist/entities/applicants/applicant-credit-profile.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-credit-profile.entity.js +5 -0
- package/dist/entities/applicants/applicant-employment.entity.d.ts +53 -0
- package/dist/entities/applicants/applicant-employment.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-employment.entity.js +2 -0
- package/dist/entities/applicants/applicant-expenditure.entity.d.ts +13 -0
- package/dist/entities/applicants/applicant-expenditure.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-expenditure.entity.js +2 -0
- package/dist/entities/applicants/applicant-income-source.entity.d.ts +17 -0
- package/dist/entities/applicants/applicant-income-source.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-income-source.entity.js +5 -0
- package/dist/entities/applicants/applicant-income.entity.d.ts +59 -0
- package/dist/entities/applicants/applicant-income.entity.d.ts.map +1 -0
- package/dist/entities/applicants/applicant-income.entity.js +2 -0
- package/dist/entities/applicants/applicant.entity.d.ts +12 -14
- package/dist/entities/applicants/applicant.entity.d.ts.map +1 -1
- package/dist/entities/applicants/index.d.ts +14 -16
- package/dist/entities/applicants/index.d.ts.map +1 -1
- package/dist/entities/applicants/index.js +12 -14
- package/dist/entities/applications/application-credit-profile.entity.d.ts +11 -0
- package/dist/entities/applications/application-credit-profile.entity.d.ts.map +1 -0
- package/dist/entities/applications/application-credit-profile.entity.js +5 -0
- package/dist/entities/applications/index.d.ts +1 -1
- package/dist/entities/applications/index.d.ts.map +1 -1
- package/dist/entities/applications/index.js +1 -1
- package/dist/entities/shared/apprivo-sync-journey.entity.d.ts +7 -4
- package/dist/entities/shared/apprivo-sync-journey.entity.d.ts.map +1 -1
- package/dist/entities/shared/job-run.entity.d.ts +8 -4
- package/dist/entities/shared/job-run.entity.d.ts.map +1 -1
- package/dist/entities/shared/job-run.model.d.ts +11 -0
- package/dist/entities/shared/job-run.model.d.ts.map +1 -0
- package/dist/entities/shared/job-run.model.js +1 -0
- package/dist/entities/shared/job-setting.entity.d.ts +1 -1
- package/dist/entities/shared/job-setting.entity.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/entities/applicants/index.ts +38 -42
- package/entities/applications/application.entity.ts +5 -1
- package/package.json +1 -1
- package/prisma/applicants/applicant.prisma +1 -1
- package/prisma/applications/application-company.prisma +6 -6
- package/prisma/applications/application-document.prisma +23 -23
- package/prisma/applications/application.prisma +80 -88
- package/prisma/applications/broker.prisma +1 -1
- package/prisma/applications/company.prisma +62 -62
- package/prisma/applications/solicitor.prisma +1 -1
- package/prisma/product-catalogues/product.prisma +1 -1
- package/prisma/properties/security.prisma +1 -1
- package/prisma/schema.prisma +173 -180
- package/prisma/shared/lookup.prisma +1 -0
package/prisma/schema.prisma
CHANGED
|
@@ -138,6 +138,7 @@ model Lookup {
|
|
|
138
138
|
purchaseType_applications Application[] @relation("PurchaseType")
|
|
139
139
|
status_applications Application[] @relation("Status")
|
|
140
140
|
repaymentType_applications Application[] @relation("RepaymentType")
|
|
141
|
+
sourceOfWealth_applications Application[] @relation("SourceOfWealth")
|
|
141
142
|
|
|
142
143
|
// ApplicationDocument Relations
|
|
143
144
|
documentType_documents ApplicationDocument[] @relation("DocumentType")
|
|
@@ -473,7 +474,7 @@ model Product {
|
|
|
473
474
|
description String?
|
|
474
475
|
createdAt DateTime @default(now()) @map("created_at")
|
|
475
476
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
476
|
-
applications Application[]
|
|
477
|
+
applications Application[] @relation("ApplicationProduct")
|
|
477
478
|
|
|
478
479
|
@@map("products")
|
|
479
480
|
}
|
|
@@ -858,7 +859,7 @@ model Applicant {
|
|
|
858
859
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
859
860
|
|
|
860
861
|
// Relations
|
|
861
|
-
application Application @relation(fields: [applicationId], references: [id])
|
|
862
|
+
application Application @relation("ApplicationApplicants", fields: [applicationId], references: [id])
|
|
862
863
|
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
863
864
|
correspondenceAddressCountry Lookup? @relation("CorrespondenceAddressCountry", fields: [correspondenceAddressCountryLid], references: [id])
|
|
864
865
|
countryOfResidence Lookup @relation("CountryOfResidence", fields: [countryOfResidenceLid], references: [id])
|
|
@@ -1092,15 +1093,15 @@ model ApplicationAudit {
|
|
|
1092
1093
|
|
|
1093
1094
|
// From prisma/applications/application-company.prisma
|
|
1094
1095
|
model ApplicationCompany {
|
|
1095
|
-
id
|
|
1096
|
-
applicationId
|
|
1096
|
+
id String @id @default(uuid())
|
|
1097
|
+
applicationId String @unique @map("application_id")
|
|
1097
1098
|
name String
|
|
1098
1099
|
registrationNumber String? @map("registration_number")
|
|
1099
|
-
createdAt
|
|
1100
|
-
updatedAt
|
|
1100
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1101
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1101
1102
|
|
|
1102
1103
|
// Relations
|
|
1103
|
-
application
|
|
1104
|
+
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
1104
1105
|
|
|
1105
1106
|
@@map("application_companies")
|
|
1106
1107
|
}
|
|
@@ -1139,30 +1140,30 @@ model ApplicationDirectDebit {
|
|
|
1139
1140
|
|
|
1140
1141
|
// From prisma/applications/application-document.prisma
|
|
1141
1142
|
model ApplicationDocument {
|
|
1142
|
-
id
|
|
1143
|
-
applicationId
|
|
1144
|
-
documentId
|
|
1145
|
-
owningEntityId
|
|
1146
|
-
documentTypeLid
|
|
1147
|
-
documentTypeId
|
|
1148
|
-
fileName
|
|
1149
|
-
contentType
|
|
1150
|
-
created
|
|
1151
|
-
createdBy
|
|
1152
|
-
isGenerated
|
|
1153
|
-
data
|
|
1154
|
-
envelopeId
|
|
1155
|
-
signers
|
|
1156
|
-
documentTypeDisplayName String?
|
|
1157
|
-
documentTypeValue
|
|
1158
|
-
documentTypeData
|
|
1159
|
-
documentUrl
|
|
1160
|
-
createdAt
|
|
1161
|
-
updatedAt
|
|
1143
|
+
id String @id @default(uuid())
|
|
1144
|
+
applicationId String? @map("application_id")
|
|
1145
|
+
documentId String @map("document_id")
|
|
1146
|
+
owningEntityId String? @map("owning_entity_id")
|
|
1147
|
+
documentTypeLid String? @map("document_type_lid")
|
|
1148
|
+
documentTypeId String? @map("document_type_id")
|
|
1149
|
+
fileName String? @map("file_name")
|
|
1150
|
+
contentType String? @map("content_type")
|
|
1151
|
+
created String? @map("created")
|
|
1152
|
+
createdBy String? @map("created_by")
|
|
1153
|
+
isGenerated String? @map("is_generated")
|
|
1154
|
+
data String? @map("data")
|
|
1155
|
+
envelopeId String? @map("envelope_id")
|
|
1156
|
+
signers Json @default("[]") @map("signers")
|
|
1157
|
+
documentTypeDisplayName String? @map("document_type_display_name")
|
|
1158
|
+
documentTypeValue String? @map("document_type_value")
|
|
1159
|
+
documentTypeData Json? @map("document_type_data")
|
|
1160
|
+
documentUrl String? @map("document_url")
|
|
1161
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1162
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1162
1163
|
|
|
1163
1164
|
// Relations
|
|
1164
|
-
application
|
|
1165
|
-
documentType
|
|
1165
|
+
application Application? @relation(fields: [applicationId], references: [id])
|
|
1166
|
+
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
1166
1167
|
|
|
1167
1168
|
@@map("application_documents")
|
|
1168
1169
|
}
|
|
@@ -1399,103 +1400,95 @@ model ApplicationRationale {
|
|
|
1399
1400
|
|
|
1400
1401
|
// From prisma/applications/application.prisma
|
|
1401
1402
|
model Application {
|
|
1402
|
-
id
|
|
1403
|
-
queueId
|
|
1404
|
-
assignedToUserId
|
|
1405
|
-
applicationId
|
|
1406
|
-
isApplicationFeePaid
|
|
1407
|
-
applicationNumber
|
|
1408
|
-
applicationTypeLid
|
|
1409
|
-
bankSolicitor
|
|
1410
|
-
brokerId
|
|
1411
|
-
caseManager
|
|
1412
|
-
caseManagerAccepted
|
|
1413
|
-
completedReason
|
|
1414
|
-
isIntendToOccupy
|
|
1415
|
-
introducer
|
|
1416
|
-
isIntroducerSubmission
|
|
1417
|
-
isBrokerAssigned
|
|
1418
|
-
isFinanceRecommendedToApplicant
|
|
1419
|
-
isWorkflowTaskCreated
|
|
1420
|
-
lastUpdated
|
|
1421
|
-
lendingTypeLid
|
|
1422
|
-
networkClubName
|
|
1423
|
-
isNetworkClubSubmission
|
|
1424
|
-
newReason
|
|
1425
|
-
purchaseTypeLid
|
|
1426
|
-
rejectedReason
|
|
1427
|
-
repaymentTypeLid
|
|
1428
|
-
selectedProduct
|
|
1429
|
-
sourceOfWealthLids
|
|
1430
|
-
sowBusiness
|
|
1431
|
-
sowInheritance
|
|
1432
|
-
sowOther
|
|
1433
|
-
sowProperty
|
|
1434
|
-
sowSalary
|
|
1435
|
-
statusLid
|
|
1436
|
-
submitReason
|
|
1437
|
-
submittedDate
|
|
1438
|
-
underwriter
|
|
1439
|
-
isValuationFeePaid
|
|
1440
|
-
withdrawalReason
|
|
1441
|
-
withdrawalReasonCode
|
|
1442
|
-
productId
|
|
1443
|
-
securityId
|
|
1444
|
-
solicitorId
|
|
1445
|
-
isActive
|
|
1446
|
-
isUkResident
|
|
1447
|
-
riskRating
|
|
1448
|
-
directDebitId
|
|
1449
|
-
mortgageId
|
|
1450
|
-
companyId
|
|
1451
|
-
rationaleId
|
|
1452
|
-
newAuditRecordsCount
|
|
1453
|
-
currentApprivoAuditId
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1457
|
-
pageValidFlag Boolean @default(false)
|
|
1458
|
-
applicationStatusLid String @map("application_status_lid")
|
|
1459
|
-
applicationSubTypeLid String @map("application_sub_type_lid")
|
|
1460
|
-
applicationSubTypeOther String? @map("application_sub_type_other")
|
|
1461
|
-
applicationSubTypeOtherDetails String? @map("application_sub_type_other_details")
|
|
1462
|
-
applicationSubTypeOtherLid String? @map("application_sub_type_other_lid")
|
|
1463
|
-
applicationSubTypeOtherLidDetails String? @map("application_sub_type_other_lid_details")
|
|
1464
|
-
applicationSubTypeOtherLidOther String? @map("application_sub_type_other_lid_other")
|
|
1465
|
-
applicationSubTypeOtherLidOtherDetails String? @map("application_sub_type_other_lid_other_details")
|
|
1403
|
+
id String @id @default(uuid())
|
|
1404
|
+
queueId String[] @map("queue_id")
|
|
1405
|
+
assignedToUserId String? @map("assigned_to_user_id")
|
|
1406
|
+
applicationId String @unique @map("application_id")
|
|
1407
|
+
isApplicationFeePaid String @map("is_application_fee_paid")
|
|
1408
|
+
applicationNumber String @map("application_number")
|
|
1409
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1410
|
+
bankSolicitor String @default("") @map("bank_solicitor")
|
|
1411
|
+
brokerId String? @map("broker_id")
|
|
1412
|
+
caseManager String @default("") @map("case_manager")
|
|
1413
|
+
caseManagerAccepted String @default("false") @map("case_manager_accepted")
|
|
1414
|
+
completedReason String @default("") @map("completed_reason")
|
|
1415
|
+
isIntendToOccupy String @map("is_intend_to_occupy")
|
|
1416
|
+
introducer String @default("") @map("introducer")
|
|
1417
|
+
isIntroducerSubmission String @map("is_introducer_submission")
|
|
1418
|
+
isBrokerAssigned String @default("false") @map("is_broker_assigned")
|
|
1419
|
+
isFinanceRecommendedToApplicant String @map("is_finance_recommended_to_applicant")
|
|
1420
|
+
isWorkflowTaskCreated String @map("is_workflow_task_created")
|
|
1421
|
+
lastUpdated String? @map("last_updated")
|
|
1422
|
+
lendingTypeLid String @map("lending_type_lid")
|
|
1423
|
+
networkClubName String @default("") @map("network_club_name")
|
|
1424
|
+
isNetworkClubSubmission String @map("is_network_club_submission")
|
|
1425
|
+
newReason String @default("") @map("new_reason")
|
|
1426
|
+
purchaseTypeLid String @map("purchase_type_lid")
|
|
1427
|
+
rejectedReason String @default("") @map("rejected_reason")
|
|
1428
|
+
repaymentTypeLid String @map("repayment_type_lid")
|
|
1429
|
+
selectedProduct String? @map("selected_product")
|
|
1430
|
+
sourceOfWealthLids String[] @map("source_of_wealth_lids")
|
|
1431
|
+
sowBusiness String @default("") @map("sow_business")
|
|
1432
|
+
sowInheritance String @default("") @map("sow_inheritance")
|
|
1433
|
+
sowOther String @default("") @map("sow_other")
|
|
1434
|
+
sowProperty String @default("") @map("sow_property")
|
|
1435
|
+
sowSalary String @default("") @map("sow_salary")
|
|
1436
|
+
statusLid String @map("status_lid")
|
|
1437
|
+
submitReason String @default("") @map("submit_reason")
|
|
1438
|
+
submittedDate String? @map("submitted_date")
|
|
1439
|
+
underwriter String @default("") @map("underwriter")
|
|
1440
|
+
isValuationFeePaid String @map("is_valuation_fee_paid")
|
|
1441
|
+
withdrawalReason String @default("") @map("withdrawal_reason")
|
|
1442
|
+
withdrawalReasonCode String @default("") @map("withdrawal_reason_code")
|
|
1443
|
+
productId String? @map("product_id")
|
|
1444
|
+
securityId String? @map("security_id")
|
|
1445
|
+
solicitorId String? @map("solicitor_id")
|
|
1446
|
+
isActive String @default("false") @map("is_active")
|
|
1447
|
+
isUkResident String @default("true") @map("is_uk_resident")
|
|
1448
|
+
riskRating String? @map("risk_rating")
|
|
1449
|
+
directDebitId String? @map("direct_debit_id")
|
|
1450
|
+
mortgageId String? @map("mortgage_id")
|
|
1451
|
+
companyId String? @map("company_id")
|
|
1452
|
+
rationaleId String? @map("rationale_id")
|
|
1453
|
+
newAuditRecordsCount String @default("0") @map("new_audit_records_count")
|
|
1454
|
+
currentApprivoAuditId String? @map("current_apprivo_audit_id")
|
|
1455
|
+
applicantIds String[] @map("applicant_ids")
|
|
1456
|
+
propertyIds String[] @map("property_ids")
|
|
1466
1457
|
|
|
1467
1458
|
// Relations
|
|
1468
|
-
broker
|
|
1469
|
-
security
|
|
1470
|
-
solicitor
|
|
1471
|
-
product
|
|
1472
|
-
directDebit
|
|
1459
|
+
broker Broker? @relation("ApplicationBroker", fields: [brokerId], references: [id])
|
|
1460
|
+
security Security? @relation("ApplicationSecurity")
|
|
1461
|
+
solicitor Solicitor? @relation("ApplicationSolicitor")
|
|
1462
|
+
product Product? @relation("ApplicationProduct", fields: [productId], references: [id])
|
|
1463
|
+
directDebit ApplicationDirectDebit? @relation("ApplicationDirectDebit")
|
|
1473
1464
|
creditProfile ApplicationCreditProfile? @relation("ApplicationCreditProfile")
|
|
1474
|
-
mortgage
|
|
1475
|
-
company
|
|
1476
|
-
rationale
|
|
1477
|
-
applicants
|
|
1478
|
-
properties
|
|
1479
|
-
documents
|
|
1480
|
-
notes
|
|
1481
|
-
audits
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1465
|
+
mortgage ApplicationMortgage? @relation("ApplicationMortgage")
|
|
1466
|
+
company ApplicationCompany? @relation("ApplicationCompany")
|
|
1467
|
+
rationale ApplicationRationale? @relation("ApplicationRationale")
|
|
1468
|
+
applicants Applicant[] @relation("ApplicationApplicants")
|
|
1469
|
+
properties Property[] @relation("ApplicationProperties")
|
|
1470
|
+
documents ApplicationDocument[]
|
|
1471
|
+
notes ApplicationNote[]
|
|
1472
|
+
audits ApplicationAudit[]
|
|
1473
|
+
products ApplicationProduct[] @relation("ApplicationProducts")
|
|
1474
|
+
underwriters Underwriter[] @relation("ApplicationUnderwriters")
|
|
1475
|
+
companies Company[] @relation("Company")
|
|
1476
|
+
|
|
1487
1477
|
// Lookup relations
|
|
1488
|
-
applicationType
|
|
1489
|
-
lendingType
|
|
1490
|
-
purchaseType
|
|
1491
|
-
repaymentType
|
|
1478
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
1479
|
+
lendingType Lookup @relation("LendingType", fields: [lendingTypeLid], references: [id])
|
|
1480
|
+
purchaseType Lookup @relation("PurchaseType", fields: [purchaseTypeLid], references: [id])
|
|
1481
|
+
repaymentType Lookup @relation("RepaymentType", fields: [repaymentTypeLid], references: [id])
|
|
1482
|
+
status Lookup @relation("Status", fields: [statusLid], references: [id])
|
|
1483
|
+
sourceOfWealth Lookup[] @relation("SourceOfWealth")
|
|
1492
1484
|
|
|
1493
|
-
@@map("applications")
|
|
1494
1485
|
@@index([applicationTypeLid])
|
|
1495
1486
|
@@index([lendingTypeLid])
|
|
1496
1487
|
@@index([purchaseTypeLid])
|
|
1497
1488
|
@@index([statusLid])
|
|
1498
1489
|
@@index([repaymentTypeLid])
|
|
1490
|
+
@@index([sourceOfWealthLids])
|
|
1491
|
+
@@map("applications")
|
|
1499
1492
|
}
|
|
1500
1493
|
|
|
1501
1494
|
// From prisma/applications/broker.prisma
|
|
@@ -1521,7 +1514,7 @@ model Broker {
|
|
|
1521
1514
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1522
1515
|
|
|
1523
1516
|
// Relations
|
|
1524
|
-
applications Application[] @relation("
|
|
1517
|
+
applications Application[] @relation("ApplicationBroker")
|
|
1525
1518
|
|
|
1526
1519
|
|
|
1527
1520
|
@@map("brokers")
|
|
@@ -1578,78 +1571,78 @@ model ChecklistItem {
|
|
|
1578
1571
|
|
|
1579
1572
|
// From prisma/applications/company.prisma
|
|
1580
1573
|
model Company {
|
|
1581
|
-
id
|
|
1582
|
-
applicationId
|
|
1583
|
-
pageValidFlag
|
|
1584
|
-
registeredName
|
|
1585
|
-
businessTypeLid
|
|
1586
|
-
registeredNumber
|
|
1587
|
-
taxJurisdictionLid
|
|
1588
|
-
tradingSince
|
|
1589
|
-
natureOfBusiness
|
|
1590
|
-
yearEnd
|
|
1591
|
-
addressPostCode
|
|
1592
|
-
addressLine1
|
|
1593
|
-
addressLine2
|
|
1594
|
-
addressLine3
|
|
1595
|
-
addressCity
|
|
1596
|
-
addressCountryLid
|
|
1597
|
-
applicationTypeLid
|
|
1598
|
-
yearEnd1
|
|
1599
|
-
turnoverYear1
|
|
1600
|
-
netProfitYear1
|
|
1601
|
-
yearEnd2
|
|
1602
|
-
turnoverYear2
|
|
1603
|
-
netProfitYear2
|
|
1604
|
-
yearEnd3
|
|
1605
|
-
turnoverYear3
|
|
1606
|
-
netProfitYear3
|
|
1607
|
-
companyCreditDefaults
|
|
1608
|
-
companyCountyCourtJudgment
|
|
1609
|
-
companySecuredArrears
|
|
1610
|
-
companyUnsecuredArrears
|
|
1611
|
-
companyBankruptcy
|
|
1612
|
-
companyBankruptcyYes
|
|
1613
|
-
companyBankruptcyNo
|
|
1614
|
-
companyCCJInLastThreeYearYes
|
|
1615
|
-
companyCCJInLastThreeYearNo
|
|
1616
|
-
companyDefaultsInLastYearYes
|
|
1617
|
-
companyDefaultsInLastYearNo
|
|
1618
|
-
companyAnyVoluntaryEnforcedPossessionYes Boolean
|
|
1619
|
-
companyAnyVoluntaryEnforcedPossessionNo Boolean
|
|
1620
|
-
doYouKnowRegisteredNumber
|
|
1621
|
-
sicCodes
|
|
1622
|
-
epc
|
|
1623
|
-
remainingLease
|
|
1624
|
-
dateOfIncorporation
|
|
1625
|
-
createdAt
|
|
1626
|
-
updatedAt
|
|
1574
|
+
id String @id @default(uuid())
|
|
1575
|
+
applicationId String @map("application_id")
|
|
1576
|
+
pageValidFlag Boolean @default(true) @map("page_valid_flag")
|
|
1577
|
+
registeredName String @map("registered_name")
|
|
1578
|
+
businessTypeLid String @map("business_type_lid")
|
|
1579
|
+
registeredNumber Int @map("registered_number")
|
|
1580
|
+
taxJurisdictionLid String @map("tax_jurisdiction_lid")
|
|
1581
|
+
tradingSince String? @map("trading_since")
|
|
1582
|
+
natureOfBusiness String @default("") @map("nature_of_business")
|
|
1583
|
+
yearEnd String? @map("year_end")
|
|
1584
|
+
addressPostCode String @default("") @map("address_post_code")
|
|
1585
|
+
addressLine1 String @map("address_line1")
|
|
1586
|
+
addressLine2 String? @map("address_line2")
|
|
1587
|
+
addressLine3 String? @map("address_line3")
|
|
1588
|
+
addressCity String? @map("address_city")
|
|
1589
|
+
addressCountryLid String @map("address_country_lid")
|
|
1590
|
+
applicationTypeLid String @map("application_type_lid")
|
|
1591
|
+
yearEnd1 Int @map("year_end1")
|
|
1592
|
+
turnoverYear1 Decimal @default(0.00) @map("turnover_year1")
|
|
1593
|
+
netProfitYear1 Decimal @default(0.00) @map("net_profit_year1")
|
|
1594
|
+
yearEnd2 Int @map("year_end2")
|
|
1595
|
+
turnoverYear2 Decimal @default(0.00) @map("turnover_year2")
|
|
1596
|
+
netProfitYear2 Decimal @default(0.00) @map("net_profit_year2")
|
|
1597
|
+
yearEnd3 Int @map("year_end3")
|
|
1598
|
+
turnoverYear3 Decimal @default(0.00) @map("turnover_year3")
|
|
1599
|
+
netProfitYear3 Decimal @default(0.00) @map("net_profit_year3")
|
|
1600
|
+
companyCreditDefaults String @default("") @map("company_credit_defaults")
|
|
1601
|
+
companyCountyCourtJudgment String @default("") @map("company_county_court_judgment")
|
|
1602
|
+
companySecuredArrears String @default("") @map("company_secured_arrears")
|
|
1603
|
+
companyUnsecuredArrears String @default("") @map("company_unsecured_arrears")
|
|
1604
|
+
companyBankruptcy String @default("") @map("company_bankruptcy")
|
|
1605
|
+
companyBankruptcyYes Boolean @default(false) @map("company_bankruptcy_yes")
|
|
1606
|
+
companyBankruptcyNo Boolean @default(true) @map("company_bankruptcy_no")
|
|
1607
|
+
companyCCJInLastThreeYearYes Boolean @default(false) @map("company_ccj_in_last_three_year_yes")
|
|
1608
|
+
companyCCJInLastThreeYearNo Boolean @default(true) @map("company_ccj_in_last_three_year_no")
|
|
1609
|
+
companyDefaultsInLastYearYes Boolean @default(false) @map("company_defaults_in_last_year_yes")
|
|
1610
|
+
companyDefaultsInLastYearNo Boolean @default(true) @map("company_defaults_in_last_year_no")
|
|
1611
|
+
companyAnyVoluntaryEnforcedPossessionYes Boolean @default(false) @map("company_any_voluntary_enforced_possession_yes")
|
|
1612
|
+
companyAnyVoluntaryEnforcedPossessionNo Boolean @default(true) @map("company_any_voluntary_enforced_possession_no")
|
|
1613
|
+
doYouKnowRegisteredNumber Boolean @default(true) @map("do_you_know_registered_number")
|
|
1614
|
+
sicCodes String[] @map("sic_codes")
|
|
1615
|
+
epc String @default("") @map("epc")
|
|
1616
|
+
remainingLease String @default("") @map("remaining_lease")
|
|
1617
|
+
dateOfIncorporation String? @map("date_of_incorporation")
|
|
1618
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1619
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1627
1620
|
|
|
1628
1621
|
// Relations
|
|
1629
|
-
application
|
|
1630
|
-
businessType
|
|
1631
|
-
taxJurisdiction
|
|
1632
|
-
addressCountry
|
|
1633
|
-
applicationType
|
|
1622
|
+
application Application @relation("Company", fields: [applicationId], references: [id])
|
|
1623
|
+
businessType Lookup @relation("BusinessType", fields: [businessTypeLid], references: [id])
|
|
1624
|
+
taxJurisdiction Lookup @relation("TaxJurisdiction", fields: [taxJurisdictionLid], references: [id])
|
|
1625
|
+
addressCountry Lookup @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1626
|
+
applicationType Lookup @relation("ApplicationType", fields: [applicationTypeLid], references: [id])
|
|
1634
1627
|
applicantShareholdings ApplicantShareholding[]
|
|
1635
1628
|
|
|
1636
1629
|
@@map("companies")
|
|
1637
1630
|
}
|
|
1638
1631
|
|
|
1639
1632
|
model ApplicantShareholding {
|
|
1640
|
-
id
|
|
1641
|
-
companyId
|
|
1642
|
-
applicantId
|
|
1643
|
-
applicantName
|
|
1633
|
+
id String @id @default(uuid())
|
|
1634
|
+
companyId String @map("company_id")
|
|
1635
|
+
applicantId String @map("applicant_id")
|
|
1636
|
+
applicantName String @default("") @map("applicant_name")
|
|
1644
1637
|
directorShareholderLid String? @map("director_shareholder_lid")
|
|
1645
|
-
shareholding
|
|
1646
|
-
createdAt
|
|
1647
|
-
updatedAt
|
|
1638
|
+
shareholding Int? @map("shareholding")
|
|
1639
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
1640
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1648
1641
|
|
|
1649
1642
|
// Relations
|
|
1650
|
-
company
|
|
1651
|
-
applicant
|
|
1652
|
-
directorShareholder
|
|
1643
|
+
company Company @relation(fields: [companyId], references: [id])
|
|
1644
|
+
applicant Applicant @relation("ApplicantShareholdings", fields: [applicantId], references: [id])
|
|
1645
|
+
directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
|
|
1653
1646
|
|
|
1654
1647
|
@@map("applicant_shareholdings")
|
|
1655
1648
|
}
|
|
@@ -1739,7 +1732,7 @@ model Solicitor {
|
|
|
1739
1732
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1740
1733
|
|
|
1741
1734
|
// Relations
|
|
1742
|
-
application Application @relation(fields: [applicationId], references: [id])
|
|
1735
|
+
application Application @relation("ApplicationSolicitor", fields: [applicationId], references: [id])
|
|
1743
1736
|
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1744
1737
|
|
|
1745
1738
|
@@map("solicitors")
|
|
@@ -1826,7 +1819,7 @@ model Security {
|
|
|
1826
1819
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1827
1820
|
|
|
1828
1821
|
// Relations
|
|
1829
|
-
application Application @relation(fields: [applicationId], references: [id])
|
|
1822
|
+
application Application @relation("ApplicationSecurity", fields: [applicationId], references: [id])
|
|
1830
1823
|
propertyAddressCountry Lookup @relation("PropertyAddressCountry", fields: [propertyAddressCountryLid], references: [id])
|
|
1831
1824
|
propertyTenure Lookup @relation("PropertyTenure", fields: [propertyTenureLid], references: [id])
|
|
1832
1825
|
propertyType Lookup? @relation("PropertyType", fields: [propertyTypeLid], references: [id])
|
|
@@ -17,6 +17,7 @@ model Lookup {
|
|
|
17
17
|
purchaseType_applications Application[] @relation("PurchaseType")
|
|
18
18
|
status_applications Application[] @relation("Status")
|
|
19
19
|
repaymentType_applications Application[] @relation("RepaymentType")
|
|
20
|
+
sourceOfWealth_applications Application[] @relation("SourceOfWealth")
|
|
20
21
|
|
|
21
22
|
// ApplicationDocument Relations
|
|
22
23
|
documentType_documents ApplicationDocument[] @relation("DocumentType")
|