@dynamatix/gb-schemas 2.0.62 → 2.0.63

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.
@@ -3,7 +3,7 @@ import { LookupEntity } from '../shared/lookup.entity';
3
3
  export declare class ApplicantIncomeSettingsEntity {
4
4
  id: string;
5
5
  applicantId: string;
6
- employmentStatusLid: string;
6
+ employmentStatusLid?: string;
7
7
  incomeFromEmployment?: boolean;
8
8
  incomeFromPension?: boolean;
9
9
  incomeFromProperty?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"applicant-income-settings.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/applicant-income-settings.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,6BAA6B;IACtC,EAAE,EAAG,MAAM,CAAC;IACZ,WAAW,EAAG,MAAM,CAAC;IACrB,mBAAmB,EAAG,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,eAAe,CAAC;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;gBAEpB,OAAO,EAAE,OAAO,CAAC,6BAA6B,CAAC;CAG9D"}
1
+ {"version":3,"file":"applicant-income-settings.entity.d.ts","sourceRoot":"","sources":["../../../entities/applicants/applicant-income-settings.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,qBAAa,6BAA6B;IACtC,EAAE,EAAG,MAAM,CAAC;IACZ,WAAW,EAAG,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,SAAS,EAAG,eAAe,CAAC;IAC5B,gBAAgB,CAAC,EAAE,YAAY,CAAC;gBAEpB,OAAO,EAAE,OAAO,CAAC,6BAA6B,CAAC;CAG9D"}
@@ -4,7 +4,7 @@ import { LookupEntity } from '../shared/lookup.entity';
4
4
  export class ApplicantIncomeSettingsEntity {
5
5
  id!: string;
6
6
  applicantId!: string;
7
- employmentStatusLid!: string;
7
+ employmentStatusLid?: string;
8
8
  incomeFromEmployment?: boolean;
9
9
  incomeFromPension?: boolean;
10
10
  incomeFromProperty?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.0.62",
3
+ "version": "2.0.63",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  model ApplicantIncomeSettings {
2
2
  id String @id @default(uuid())
3
3
  applicantId String @unique @map("applicant_id")
4
- employmentStatusLid String @unique @map("employment_status_lid")
4
+ employmentStatusLid String? @map("employment_status_lid")
5
5
  incomeFromEmployment Boolean @default(false) @map("income_from_employment")
6
6
  incomeFromPension Boolean @default(false) @map("income_from_pension")
7
7
  incomeFromProperty Boolean @default(false) @map("income_from_property")
@@ -1,65 +1,65 @@
1
- /*
2
- Warnings:
3
-
4
- - You are about to drop the column `employmentIncomeRationale` on the `applicant_incomes` table. All the data in the column will be lost.
5
- - You are about to drop the column `turnover1` on the `applicant_incomes` table. All the data in the column will be lost.
6
- - You are about to drop the column `turnover2` on the `applicant_incomes` table. All the data in the column will be lost.
7
- - You are about to drop the column `turnover3` on the `applicant_incomes` table. All the data in the column will be lost.
8
- - You are about to drop the column `year1` on the `applicant_incomes` table. All the data in the column will be lost.
9
- - You are about to drop the column `year2` on the `applicant_incomes` table. All the data in the column will be lost.
10
- - You are about to drop the column `year3` on the `applicant_incomes` table. All the data in the column will be lost.
11
- - You are about to drop the column `year_end1` on the `applicant_incomes` table. All the data in the column will be lost.
12
- - You are about to drop the column `year_end2` on the `applicant_incomes` table. All the data in the column will be lost.
13
- - You are about to drop the column `year_end3` on the `applicant_incomes` table. All the data in the column will be lost.
14
- - You are about to alter the column `net_assets1` on the `applicant_incomes` 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)`.
15
- - You are about to alter the column `net_assets2` on the `applicant_incomes` 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)`.
16
- - You are about to alter the column `net_assets3` on the `applicant_incomes` 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)`.
17
- - You are about to alter the column `total_employment_gross_income` on the `applicant_incomes` 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)`.
18
- - You are about to alter the column `total_employment_net_income` on the `applicant_incomes` 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)`.
19
- - A unique constraint covering the columns `[applicant_id]` on the table `applicant_incomes` will be added. If there are existing duplicate values, this will fail.
20
-
21
- */
22
- -- AlterTable
23
- ALTER TABLE "applicant_incomes" DROP COLUMN "employmentIncomeRationale",
24
- DROP COLUMN "turnover1",
25
- DROP COLUMN "turnover2",
26
- DROP COLUMN "turnover3",
27
- DROP COLUMN "year1",
28
- DROP COLUMN "year2",
29
- DROP COLUMN "year3",
30
- DROP COLUMN "year_end1",
31
- DROP COLUMN "year_end2",
32
- DROP COLUMN "year_end3",
33
- ADD COLUMN "additional_income_rationale" TEXT,
34
- ADD COLUMN "employment_income_rationale" TEXT,
35
- ADD COLUMN "is_additional_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
36
- ADD COLUMN "is_pension_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
37
- ADD COLUMN "is_property_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
38
- ADD COLUMN "is_self_employed_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
39
- ADD COLUMN "is_uk_tax_credits_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
40
- ADD COLUMN "pension_income_rationale" TEXT,
41
- ADD COLUMN "property_income_rationale" TEXT,
42
- ADD COLUMN "self_employed_income_rationale" TEXT,
43
- ADD COLUMN "sole_trader_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
44
- ADD COLUMN "sole_trader_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
45
- ADD COLUMN "sole_trader_income_rationale" TEXT,
46
- ADD COLUMN "sole_trader_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
47
- ADD COLUMN "total_additional_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
48
- ADD COLUMN "total_additional_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
49
- ADD COLUMN "total_property_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
50
- ADD COLUMN "total_property_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
51
- ADD COLUMN "total_self_employed_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
52
- ADD COLUMN "total_self_employed_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
53
- ADD COLUMN "uk_tax_credits_income_rationale" TEXT,
54
- ALTER COLUMN "net_assets1" SET DATA TYPE DECIMAL(10,2),
55
- ALTER COLUMN "net_assets2" SET DATA TYPE DECIMAL(10,2),
56
- ALTER COLUMN "net_assets3" SET DATA TYPE DECIMAL(10,2),
57
- ALTER COLUMN "page_valid_flag" SET DEFAULT true,
58
- ALTER COLUMN "total_employment_gross_income" SET DEFAULT 0.00,
59
- ALTER COLUMN "total_employment_gross_income" SET DATA TYPE DECIMAL(10,2),
60
- ALTER COLUMN "total_employment_net_income" SET DEFAULT 0.00,
61
- ALTER COLUMN "total_employment_net_income" SET DATA TYPE DECIMAL(10,2),
62
- ALTER COLUMN "is_employment_income_confirmed" SET DEFAULT false;
63
-
64
- -- CreateIndex
65
- CREATE UNIQUE INDEX "applicant_incomes_applicant_id_key" ON "applicant_incomes"("applicant_id");
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `employmentIncomeRationale` on the `applicant_incomes` table. All the data in the column will be lost.
5
+ - You are about to drop the column `turnover1` on the `applicant_incomes` table. All the data in the column will be lost.
6
+ - You are about to drop the column `turnover2` on the `applicant_incomes` table. All the data in the column will be lost.
7
+ - You are about to drop the column `turnover3` on the `applicant_incomes` table. All the data in the column will be lost.
8
+ - You are about to drop the column `year1` on the `applicant_incomes` table. All the data in the column will be lost.
9
+ - You are about to drop the column `year2` on the `applicant_incomes` table. All the data in the column will be lost.
10
+ - You are about to drop the column `year3` on the `applicant_incomes` table. All the data in the column will be lost.
11
+ - You are about to drop the column `year_end1` on the `applicant_incomes` table. All the data in the column will be lost.
12
+ - You are about to drop the column `year_end2` on the `applicant_incomes` table. All the data in the column will be lost.
13
+ - You are about to drop the column `year_end3` on the `applicant_incomes` table. All the data in the column will be lost.
14
+ - You are about to alter the column `net_assets1` on the `applicant_incomes` 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)`.
15
+ - You are about to alter the column `net_assets2` on the `applicant_incomes` 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)`.
16
+ - You are about to alter the column `net_assets3` on the `applicant_incomes` 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)`.
17
+ - You are about to alter the column `total_employment_gross_income` on the `applicant_incomes` 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)`.
18
+ - You are about to alter the column `total_employment_net_income` on the `applicant_incomes` 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)`.
19
+ - A unique constraint covering the columns `[applicant_id]` on the table `applicant_incomes` will be added. If there are existing duplicate values, this will fail.
20
+
21
+ */
22
+ -- AlterTable
23
+ ALTER TABLE "applicant_incomes" DROP COLUMN "employmentIncomeRationale",
24
+ DROP COLUMN "turnover1",
25
+ DROP COLUMN "turnover2",
26
+ DROP COLUMN "turnover3",
27
+ DROP COLUMN "year1",
28
+ DROP COLUMN "year2",
29
+ DROP COLUMN "year3",
30
+ DROP COLUMN "year_end1",
31
+ DROP COLUMN "year_end2",
32
+ DROP COLUMN "year_end3",
33
+ ADD COLUMN "additional_income_rationale" TEXT,
34
+ ADD COLUMN "employment_income_rationale" TEXT,
35
+ ADD COLUMN "is_additional_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
36
+ ADD COLUMN "is_pension_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
37
+ ADD COLUMN "is_property_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
38
+ ADD COLUMN "is_self_employed_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
39
+ ADD COLUMN "is_uk_tax_credits_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
40
+ ADD COLUMN "pension_income_rationale" TEXT,
41
+ ADD COLUMN "property_income_rationale" TEXT,
42
+ ADD COLUMN "self_employed_income_rationale" TEXT,
43
+ ADD COLUMN "sole_trader_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
44
+ ADD COLUMN "sole_trader_income_confirmed" BOOLEAN NOT NULL DEFAULT false,
45
+ ADD COLUMN "sole_trader_income_rationale" TEXT,
46
+ ADD COLUMN "sole_trader_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
47
+ ADD COLUMN "total_additional_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
48
+ ADD COLUMN "total_additional_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
49
+ ADD COLUMN "total_property_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
50
+ ADD COLUMN "total_property_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
51
+ ADD COLUMN "total_self_employed_gross_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
52
+ ADD COLUMN "total_self_employed_net_income" DECIMAL(10,2) NOT NULL DEFAULT 0.00,
53
+ ADD COLUMN "uk_tax_credits_income_rationale" TEXT,
54
+ ALTER COLUMN "net_assets1" SET DATA TYPE DECIMAL(10,2),
55
+ ALTER COLUMN "net_assets2" SET DATA TYPE DECIMAL(10,2),
56
+ ALTER COLUMN "net_assets3" SET DATA TYPE DECIMAL(10,2),
57
+ ALTER COLUMN "page_valid_flag" SET DEFAULT true,
58
+ ALTER COLUMN "total_employment_gross_income" SET DEFAULT 0.00,
59
+ ALTER COLUMN "total_employment_gross_income" SET DATA TYPE DECIMAL(10,2),
60
+ ALTER COLUMN "total_employment_net_income" SET DEFAULT 0.00,
61
+ ALTER COLUMN "total_employment_net_income" SET DATA TYPE DECIMAL(10,2),
62
+ ALTER COLUMN "is_employment_income_confirmed" SET DEFAULT false;
63
+
64
+ -- CreateIndex
65
+ CREATE UNIQUE INDEX "applicant_incomes_applicant_id_key" ON "applicant_incomes"("applicant_id");
@@ -1,44 +1,44 @@
1
- /*
2
- Warnings:
3
-
4
- - You are about to drop the `applicant_income_source` table. If the table is not empty, all the data it contains will be lost.
5
-
6
- */
7
- -- DropForeignKey
8
- ALTER TABLE "applicant_income_source" DROP CONSTRAINT "applicant_income_source_applicant_id_fkey";
9
-
10
- -- DropForeignKey
11
- ALTER TABLE "applicant_income_source" DROP CONSTRAINT "applicant_income_source_employment_status_lid_fkey";
12
-
13
- -- AlterTable
14
- ALTER TABLE "applicants" ADD COLUMN "income_source_id" TEXT;
15
-
16
- -- DropTable
17
- DROP TABLE "applicant_income_source";
18
-
19
- -- CreateTable
20
- CREATE TABLE "applicant_income_settings" (
21
- "id" TEXT NOT NULL,
22
- "applicant_id" TEXT NOT NULL,
23
- "employment_status_lid" TEXT NOT NULL,
24
- "income_from_employment" BOOLEAN NOT NULL DEFAULT false,
25
- "income_from_pension" BOOLEAN NOT NULL DEFAULT false,
26
- "income_from_property" BOOLEAN NOT NULL DEFAULT false,
27
- "income_from_savings" BOOLEAN NOT NULL DEFAULT false,
28
- "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
29
- "updated_at" TIMESTAMP(3) NOT NULL,
30
-
31
- CONSTRAINT "applicant_income_settings_pkey" PRIMARY KEY ("id")
32
- );
33
-
34
- -- CreateIndex
35
- CREATE UNIQUE INDEX "applicant_income_settings_applicant_id_key" ON "applicant_income_settings"("applicant_id");
36
-
37
- -- CreateIndex
38
- CREATE UNIQUE INDEX "applicant_income_settings_employment_status_lid_key" ON "applicant_income_settings"("employment_status_lid");
39
-
40
- -- AddForeignKey
41
- ALTER TABLE "applicant_income_settings" ADD CONSTRAINT "applicant_income_settings_applicant_id_fkey" FOREIGN KEY ("applicant_id") REFERENCES "applicants"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
42
-
43
- -- AddForeignKey
44
- ALTER TABLE "applicant_income_settings" ADD CONSTRAINT "applicant_income_settings_employment_status_lid_fkey" FOREIGN KEY ("employment_status_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `applicant_income_source` table. If the table is not empty, all the data it contains will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE "applicant_income_source" DROP CONSTRAINT "applicant_income_source_applicant_id_fkey";
9
+
10
+ -- DropForeignKey
11
+ ALTER TABLE "applicant_income_source" DROP CONSTRAINT "applicant_income_source_employment_status_lid_fkey";
12
+
13
+ -- AlterTable
14
+ ALTER TABLE "applicants" ADD COLUMN "income_source_id" TEXT;
15
+
16
+ -- DropTable
17
+ DROP TABLE "applicant_income_source";
18
+
19
+ -- CreateTable
20
+ CREATE TABLE "applicant_income_settings" (
21
+ "id" TEXT NOT NULL,
22
+ "applicant_id" TEXT NOT NULL,
23
+ "employment_status_lid" TEXT NOT NULL,
24
+ "income_from_employment" BOOLEAN NOT NULL DEFAULT false,
25
+ "income_from_pension" BOOLEAN NOT NULL DEFAULT false,
26
+ "income_from_property" BOOLEAN NOT NULL DEFAULT false,
27
+ "income_from_savings" BOOLEAN NOT NULL DEFAULT false,
28
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
29
+ "updated_at" TIMESTAMP(3) NOT NULL,
30
+
31
+ CONSTRAINT "applicant_income_settings_pkey" PRIMARY KEY ("id")
32
+ );
33
+
34
+ -- CreateIndex
35
+ CREATE UNIQUE INDEX "applicant_income_settings_applicant_id_key" ON "applicant_income_settings"("applicant_id");
36
+
37
+ -- CreateIndex
38
+ CREATE UNIQUE INDEX "applicant_income_settings_employment_status_lid_key" ON "applicant_income_settings"("employment_status_lid");
39
+
40
+ -- AddForeignKey
41
+ ALTER TABLE "applicant_income_settings" ADD CONSTRAINT "applicant_income_settings_applicant_id_fkey" FOREIGN KEY ("applicant_id") REFERENCES "applicants"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
42
+
43
+ -- AddForeignKey
44
+ ALTER TABLE "applicant_income_settings" ADD CONSTRAINT "applicant_income_settings_employment_status_lid_fkey" FOREIGN KEY ("employment_status_lid") REFERENCES "lookups"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,11 @@
1
+ -- DropForeignKey
2
+ ALTER TABLE "applicant_income_settings" DROP CONSTRAINT "applicant_income_settings_employment_status_lid_fkey";
3
+
4
+ -- DropIndex
5
+ DROP INDEX "applicant_income_settings_employment_status_lid_key";
6
+
7
+ -- AlterTable
8
+ ALTER TABLE "applicant_income_settings" ALTER COLUMN "employment_status_lid" DROP NOT NULL;
9
+
10
+ -- AddForeignKey
11
+ ALTER TABLE "applicant_income_settings" ADD CONSTRAINT "applicant_income_settings_employment_status_lid_fkey" FOREIGN KEY ("employment_status_lid") REFERENCES "lookups"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -611,7 +611,7 @@ model ApplicantExpenditure {
611
611
  model ApplicantIncomeSettings {
612
612
  id String @id @default(uuid())
613
613
  applicantId String @unique @map("applicant_id")
614
- employmentStatusLid String @unique @map("employment_status_lid")
614
+ employmentStatusLid String? @map("employment_status_lid")
615
615
  incomeFromEmployment Boolean @default(false) @map("income_from_employment")
616
616
  incomeFromPension Boolean @default(false) @map("income_from_pension")
617
617
  incomeFromProperty Boolean @default(false) @map("income_from_property")