@dynamatix/gb-schemas 2.0.36 → 2.0.37
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 +27 -927
- package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-additional-income.model.js +4 -23
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts +6 -6
- package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-creditCard.model.js +2 -1
- package/dist/applicants/applicant-commitment-loan.model.d.ts +6 -6
- package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-loan.model.js +9 -1
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts +30 -12
- package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
- package/dist/applicants/applicant-commitment-mortgage.model.js +8 -3
- package/dist/applicants/applicant-employment.model.d.ts +1234 -6
- package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
- package/dist/applicants/applicant-employment.model.js +4 -6
- package/dist/applicants/applicant-income-settings.model.d.ts +54 -0
- package/dist/applicants/applicant-income-settings.model.d.ts.map +1 -0
- package/dist/applicants/applicant-income-settings.model.js +11 -0
- package/dist/applicants/applicant-income.model.d.ts +2020 -42
- package/dist/applicants/applicant-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-income.model.js +11 -14
- package/dist/applicants/applicant-pension-income.model.d.ts +288 -0
- package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
- package/dist/applicants/applicant-pension-income.model.js +13 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts +288 -0
- package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
- package/dist/applicants/applicant-uk-tax-credits.model.js +2 -0
- package/dist/applicants/applicant.model.d.ts.map +1 -1
- package/dist/applicants/applicant.model.js +0 -6
- package/dist/applicants/index.d.ts +3 -3
- package/dist/applicants/index.d.ts.map +1 -1
- package/dist/applicants/index.js +3 -3
- package/dist/applications/application-mortgage.model.d.ts +3 -3
- package/dist/applications/application-mortgage.model.js +1 -1
- package/dist/entities/applicants/credit-card-commitment.entity.d.ts +10 -3
- package/dist/entities/applicants/credit-card-commitment.entity.d.ts.map +1 -1
- package/dist/entities/applicants/credit-card-commitment.entity.js +4 -0
- package/entities/applicants/credit-card-commitment.entity.ts +28 -17
- package/package.json +1 -1
- package/prisma/applicants/credit-card-commitment.prisma +16 -15
- package/prisma/migrations/20250512102019_update_mortgage_schema/migration.sql +2 -2
- package/prisma/migrations/20250513132704_update_credit_card_commitment_schema/migration.sql +22 -0
- package/prisma/schema.prisma +201 -200
- package/prisma/shared/lookup.prisma +1 -1
- package/dist/applicants/applicant-commitment-residence.model.d.ts +0 -728
- 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 -368
- 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 -362
- 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-income-source.model.d.ts +0 -26
- package/dist/applicants/applicant-income-source.model.d.ts.map +0 -1
- package/dist/applicants/applicant-income-source.model.js +0 -9
package/prisma/schema.prisma
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
// This is your Prisma schema file,
|
|
2
|
-
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
-
|
|
4
|
-
generator client {
|
|
5
|
-
provider = "prisma-client-js"
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
datasource db {
|
|
9
|
-
provider = "postgresql"
|
|
10
|
-
url = env("DATABASE_URL")
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
// From prisma/shared/alert.prisma
|
|
1
|
+
// This is your Prisma schema file,
|
|
2
|
+
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
|
3
|
+
|
|
4
|
+
generator client {
|
|
5
|
+
provider = "prisma-client-js"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
datasource db {
|
|
9
|
+
provider = "postgresql"
|
|
10
|
+
url = env("DATABASE_URL")
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// From prisma/shared/alert.prisma
|
|
17
17
|
model Alert {
|
|
18
18
|
id String @id @default(uuid())
|
|
19
19
|
title String
|
|
@@ -28,9 +28,9 @@ model Alert {
|
|
|
28
28
|
user User @relation("UserAlerts", fields: [userId], references: [id])
|
|
29
29
|
|
|
30
30
|
@@map("alerts")
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// From prisma/shared/apprivo-sync-journey.prisma
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// From prisma/shared/apprivo-sync-journey.prisma
|
|
34
34
|
model ApprivoSyncJourney {
|
|
35
35
|
id String @id @default(uuid())
|
|
36
36
|
applicationId String @map("application_id")
|
|
@@ -49,9 +49,9 @@ model ApprivoSyncJourney {
|
|
|
49
49
|
jobRun JobRun? @relation("Milestones", fields: [jobRunId], references: [id])
|
|
50
50
|
|
|
51
51
|
@@map("apprivo_sync_journeys")
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// From prisma/shared/checklist.prisma
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// From prisma/shared/checklist.prisma
|
|
55
55
|
model Checklist {
|
|
56
56
|
id String @id @default(uuid())
|
|
57
57
|
name String
|
|
@@ -61,9 +61,9 @@ model Checklist {
|
|
|
61
61
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
62
62
|
|
|
63
63
|
@@map("checklists")
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// From prisma/shared/document-type.prisma
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// From prisma/shared/document-type.prisma
|
|
67
67
|
model DocumentType {
|
|
68
68
|
id String @id @default(uuid())
|
|
69
69
|
name String
|
|
@@ -72,9 +72,9 @@ model DocumentType {
|
|
|
72
72
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
73
73
|
|
|
74
74
|
@@map("document_types")
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// From prisma/shared/job-run.prisma
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// From prisma/shared/job-run.prisma
|
|
78
78
|
model JobRun {
|
|
79
79
|
id String @id @default(uuid())
|
|
80
80
|
jobName String @map("job_name")
|
|
@@ -89,9 +89,9 @@ model JobRun {
|
|
|
89
89
|
apprivoSyncJourneys ApprivoSyncJourney[] @relation("Milestones")
|
|
90
90
|
|
|
91
91
|
@@map("job_runs")
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
// From prisma/shared/job-setting.prisma
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// From prisma/shared/job-setting.prisma
|
|
95
95
|
model JobSetting {
|
|
96
96
|
id String @id @default(uuid())
|
|
97
97
|
name String @map("name")
|
|
@@ -102,9 +102,9 @@ model JobSetting {
|
|
|
102
102
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
103
103
|
|
|
104
104
|
@@map("job_settings")
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// From prisma/shared/lookup-group.prisma
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// From prisma/shared/lookup-group.prisma
|
|
108
108
|
model LookupGroup {
|
|
109
109
|
id String @id @default(uuid())
|
|
110
110
|
name String
|
|
@@ -116,9 +116,9 @@ model LookupGroup {
|
|
|
116
116
|
lookups Lookup[] @relation("LookupToGroup")
|
|
117
117
|
|
|
118
118
|
@@map("lookup_groups")
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// From prisma/shared/lookup.prisma
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// From prisma/shared/lookup.prisma
|
|
122
122
|
model Lookup {
|
|
123
123
|
id String @id @default(uuid())
|
|
124
124
|
groupId String @map("group_id")
|
|
@@ -246,7 +246,7 @@ model Lookup {
|
|
|
246
246
|
acceptableIncomeTypes_employments ApplicantEmployment[] @relation("AcceptableIncomeTypes")
|
|
247
247
|
|
|
248
248
|
// CreditCardCommitment Relations
|
|
249
|
-
commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
249
|
+
// commitmentType_creditCardCommitments CreditCardCommitment[] @relation("CommitmentType")
|
|
250
250
|
repaymentType_creditCardCommitments CreditCardCommitment[] @relation("CreditCardRepaymentType")
|
|
251
251
|
|
|
252
252
|
creditDataStatus ApplicantCreditData[] @relation("CreditDataStatus")
|
|
@@ -262,9 +262,9 @@ model Lookup {
|
|
|
262
262
|
|
|
263
263
|
@@unique([groupId, value])
|
|
264
264
|
@@map("lookups")
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
// From prisma/shared/system-parameter.prisma
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// From prisma/shared/system-parameter.prisma
|
|
268
268
|
model SystemParameter {
|
|
269
269
|
id String @id @default(uuid())
|
|
270
270
|
name String @unique
|
|
@@ -280,9 +280,9 @@ model SystemParameter {
|
|
|
280
280
|
updatedBy User? @relation("UpdatedByUser", fields: [updatedById], references: [id])
|
|
281
281
|
|
|
282
282
|
@@map("system_parameters")
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
// From prisma/users/auth-log.prisma
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// From prisma/users/auth-log.prisma
|
|
286
286
|
model AuthLog {
|
|
287
287
|
id String @id @default(uuid())
|
|
288
288
|
userEmail String @map("user_email")
|
|
@@ -293,9 +293,9 @@ model AuthLog {
|
|
|
293
293
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
294
294
|
|
|
295
295
|
@@map("auth_logs")
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
// From prisma/users/permission.prisma
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// From prisma/users/permission.prisma
|
|
299
299
|
model Permission {
|
|
300
300
|
id String @id @default(uuid())
|
|
301
301
|
name String
|
|
@@ -308,9 +308,9 @@ model Permission {
|
|
|
308
308
|
roles Role[]
|
|
309
309
|
|
|
310
310
|
@@map("permissions")
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
// From prisma/users/role-group.prisma
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// From prisma/users/role-group.prisma
|
|
314
314
|
model RoleGroup {
|
|
315
315
|
id String @id @default(uuid())
|
|
316
316
|
groupId String @unique @map("group_id")
|
|
@@ -324,9 +324,9 @@ model RoleGroup {
|
|
|
324
324
|
users User[] @relation("UserToRoleGroup")
|
|
325
325
|
|
|
326
326
|
@@map("role_groups")
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
// From prisma/users/role.prisma
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// From prisma/users/role.prisma
|
|
330
330
|
model Role {
|
|
331
331
|
id String @id @default(uuid())
|
|
332
332
|
roleId String @unique @map("role_id")
|
|
@@ -340,9 +340,9 @@ model Role {
|
|
|
340
340
|
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
341
341
|
|
|
342
342
|
@@map("roles")
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// From prisma/users/user.prisma
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
// From prisma/users/user.prisma
|
|
346
346
|
model User {
|
|
347
347
|
id String @id @default(uuid())
|
|
348
348
|
accountId String @unique @map("account_id")
|
|
@@ -386,9 +386,9 @@ model Claim {
|
|
|
386
386
|
user User @relation(fields: [userId], references: [id])
|
|
387
387
|
|
|
388
388
|
@@map("claims")
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
// From prisma/product-catalogues/product-catalogue.prisma
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// From prisma/product-catalogues/product-catalogue.prisma
|
|
392
392
|
model ProductCatalogue {
|
|
393
393
|
id String @id @default(uuid())
|
|
394
394
|
productCatalogueId String @map("product_catalogue_id")
|
|
@@ -410,9 +410,9 @@ model ProductCatalogue {
|
|
|
410
410
|
productVariants ProductVariant[]
|
|
411
411
|
|
|
412
412
|
@@map("product_catalogues")
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// From prisma/product-catalogues/product-definition.prisma
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// From prisma/product-catalogues/product-definition.prisma
|
|
416
416
|
model ProductDefinition {
|
|
417
417
|
id String @id @default(uuid())
|
|
418
418
|
productDefinitionId String @map("product_definition_id")
|
|
@@ -451,9 +451,9 @@ model Rule {
|
|
|
451
451
|
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
452
452
|
|
|
453
453
|
@@map("rules")
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
// From prisma/product-catalogues/product-variant.prisma
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
// From prisma/product-catalogues/product-variant.prisma
|
|
457
457
|
model ProductVariant {
|
|
458
458
|
id String @id @default(uuid())
|
|
459
459
|
productCatalogueId String @map("product_catalogue_id")
|
|
@@ -468,9 +468,9 @@ model ProductVariant {
|
|
|
468
468
|
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
469
469
|
|
|
470
470
|
@@map("product_variants")
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
// From prisma/product-catalogues/product.prisma
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// From prisma/product-catalogues/product.prisma
|
|
474
474
|
model Product {
|
|
475
475
|
id String @id @default(uuid())
|
|
476
476
|
name String
|
|
@@ -480,9 +480,9 @@ model Product {
|
|
|
480
480
|
applications Application[] @relation("ApplicationProduct")
|
|
481
481
|
|
|
482
482
|
@@map("products")
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
// From prisma/applicants/applicant-credit-data.prisma
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
// From prisma/applicants/applicant-credit-data.prisma
|
|
486
486
|
model ApplicantCreditData {
|
|
487
487
|
id String @id @default(uuid())
|
|
488
488
|
bankruptcy String
|
|
@@ -501,9 +501,9 @@ model ApplicantCreditData {
|
|
|
501
501
|
status Lookup @relation("CreditDataStatus", fields: [statusLid], references: [id])
|
|
502
502
|
|
|
503
503
|
@@map("applicant_credit_data")
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
// From prisma/applicants/applicant-credit-profile.prisma
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
// From prisma/applicants/applicant-credit-profile.prisma
|
|
507
507
|
model ApplicantCreditProfile {
|
|
508
508
|
id String @id @default(uuid())
|
|
509
509
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
@@ -518,9 +518,9 @@ model ApplicantCreditProfile {
|
|
|
518
518
|
applicant Applicant @relation("ApplicantCreditProfile", fields: [applicantId], references: [id])
|
|
519
519
|
|
|
520
520
|
@@map("applicant_credit_profiles")
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
// From prisma/applicants/applicant-employment-income.prisma
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
// From prisma/applicants/applicant-employment-income.prisma
|
|
524
524
|
model ApplicantEmploymentIncome {
|
|
525
525
|
id String @id @default(uuid())
|
|
526
526
|
applicantId String @unique @map("applicant_id")
|
|
@@ -534,9 +534,9 @@ model ApplicantEmploymentIncome {
|
|
|
534
534
|
incomeType Lookup @relation("ApplicantEmploymentIncomeType", fields: [incomeTypeLid], references: [id])
|
|
535
535
|
|
|
536
536
|
@@map("applicant_employment_incomes")
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
// From prisma/applicants/applicant-employment.prisma
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
// From prisma/applicants/applicant-employment.prisma
|
|
540
540
|
model ApplicantEmployment {
|
|
541
541
|
id String @id @default(uuid())
|
|
542
542
|
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
@@ -590,9 +590,9 @@ model ApplicantEmployment {
|
|
|
590
590
|
acceptableIncomeTypes Lookup[] @relation("AcceptableIncomeTypes")
|
|
591
591
|
|
|
592
592
|
@@map("applicant_employments")
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
// From prisma/applicants/applicant-expenditure.prisma
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// From prisma/applicants/applicant-expenditure.prisma
|
|
596
596
|
model ApplicantExpenditure {
|
|
597
597
|
id String @id @default(uuid())
|
|
598
598
|
applicantId String @map("applicant_id")
|
|
@@ -606,9 +606,9 @@ model ApplicantExpenditure {
|
|
|
606
606
|
expenditureType Lookup @relation("ExpenditureType", fields: [expenditureTypeLid], references: [id])
|
|
607
607
|
|
|
608
608
|
@@map("applicant_expenditures")
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
// From prisma/applicants/applicant-income-source.prisma
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// From prisma/applicants/applicant-income-source.prisma
|
|
612
612
|
model ApplicantIncomeSource {
|
|
613
613
|
id String @id @default(uuid())
|
|
614
614
|
employmentStatusLid String? @map("employment_status_lid")
|
|
@@ -625,9 +625,9 @@ model ApplicantIncomeSource {
|
|
|
625
625
|
employmentStatus Lookup? @relation("IncomeSourceEmploymentStatus", fields: [employmentStatusLid], references: [id])
|
|
626
626
|
|
|
627
627
|
@@map("applicant_income_source")
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
// From prisma/applicants/applicant-income.prisma
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// From prisma/applicants/applicant-income.prisma
|
|
631
631
|
model ApplicantIncome {
|
|
632
632
|
id String @id @default(uuid())
|
|
633
633
|
applicantId String @map("applicant_id")
|
|
@@ -694,9 +694,9 @@ model ApplicantIncome {
|
|
|
694
694
|
applicant Applicant @relation("ApplicantIncome", fields: [applicantId], references: [id])
|
|
695
695
|
|
|
696
696
|
@@map("applicant_incomes")
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
// From prisma/applicants/applicant-other-income.prisma
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
// From prisma/applicants/applicant-other-income.prisma
|
|
700
700
|
model ApplicantOtherIncome {
|
|
701
701
|
id String @id @default(uuid())
|
|
702
702
|
// Income Source 1
|
|
@@ -741,9 +741,9 @@ model ApplicantOtherIncome {
|
|
|
741
741
|
payFrequency4 Lookup? @relation("PayFrequency4", fields: [payFrequency4Lid], references: [id])
|
|
742
742
|
|
|
743
743
|
@@map("applicant_other_income")
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
// From prisma/applicants/applicant-property-income.prisma
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
// From prisma/applicants/applicant-property-income.prisma
|
|
747
747
|
model ApplicantPropertyIncome {
|
|
748
748
|
id String @id @default(uuid())
|
|
749
749
|
pageValidFlag Boolean @default(false) @map("page_valid_flag")
|
|
@@ -764,9 +764,9 @@ model ApplicantPropertyIncome {
|
|
|
764
764
|
applicant Applicant @relation("ApplicantPropertyIncome", fields: [applicantId], references: [id])
|
|
765
765
|
|
|
766
766
|
@@map("applicant_property_income")
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
// From prisma/applicants/applicant.prisma
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// From prisma/applicants/applicant.prisma
|
|
770
770
|
model Applicant {
|
|
771
771
|
id String @id @default(uuid())
|
|
772
772
|
applicantId String @unique
|
|
@@ -895,32 +895,33 @@ model Applicant {
|
|
|
895
895
|
shareholdings ApplicantShareholding[] @relation("ApplicantShareholdings")
|
|
896
896
|
|
|
897
897
|
@@map("applicants")
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
// From prisma/applicants/credit-card-commitment.prisma
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
// From prisma/applicants/credit-card-commitment.prisma
|
|
901
901
|
model CreditCardCommitment {
|
|
902
|
-
id
|
|
903
|
-
applicantId
|
|
904
|
-
commitmentId
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
902
|
+
id String @id @default(uuid())
|
|
903
|
+
applicantId String @map("applicant_id")
|
|
904
|
+
commitmentId String @map("commitment_id")
|
|
905
|
+
lenderName String? @map("lender_name")
|
|
906
|
+
creditLimit Decimal @map("credit_limit") @db.Decimal(10, 2)
|
|
907
|
+
outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
|
|
908
|
+
creditCardRepaymentTypeLid String @map("credit_card_repayment_type_lid")
|
|
909
|
+
monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
|
|
910
|
+
jointNames Boolean? @map("joint_names")
|
|
911
|
+
source String? @default("Broker") @map("source")
|
|
912
|
+
isSelected Boolean? @default(true) @map("is_selected")
|
|
913
|
+
creditCardRationale String? @default("") @map("credit_card_rationale")
|
|
914
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
915
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
914
916
|
|
|
915
917
|
// Relations
|
|
916
|
-
applicant
|
|
917
|
-
|
|
918
|
-
repaymentType Lookup @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
|
|
918
|
+
applicant Applicant @relation("ApplicantCreditCardCommitments", fields: [applicantId], references: [id])
|
|
919
|
+
repaymentType Lookup? @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
|
|
919
920
|
|
|
920
921
|
@@map("applicant_creditcard_commitments")
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
// From prisma/applicants/loan-commitment.prisma
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
// From prisma/applicants/loan-commitment.prisma
|
|
924
925
|
model LoanCommitment {
|
|
925
926
|
id String @id @default(uuid())
|
|
926
927
|
applicantId String @map("applicant_id")
|
|
@@ -946,9 +947,9 @@ model LoanCommitment {
|
|
|
946
947
|
loanType Lookup @relation("LoanType", fields: [loanTypeLid], references: [id])
|
|
947
948
|
|
|
948
949
|
@@map("applicant_loan_commitments")
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
// From prisma/applicants/mortgage-commitment.prisma
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
// From prisma/applicants/mortgage-commitment.prisma
|
|
952
953
|
model MortgageCommitment {
|
|
953
954
|
id String @id @default(uuid())
|
|
954
955
|
applicantId String @map("applicant_id")
|
|
@@ -982,9 +983,9 @@ model MortgageCommitment {
|
|
|
982
983
|
commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
|
|
983
984
|
|
|
984
985
|
@@map("applicant_mortgage_commitments")
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
// From prisma/applicants/residence-commitment.prisma
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// From prisma/applicants/residence-commitment.prisma
|
|
988
989
|
model ResidenceCommitment {
|
|
989
990
|
id String @id @default(uuid())
|
|
990
991
|
applicantId String @map("applicant_id")
|
|
@@ -1025,9 +1026,9 @@ model ResidenceCommitment {
|
|
|
1025
1026
|
chargeType Lookup @relation("ChargeType", fields: [chargeTypeLid], references: [id])
|
|
1026
1027
|
|
|
1027
1028
|
@@map("applicant_residence_commitments")
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
// From prisma/applicants/secured-loan-commitment.prisma
|
|
1031
1032
|
model SecuredLoanCommitment {
|
|
1032
1033
|
id String @id @default(uuid())
|
|
1033
1034
|
applicantId String @map("applicant_id")
|
|
@@ -1048,9 +1049,9 @@ model SecuredLoanCommitment {
|
|
|
1048
1049
|
applicant Applicant @relation("ApplicantSecuredLoanCommitments", fields: [applicantId], references: [id])
|
|
1049
1050
|
|
|
1050
1051
|
@@map("applicant_secured_loan_commitments")
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
// From prisma/applicants/unsecured-loan-commitment.prisma
|
|
1054
1055
|
model UnsecuredLoanCommitment {
|
|
1055
1056
|
id String @id @default(uuid())
|
|
1056
1057
|
applicantId String @map("applicant_id")
|
|
@@ -1070,9 +1071,9 @@ model UnsecuredLoanCommitment {
|
|
|
1070
1071
|
applicant Applicant @relation("ApplicantUnsecuredLoanCommitments", fields: [applicantId], references: [id])
|
|
1071
1072
|
|
|
1072
1073
|
@@map("applicant_unsecured_loan_commitments")
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
// From prisma/applications/application-audit.prisma
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
// From prisma/applications/application-audit.prisma
|
|
1076
1077
|
model ApplicationAudit {
|
|
1077
1078
|
id String @id @default(uuid())
|
|
1078
1079
|
auditId String @map("audit_id")
|
|
@@ -1091,9 +1092,9 @@ model ApplicationAudit {
|
|
|
1091
1092
|
application Application @relation(fields: [applicationId], references: [id])
|
|
1092
1093
|
|
|
1093
1094
|
@@map("application_audits")
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
// From prisma/applications/application-company.prisma
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
// From prisma/applications/application-company.prisma
|
|
1097
1098
|
model ApplicationCompany {
|
|
1098
1099
|
id String @id @default(uuid())
|
|
1099
1100
|
applicationId String @unique @map("application_id")
|
|
@@ -1106,9 +1107,9 @@ model ApplicationCompany {
|
|
|
1106
1107
|
application Application @relation("ApplicationCompany", fields: [applicationId], references: [id])
|
|
1107
1108
|
|
|
1108
1109
|
@@map("application_companies")
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
// From prisma/applications/application-credit-profile.prisma
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
// From prisma/applications/application-credit-profile.prisma
|
|
1112
1113
|
model ApplicationCreditProfile {
|
|
1113
1114
|
id String @id @default(uuid())
|
|
1114
1115
|
anyVoluntaryEnforcedPossessionNo String @map("any_voluntary_enforced_possession_no")
|
|
@@ -1123,9 +1124,9 @@ model ApplicationCreditProfile {
|
|
|
1123
1124
|
application Application @relation("ApplicationCreditProfile", fields: [applicationId], references: [id])
|
|
1124
1125
|
|
|
1125
1126
|
@@map("application_credit_profiles")
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
// From prisma/applications/application-direct-debit.prisma
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
// From prisma/applications/application-direct-debit.prisma
|
|
1129
1130
|
model ApplicationDirectDebit {
|
|
1130
1131
|
id String @id @default(uuid())
|
|
1131
1132
|
applicationId String @unique @map("application_id")
|
|
@@ -1152,9 +1153,9 @@ model ApplicationDirectDebit {
|
|
|
1152
1153
|
|
|
1153
1154
|
@@index([selectedPaymentDayLid])
|
|
1154
1155
|
@@map("application_direct_debits")
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
// From prisma/applications/application-document.prisma
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
// From prisma/applications/application-document.prisma
|
|
1158
1159
|
model ApplicationDocument {
|
|
1159
1160
|
id String @id @default(uuid())
|
|
1160
1161
|
applicationId String? @map("application_id")
|
|
@@ -1182,9 +1183,9 @@ model ApplicationDocument {
|
|
|
1182
1183
|
documentType Lookup? @relation("DocumentType", fields: [documentTypeLid], references: [id])
|
|
1183
1184
|
|
|
1184
1185
|
@@map("application_documents")
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
// From prisma/applications/application-fieldconfig.prisma
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
// From prisma/applications/application-fieldconfig.prisma
|
|
1188
1189
|
model ApplicationFieldConfig {
|
|
1189
1190
|
id String @id @default(uuid())
|
|
1190
1191
|
fieldName String @unique @map("field_name")
|
|
@@ -1193,9 +1194,9 @@ model ApplicationFieldConfig {
|
|
|
1193
1194
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1194
1195
|
|
|
1195
1196
|
@@map("application_field_configs")
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
// From prisma/applications/application-illustration.prisma
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
// From prisma/applications/application-illustration.prisma
|
|
1199
1200
|
model ApplicationIllustration {
|
|
1200
1201
|
id String @id @default(uuid())
|
|
1201
1202
|
date DateTime @map("date")
|
|
@@ -1203,9 +1204,9 @@ model ApplicationIllustration {
|
|
|
1203
1204
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1204
1205
|
|
|
1205
1206
|
@@map("application_illustrations")
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
// From prisma/applications/application-legal.prisma
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
// From prisma/applications/application-legal.prisma
|
|
1209
1210
|
model ApplicationLegal {
|
|
1210
1211
|
id String @id @default(uuid())
|
|
1211
1212
|
assignedSolicitor String @default("") @map("assigned_solicitor")
|
|
@@ -1214,9 +1215,9 @@ model ApplicationLegal {
|
|
|
1214
1215
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1215
1216
|
|
|
1216
1217
|
@@map("application_legals")
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
// From prisma/applications/application-mortgage.prisma
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
// From prisma/applications/application-mortgage.prisma
|
|
1220
1221
|
model ApplicationMortgage {
|
|
1221
1222
|
id String @id @default(uuid())
|
|
1222
1223
|
applicationId String @unique @map("application_id")
|
|
@@ -1264,9 +1265,9 @@ model ApplicationMortgage {
|
|
|
1264
1265
|
proposedTenants Lookup[] @relation("ProposedTenants")
|
|
1265
1266
|
|
|
1266
1267
|
@@map("application_mortgages")
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
// From prisma/applications/application-note.prisma
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// From prisma/applications/application-note.prisma
|
|
1270
1271
|
model ApplicationNote {
|
|
1271
1272
|
id String @id @default(uuid())
|
|
1272
1273
|
applicationId String @map("application_id")
|
|
@@ -1302,9 +1303,9 @@ model ApplicationNote {
|
|
|
1302
1303
|
assignedByUser User? @relation("AssignedByUser", fields: [assignedByUserId], references: [id])
|
|
1303
1304
|
|
|
1304
1305
|
@@map("application_notes")
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
// From prisma/applications/application-offer.prisma
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
// From prisma/applications/application-offer.prisma
|
|
1308
1309
|
model ApplicationOffer {
|
|
1309
1310
|
id String @id @default(uuid())
|
|
1310
1311
|
date String @map("date")
|
|
@@ -1312,9 +1313,9 @@ model ApplicationOffer {
|
|
|
1312
1313
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1313
1314
|
|
|
1314
1315
|
@@map("application_offers")
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
// From prisma/applications/application-onboarding.prisma
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
// From prisma/applications/application-onboarding.prisma
|
|
1318
1319
|
model ApplicationOnboarding {
|
|
1319
1320
|
id String @id @default(uuid())
|
|
1320
1321
|
errors String @default("")
|
|
@@ -1325,9 +1326,9 @@ model ApplicationOnboarding {
|
|
|
1325
1326
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1326
1327
|
|
|
1327
1328
|
@@map("application_onboardings")
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
// From prisma/applications/application-product.prisma
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
// From prisma/applications/application-product.prisma
|
|
1331
1332
|
model ApplicationProduct {
|
|
1332
1333
|
id String @id @default(uuid())
|
|
1333
1334
|
applicationId String @map("application_id")
|
|
@@ -1360,9 +1361,9 @@ model ApplicationProduct {
|
|
|
1360
1361
|
productFeePaymentType Lookup? @relation("ProductFeePaymentType", fields: [productFeePaymentTypeLid], references: [id])
|
|
1361
1362
|
|
|
1362
1363
|
@@map("application_products")
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
// From prisma/applications/application-rationale.prisma
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
// From prisma/applications/application-rationale.prisma
|
|
1366
1367
|
model ApplicationRationale {
|
|
1367
1368
|
id String @id @default(uuid())
|
|
1368
1369
|
applicationId String @unique @map("application_id")
|
|
@@ -1413,9 +1414,9 @@ model ApplicationRationale {
|
|
|
1413
1414
|
propertyStatus Lookup? @relation("PropertyStatus", fields: [propertyStatusLid], references: [id])
|
|
1414
1415
|
|
|
1415
1416
|
@@map("application_rationales")
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
// From prisma/applications/application.prisma
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
// From prisma/applications/application.prisma
|
|
1419
1420
|
model Application {
|
|
1420
1421
|
id String @id @default(uuid())
|
|
1421
1422
|
queueId String[] @map("queue_id")
|
|
@@ -1508,9 +1509,9 @@ model Application {
|
|
|
1508
1509
|
@@index([repaymentTypeLid])
|
|
1509
1510
|
@@index([sourceOfWealthLids])
|
|
1510
1511
|
@@map("applications")
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
// From prisma/applications/broker.prisma
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
// From prisma/applications/broker.prisma
|
|
1514
1515
|
model Broker {
|
|
1515
1516
|
id String @id @default(uuid())
|
|
1516
1517
|
brokerId String @unique @map("broker_id")
|
|
@@ -1536,9 +1537,9 @@ model Broker {
|
|
|
1536
1537
|
applications Application[] @relation("ApplicationBroker")
|
|
1537
1538
|
|
|
1538
1539
|
@@map("brokers")
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
// From prisma/applications/checklist-item.prisma
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
// From prisma/applications/checklist-item.prisma
|
|
1542
1543
|
model ChecklistItem {
|
|
1543
1544
|
id String @id @default(uuid())
|
|
1544
1545
|
additionalOfferConditions String @default("") @map("additional_offer_conditions")
|
|
@@ -1585,9 +1586,9 @@ model ChecklistItem {
|
|
|
1585
1586
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1586
1587
|
|
|
1587
1588
|
@@map("checklist_items")
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
// From prisma/applications/company.prisma
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
// From prisma/applications/company.prisma
|
|
1591
1592
|
model Company {
|
|
1592
1593
|
id String @id @default(uuid())
|
|
1593
1594
|
applicationId String @map("application_id")
|
|
@@ -1663,9 +1664,9 @@ model ApplicantShareholding {
|
|
|
1663
1664
|
directorShareholder Lookup? @relation("DirectorShareholder", fields: [directorShareholderLid], references: [id])
|
|
1664
1665
|
|
|
1665
1666
|
@@map("applicant_shareholdings")
|
|
1666
|
-
}
|
|
1667
|
-
|
|
1668
|
-
// From prisma/applications/product-features.prisma
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
// From prisma/applications/product-features.prisma
|
|
1669
1670
|
model ProductFeatures {
|
|
1670
1671
|
id String @id @default(uuid())
|
|
1671
1672
|
name String @map("name")
|
|
@@ -1719,9 +1720,9 @@ model ProductFeatures {
|
|
|
1719
1720
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
1720
1721
|
|
|
1721
1722
|
@@map("product_features")
|
|
1722
|
-
}
|
|
1723
|
-
|
|
1724
|
-
// From prisma/applications/solicitor.prisma
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
// From prisma/applications/solicitor.prisma
|
|
1725
1726
|
model Solicitor {
|
|
1726
1727
|
id String @id @default(uuid())
|
|
1727
1728
|
applicationId String @unique @map("application_id")
|
|
@@ -1754,9 +1755,9 @@ model Solicitor {
|
|
|
1754
1755
|
addressCountry Lookup? @relation("AddressCountry", fields: [addressCountryLid], references: [id])
|
|
1755
1756
|
|
|
1756
1757
|
@@map("solicitors")
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
// From prisma/properties/property.prisma
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
// From prisma/properties/property.prisma
|
|
1760
1761
|
model Property {
|
|
1761
1762
|
id String @id @default(uuid())
|
|
1762
1763
|
applicationId String @map("application_id")
|
|
@@ -1786,9 +1787,9 @@ model Property {
|
|
|
1786
1787
|
country Lookup @relation("PropertyCountry", fields: [countryLid], references: [id])
|
|
1787
1788
|
|
|
1788
1789
|
@@map("properties")
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
// From prisma/properties/security.prisma
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
// From prisma/properties/security.prisma
|
|
1792
1793
|
model Security {
|
|
1793
1794
|
id String @id @default(uuid())
|
|
1794
1795
|
applicationId String @unique @map("application_id")
|
|
@@ -1868,9 +1869,9 @@ model DataStreet {
|
|
|
1868
1869
|
security Security @relation(fields: [securityId], references: [id])
|
|
1869
1870
|
|
|
1870
1871
|
@@map("data_streets")
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
// From prisma/underwriter/underwriter.prisma
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
// From prisma/underwriter/underwriter.prisma
|
|
1874
1875
|
model Underwriter {
|
|
1875
1876
|
id String @id @default(uuid())
|
|
1876
1877
|
applicationId String @map("application_id")
|