@dynamatix/gb-schemas 2.0.62 → 2.0.64
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/entities/applicants/applicant-income-settings.entity.d.ts +1 -1
- package/dist/entities/applicants/applicant-income-settings.entity.d.ts.map +1 -1
- package/dist/entities/product-catalogues/product-catalogue.entity.d.ts +6 -6
- package/dist/entities/product-catalogues/product-catalogue.entity.d.ts.map +1 -1
- package/entities/applicants/applicant-income-settings.entity.ts +1 -1
- package/entities/product-catalogues/product-catalogue.entity.ts +6 -6
- package/package.json +1 -1
- package/prisma/applicants/applicant-income-settings.prisma +1 -1
- package/prisma/migrations/20250519181411_update_applicant_income_schema/migration.sql +65 -65
- package/prisma/migrations/20250520030945_update_income_settings_schema/migration.sql +44 -44
- package/prisma/migrations/20250520061455_update_income_settings_schema/migration.sql +11 -0
- package/prisma/migrations/20250521173204_update_product_catalogue_schema/migration.sql +28 -0
- package/prisma/product-catalogues/product-catalogue.prisma +15 -15
- package/prisma/schema.prisma +15 -15
|
@@ -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
|
|
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,
|
|
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"}
|
|
@@ -5,13 +5,13 @@ export declare class ProductCatalogueEntity {
|
|
|
5
5
|
productCatalogueId: string;
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
8
|
-
applyFrom:
|
|
9
|
-
applyUntil:
|
|
10
|
-
submitUntil:
|
|
11
|
-
status:
|
|
12
|
-
lockedForEdit:
|
|
8
|
+
applyFrom: Date;
|
|
9
|
+
applyUntil: Date;
|
|
10
|
+
submitUntil: Date;
|
|
11
|
+
status: number;
|
|
12
|
+
lockedForEdit: boolean;
|
|
13
13
|
baseRateName?: string;
|
|
14
|
-
baseRate?:
|
|
14
|
+
baseRate?: number;
|
|
15
15
|
mapperName?: string;
|
|
16
16
|
createdAt: Date;
|
|
17
17
|
updatedAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-catalogue.entity.d.ts","sourceRoot":"","sources":["../../../entities/product-catalogues/product-catalogue.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAAa,sBAAsB;IAC/B,EAAE,EAAG,MAAM,CAAC;IACZ,kBAAkB,EAAG,MAAM,CAAC;IAC5B,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAG,
|
|
1
|
+
{"version":3,"file":"product-catalogue.entity.d.ts","sourceRoot":"","sources":["../../../entities/product-catalogues/product-catalogue.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,qBAAa,sBAAsB;IAC/B,EAAE,EAAG,MAAM,CAAC;IACZ,kBAAkB,EAAG,MAAM,CAAC;IAC5B,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAG,IAAI,CAAC;IACjB,UAAU,EAAG,IAAI,CAAC;IAClB,WAAW,EAAG,IAAI,CAAC;IACnB,MAAM,EAAG,MAAM,CAAC;IAChB,aAAa,EAAG,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,kBAAkB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC/C,eAAe,CAAC,EAAE,oBAAoB,EAAE,CAAC;gBAE7B,OAAO,EAAE,OAAO,CAAC,sBAAsB,CAAC;CAGvD"}
|
|
@@ -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
|
|
7
|
+
employmentStatusLid?: string;
|
|
8
8
|
incomeFromEmployment?: boolean;
|
|
9
9
|
incomeFromPension?: boolean;
|
|
10
10
|
incomeFromProperty?: boolean;
|
|
@@ -6,13 +6,13 @@ export class ProductCatalogueEntity {
|
|
|
6
6
|
productCatalogueId!: string;
|
|
7
7
|
name!: string;
|
|
8
8
|
description?: string;
|
|
9
|
-
applyFrom!:
|
|
10
|
-
applyUntil!:
|
|
11
|
-
submitUntil!:
|
|
12
|
-
status!:
|
|
13
|
-
lockedForEdit!:
|
|
9
|
+
applyFrom!: Date;
|
|
10
|
+
applyUntil!: Date;
|
|
11
|
+
submitUntil!: Date;
|
|
12
|
+
status!: number;
|
|
13
|
+
lockedForEdit!: boolean;
|
|
14
14
|
baseRateName?: string;
|
|
15
|
-
baseRate?:
|
|
15
|
+
baseRate?: number;
|
|
16
16
|
mapperName?: string;
|
|
17
17
|
createdAt!: Date;
|
|
18
18
|
updatedAt!: Date;
|
package/package.json
CHANGED
|
@@ -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
|
|
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;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `base_rate` column on the `product_catalogues` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
- A unique constraint covering the columns `[product_catalogue_id]` on the table `product_catalogues` will be added. If there are existing duplicate values, this will fail.
|
|
6
|
+
- Changed the type of `apply_from` on the `product_catalogues` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
7
|
+
- Changed the type of `apply_until` on the `product_catalogues` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
8
|
+
- Changed the type of `submit_until` on the `product_catalogues` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
9
|
+
- Changed the type of `status` on the `product_catalogues` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
10
|
+
- Changed the type of `locked_for_edit` on the `product_catalogues` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
11
|
+
|
|
12
|
+
*/
|
|
13
|
+
-- AlterTable
|
|
14
|
+
ALTER TABLE "product_catalogues" DROP COLUMN "apply_from",
|
|
15
|
+
ADD COLUMN "apply_from" TIMESTAMP(3) NOT NULL,
|
|
16
|
+
DROP COLUMN "apply_until",
|
|
17
|
+
ADD COLUMN "apply_until" TIMESTAMP(3) NOT NULL,
|
|
18
|
+
DROP COLUMN "submit_until",
|
|
19
|
+
ADD COLUMN "submit_until" TIMESTAMP(3) NOT NULL,
|
|
20
|
+
DROP COLUMN "status",
|
|
21
|
+
ADD COLUMN "status" INTEGER NOT NULL,
|
|
22
|
+
DROP COLUMN "locked_for_edit",
|
|
23
|
+
ADD COLUMN "locked_for_edit" BOOLEAN NOT NULL,
|
|
24
|
+
DROP COLUMN "base_rate",
|
|
25
|
+
ADD COLUMN "base_rate" DOUBLE PRECISION;
|
|
26
|
+
|
|
27
|
+
-- CreateIndex
|
|
28
|
+
CREATE UNIQUE INDEX "product_catalogues_product_catalogue_id_key" ON "product_catalogues"("product_catalogue_id");
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
model ProductCatalogue {
|
|
2
|
-
id
|
|
3
|
-
productCatalogueId String @map("product_catalogue_id")
|
|
4
|
-
name
|
|
5
|
-
description
|
|
6
|
-
applyFrom
|
|
7
|
-
applyUntil
|
|
8
|
-
submitUntil
|
|
9
|
-
status
|
|
10
|
-
lockedForEdit
|
|
11
|
-
baseRateName
|
|
12
|
-
baseRate
|
|
13
|
-
mapperName
|
|
14
|
-
createdAt
|
|
15
|
-
updatedAt
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
productCatalogueId String @unique @map("product_catalogue_id")
|
|
4
|
+
name String @map("name")
|
|
5
|
+
description String? @map("description")
|
|
6
|
+
applyFrom DateTime @map("apply_from")
|
|
7
|
+
applyUntil DateTime @map("apply_until")
|
|
8
|
+
submitUntil DateTime @map("submit_until")
|
|
9
|
+
status Int @map("status")
|
|
10
|
+
lockedForEdit Boolean @map("locked_for_edit")
|
|
11
|
+
baseRateName String? @map("base_rate_name")
|
|
12
|
+
baseRate Float? @map("base_rate")
|
|
13
|
+
mapperName String? @map("mapper_name")
|
|
14
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
15
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
16
16
|
|
|
17
17
|
// Relations
|
|
18
18
|
productDefinitions ProductDefinition[]
|
|
19
19
|
productVariants ProductVariant[]
|
|
20
20
|
|
|
21
21
|
@@map("product_catalogues")
|
|
22
|
-
}
|
|
22
|
+
}
|
package/prisma/schema.prisma
CHANGED
|
@@ -388,20 +388,20 @@ model User {
|
|
|
388
388
|
|
|
389
389
|
// From prisma/product-catalogues/product-catalogue.prisma
|
|
390
390
|
model ProductCatalogue {
|
|
391
|
-
id
|
|
392
|
-
productCatalogueId String @map("product_catalogue_id")
|
|
393
|
-
name
|
|
394
|
-
description
|
|
395
|
-
applyFrom
|
|
396
|
-
applyUntil
|
|
397
|
-
submitUntil
|
|
398
|
-
status
|
|
399
|
-
lockedForEdit
|
|
400
|
-
baseRateName
|
|
401
|
-
baseRate
|
|
402
|
-
mapperName
|
|
403
|
-
createdAt
|
|
404
|
-
updatedAt
|
|
391
|
+
id String @id @default(uuid())
|
|
392
|
+
productCatalogueId String @unique @map("product_catalogue_id")
|
|
393
|
+
name String @map("name")
|
|
394
|
+
description String? @map("description")
|
|
395
|
+
applyFrom DateTime @map("apply_from")
|
|
396
|
+
applyUntil DateTime @map("apply_until")
|
|
397
|
+
submitUntil DateTime @map("submit_until")
|
|
398
|
+
status Int @map("status")
|
|
399
|
+
lockedForEdit Boolean @map("locked_for_edit")
|
|
400
|
+
baseRateName String? @map("base_rate_name")
|
|
401
|
+
baseRate Float? @map("base_rate")
|
|
402
|
+
mapperName String? @map("mapper_name")
|
|
403
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
404
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
405
405
|
|
|
406
406
|
// Relations
|
|
407
407
|
productDefinitions ProductDefinition[]
|
|
@@ -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
|
|
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")
|