@dynamatix/gb-schemas 2.0.35 → 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.
Files changed (62) hide show
  1. package/dist/applicants/applicant-additional-income.model.d.ts +27 -927
  2. package/dist/applicants/applicant-additional-income.model.d.ts.map +1 -1
  3. package/dist/applicants/applicant-additional-income.model.js +4 -23
  4. package/dist/applicants/applicant-commitment-creditCard.model.d.ts +6 -6
  5. package/dist/applicants/applicant-commitment-creditCard.model.d.ts.map +1 -1
  6. package/dist/applicants/applicant-commitment-creditCard.model.js +2 -1
  7. package/dist/applicants/applicant-commitment-loan.model.d.ts +6 -6
  8. package/dist/applicants/applicant-commitment-loan.model.d.ts.map +1 -1
  9. package/dist/applicants/applicant-commitment-loan.model.js +9 -1
  10. package/dist/applicants/applicant-commitment-mortgage.model.d.ts +30 -12
  11. package/dist/applicants/applicant-commitment-mortgage.model.d.ts.map +1 -1
  12. package/dist/applicants/applicant-commitment-mortgage.model.js +8 -3
  13. package/dist/applicants/applicant-employment.model.d.ts +1234 -6
  14. package/dist/applicants/applicant-employment.model.d.ts.map +1 -1
  15. package/dist/applicants/applicant-employment.model.js +4 -6
  16. package/dist/applicants/applicant-income-settings.model.d.ts +54 -0
  17. package/dist/applicants/applicant-income-settings.model.d.ts.map +1 -0
  18. package/dist/applicants/applicant-income-settings.model.js +11 -0
  19. package/dist/applicants/applicant-income.model.d.ts +2020 -42
  20. package/dist/applicants/applicant-income.model.d.ts.map +1 -1
  21. package/dist/applicants/applicant-income.model.js +11 -14
  22. package/dist/applicants/applicant-pension-income.model.d.ts +288 -0
  23. package/dist/applicants/applicant-pension-income.model.d.ts.map +1 -1
  24. package/dist/applicants/applicant-pension-income.model.js +13 -0
  25. package/dist/applicants/applicant-uk-tax-credits.model.d.ts +288 -0
  26. package/dist/applicants/applicant-uk-tax-credits.model.d.ts.map +1 -1
  27. package/dist/applicants/applicant-uk-tax-credits.model.js +2 -0
  28. package/dist/applicants/applicant.model.d.ts.map +1 -1
  29. package/dist/applicants/applicant.model.js +0 -6
  30. package/dist/applicants/index.d.ts +3 -3
  31. package/dist/applicants/index.d.ts.map +1 -1
  32. package/dist/applicants/index.js +3 -3
  33. package/dist/applications/application-mortgage.model.d.ts +3 -3
  34. package/dist/applications/application-mortgage.model.js +1 -1
  35. package/dist/entities/applicants/credit-card-commitment.entity.d.ts +10 -3
  36. package/dist/entities/applicants/credit-card-commitment.entity.d.ts.map +1 -1
  37. package/dist/entities/applicants/credit-card-commitment.entity.js +4 -0
  38. package/dist/entities/applications/application-mortgage.entity.d.ts +1 -1
  39. package/dist/entities/applications/application-mortgage.entity.d.ts.map +1 -1
  40. package/entities/applicants/credit-card-commitment.entity.ts +28 -17
  41. package/entities/applications/application-mortgage.entity.ts +1 -1
  42. package/package.json +1 -1
  43. package/prisma/applicants/credit-card-commitment.prisma +16 -15
  44. package/prisma/applications/application-mortgage.prisma +2 -2
  45. package/prisma/migrations/20250512071728_update_mortgage_schema/migration.sql +15 -15
  46. package/prisma/migrations/20250512094011_update_property_schema/migration.sql +34 -34
  47. package/prisma/migrations/20250512102019_update_mortgage_schema/migration.sql +2 -0
  48. package/prisma/migrations/20250513132704_update_credit_card_commitment_schema/migration.sql +22 -0
  49. package/prisma/schema.prisma +203 -202
  50. package/prisma/shared/lookup.prisma +1 -1
  51. package/dist/applicants/applicant-commitment-residence.model.d.ts +0 -728
  52. package/dist/applicants/applicant-commitment-residence.model.d.ts.map +0 -1
  53. package/dist/applicants/applicant-commitment-residence.model.js +0 -50
  54. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts +0 -368
  55. package/dist/applicants/applicant-commitment-secureLoan.model.d.ts.map +0 -1
  56. package/dist/applicants/applicant-commitment-secureLoan.model.js +0 -29
  57. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts +0 -362
  58. package/dist/applicants/applicant-commitment-unsecuredLoan.model.d.ts.map +0 -1
  59. package/dist/applicants/applicant-commitment-unsecuredLoan.model.js +0 -28
  60. package/dist/applicants/applicant-income-source.model.d.ts +0 -26
  61. package/dist/applicants/applicant-income-source.model.d.ts.map +0 -1
  62. package/dist/applicants/applicant-income-source.model.js +0 -9
@@ -1,21 +1,22 @@
1
1
  model CreditCardCommitment {
2
- id String @id @default(uuid())
3
- applicantId String @map("applicant_id")
4
- commitmentId String @map("commitment_id")
5
- commitmentTypeLid String? @map("commitment_type_lid")
6
- lenderName String @map("lender_name")
7
- creditLimit Decimal @map("credit_limit")
8
- outstandingBalance Decimal @map("outstanding_balance")
9
- creditCardRepaymentTypeLid String @map("credit_card_repayment_type_lid")
10
- monthlyPayment Decimal @map("monthly_payment")
11
- jointNames Boolean @map("joint_names")
12
- createdAt DateTime @default(now()) @map("created_at")
13
- updatedAt DateTime @updatedAt @map("updated_at")
2
+ id String @id @default(uuid())
3
+ applicantId String @map("applicant_id")
4
+ commitmentId String @map("commitment_id")
5
+ lenderName String? @map("lender_name")
6
+ creditLimit Decimal @map("credit_limit") @db.Decimal(10, 2)
7
+ outstandingBalance Decimal @map("outstanding_balance") @db.Decimal(10, 2)
8
+ creditCardRepaymentTypeLid String @map("credit_card_repayment_type_lid")
9
+ monthlyPayment Decimal @map("monthly_payment") @db.Decimal(10, 2)
10
+ jointNames Boolean? @map("joint_names")
11
+ source String? @default("Broker") @map("source")
12
+ isSelected Boolean? @default(true) @map("is_selected")
13
+ creditCardRationale String? @default("") @map("credit_card_rationale")
14
+ createdAt DateTime @default(now()) @map("created_at")
15
+ updatedAt DateTime @updatedAt @map("updated_at")
14
16
 
15
17
  // Relations
16
- applicant Applicant @relation("ApplicantCreditCardCommitments", fields: [applicantId], references: [id])
17
- commitmentType Lookup? @relation("CommitmentType", fields: [commitmentTypeLid], references: [id])
18
- repaymentType Lookup @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
18
+ applicant Applicant @relation("ApplicantCreditCardCommitments", fields: [applicantId], references: [id])
19
+ repaymentType Lookup? @relation("CreditCardRepaymentType", fields: [creditCardRepaymentTypeLid], references: [id])
19
20
 
20
21
  @@map("applicant_creditcard_commitments")
21
22
  }
@@ -6,12 +6,12 @@ model ApplicationMortgage {
6
6
  purposeOfMortgage String @map("purpose_of_mortgage") @db.VarChar(50)
7
7
  depositComeFromLids String[] @map("deposit_come_from_lids")
8
8
  ifOtherDetails String @map("if_other_details") @db.VarChar(50)
9
- giftDetails String? @map("gift_details") @db.VarChar(50)
9
+ giftDetails String? @map("gift_details") @db.VarChar(50)
10
10
  purchasePrice Decimal @map("purchase_price") @db.Decimal(10, 2)
11
11
  repaymentTypeLid String @map("repayment_type_lid")
12
12
  exitStrategyLid String @map("exit_strategy_lid")
13
13
  isCapitalRaise Boolean? @default(false) @map("is_capital_raise")
14
- purchaseDate DateTime @map("purchase_date")
14
+ purchaseDate String @map("purchase_date")
15
15
  estimatedValue Decimal @map("estimated_value") @db.Decimal(10, 2)
16
16
  loanRequired Decimal @map("loan_required") @db.Decimal(10, 2)
17
17
  monthlyRentalIncome Decimal @map("monthly_rental_income") @db.Decimal(10, 2)
@@ -1,15 +1,15 @@
1
- /*
2
- Warnings:
3
-
4
- - Added the required column `gift_details` to the `application_mortgages` table without a default value. This is not possible if the table is not empty.
5
-
6
- */
7
- -- AlterTable
8
- ALTER TABLE "application_mortgages" ADD COLUMN "gift_details" VARCHAR(50) NOT NULL,
9
- ALTER COLUMN "is_capital_raise" DROP NOT NULL,
10
- ALTER COLUMN "is_distressed_sale" DROP NOT NULL,
11
- ALTER COLUMN "is_purchased_below_market_value" DROP NOT NULL,
12
- ALTER COLUMN "is_purchased_as_sale" DROP NOT NULL,
13
- ALTER COLUMN "is_ready_to_sell" DROP NOT NULL,
14
- ALTER COLUMN "is_government_initiative" DROP NOT NULL,
15
- ALTER COLUMN "is_the_intention_to_let" DROP NOT NULL;
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `gift_details` to the `application_mortgages` table without a default value. This is not possible if the table is not empty.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "application_mortgages" ADD COLUMN "gift_details" VARCHAR(50) NOT NULL,
9
+ ALTER COLUMN "is_capital_raise" DROP NOT NULL,
10
+ ALTER COLUMN "is_distressed_sale" DROP NOT NULL,
11
+ ALTER COLUMN "is_purchased_below_market_value" DROP NOT NULL,
12
+ ALTER COLUMN "is_purchased_as_sale" DROP NOT NULL,
13
+ ALTER COLUMN "is_ready_to_sell" DROP NOT NULL,
14
+ ALTER COLUMN "is_government_initiative" DROP NOT NULL,
15
+ ALTER COLUMN "is_the_intention_to_let" DROP NOT NULL;
@@ -1,34 +1,34 @@
1
- /*
2
- Warnings:
3
-
4
- - You are about to alter the column `address_line1` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
5
- - You are about to alter the column `address_line2` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
6
- - You are about to alter the column `address_line3` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
7
- - You are about to alter the column `city` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(30)`.
8
- - You are about to alter the column `lender` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
9
- - You are about to alter the column `market_value` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
10
- - You are about to alter the column `monthly_rent` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
11
- - You are about to alter the column `monthly_repayment` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
12
- - You are about to alter the column `original_loan_balance` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
13
- - You are about to alter the column `outstanding_balance` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
14
- - You are about to alter the column `other_ownership_parties` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(500)`.
15
- - You are about to alter the column `post_code` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(50)`.
16
-
17
- */
18
- -- AlterTable
19
- ALTER TABLE "application_mortgages" ALTER COLUMN "gift_details" DROP NOT NULL;
20
-
21
- -- AlterTable
22
- ALTER TABLE "properties" ALTER COLUMN "address_line1" DROP NOT NULL,
23
- ALTER COLUMN "address_line1" SET DATA TYPE VARCHAR(35),
24
- ALTER COLUMN "address_line2" SET DATA TYPE VARCHAR(35),
25
- ALTER COLUMN "address_line3" SET DATA TYPE VARCHAR(35),
26
- ALTER COLUMN "city" SET DATA TYPE VARCHAR(30),
27
- ALTER COLUMN "lender" SET DATA TYPE VARCHAR(35),
28
- ALTER COLUMN "market_value" SET DATA TYPE DECIMAL(12,2),
29
- ALTER COLUMN "monthly_rent" SET DATA TYPE DECIMAL(12,2),
30
- ALTER COLUMN "monthly_repayment" SET DATA TYPE DECIMAL(12,2),
31
- ALTER COLUMN "original_loan_balance" SET DATA TYPE DECIMAL(12,2),
32
- ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(12,2),
33
- ALTER COLUMN "other_ownership_parties" SET DATA TYPE VARCHAR(500),
34
- ALTER COLUMN "post_code" SET DATA TYPE VARCHAR(50);
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to alter the column `address_line1` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
5
+ - You are about to alter the column `address_line2` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
6
+ - You are about to alter the column `address_line3` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
7
+ - You are about to alter the column `city` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(30)`.
8
+ - You are about to alter the column `lender` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(35)`.
9
+ - You are about to alter the column `market_value` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
10
+ - You are about to alter the column `monthly_rent` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
11
+ - You are about to alter the column `monthly_repayment` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
12
+ - You are about to alter the column `original_loan_balance` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
13
+ - You are about to alter the column `outstanding_balance` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(12,2)`.
14
+ - You are about to alter the column `other_ownership_parties` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(500)`.
15
+ - You are about to alter the column `post_code` on the `properties` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(50)`.
16
+
17
+ */
18
+ -- AlterTable
19
+ ALTER TABLE "application_mortgages" ALTER COLUMN "gift_details" DROP NOT NULL;
20
+
21
+ -- AlterTable
22
+ ALTER TABLE "properties" ALTER COLUMN "address_line1" DROP NOT NULL,
23
+ ALTER COLUMN "address_line1" SET DATA TYPE VARCHAR(35),
24
+ ALTER COLUMN "address_line2" SET DATA TYPE VARCHAR(35),
25
+ ALTER COLUMN "address_line3" SET DATA TYPE VARCHAR(35),
26
+ ALTER COLUMN "city" SET DATA TYPE VARCHAR(30),
27
+ ALTER COLUMN "lender" SET DATA TYPE VARCHAR(35),
28
+ ALTER COLUMN "market_value" SET DATA TYPE DECIMAL(12,2),
29
+ ALTER COLUMN "monthly_rent" SET DATA TYPE DECIMAL(12,2),
30
+ ALTER COLUMN "monthly_repayment" SET DATA TYPE DECIMAL(12,2),
31
+ ALTER COLUMN "original_loan_balance" SET DATA TYPE DECIMAL(12,2),
32
+ ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(12,2),
33
+ ALTER COLUMN "other_ownership_parties" SET DATA TYPE VARCHAR(500),
34
+ ALTER COLUMN "post_code" SET DATA TYPE VARCHAR(50);
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "application_mortgages" ALTER COLUMN "purchase_date" SET DATA TYPE TEXT;
@@ -0,0 +1,22 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `commitment_type_lid` on the `applicant_creditcard_commitments` table. All the data in the column will be lost.
5
+ - You are about to alter the column `credit_limit` on the `applicant_creditcard_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
6
+ - You are about to alter the column `outstanding_balance` on the `applicant_creditcard_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
7
+ - You are about to alter the column `monthly_payment` on the `applicant_creditcard_commitments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
8
+
9
+ */
10
+ -- DropForeignKey
11
+ ALTER TABLE "applicant_creditcard_commitments" DROP CONSTRAINT "applicant_creditcard_commitments_commitment_type_lid_fkey";
12
+
13
+ -- AlterTable
14
+ ALTER TABLE "applicant_creditcard_commitments" DROP COLUMN "commitment_type_lid",
15
+ ADD COLUMN "credit_card_rationale" TEXT DEFAULT '',
16
+ ADD COLUMN "is_selected" BOOLEAN DEFAULT true,
17
+ ADD COLUMN "source" TEXT DEFAULT 'Broker',
18
+ ALTER COLUMN "lender_name" DROP NOT NULL,
19
+ ALTER COLUMN "credit_limit" SET DATA TYPE DECIMAL(10,2),
20
+ ALTER COLUMN "outstanding_balance" SET DATA TYPE DECIMAL(10,2),
21
+ ALTER COLUMN "monthly_payment" SET DATA TYPE DECIMAL(10,2),
22
+ ALTER COLUMN "joint_names" DROP NOT NULL;