@dynamatix/gb-schemas 2.0.65 → 2.0.67
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/product-catalogues/product-definition.entity.d.ts +1 -1
- package/dist/entities/product-catalogues/product-definition.entity.d.ts.map +1 -1
- package/dist/entities/product-catalogues/rule.entity.d.ts +3 -3
- package/dist/entities/product-catalogues/rule.entity.d.ts.map +1 -1
- package/entities/product-catalogues/product-definition.entity.ts +1 -1
- package/entities/product-catalogues/rule.entity.ts +3 -3
- package/package.json +1 -1
- package/prisma/migrations/20250521191050_update_product_definition_schema/migration.sql +23 -0
- package/prisma/migrations/20250521192012_update_product_definition_schema/migration.sql +9 -0
- package/prisma/product-catalogues/product-definition.prisma +4 -27
- package/prisma/product-catalogues/rule.prisma +22 -0
- package/prisma/schema.prisma +28 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-definition.entity.d.ts","sourceRoot":"","sources":["../../../entities/product-catalogues/product-definition.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,uBAAuB;IAChC,EAAE,EAAG,MAAM,CAAC;IACZ,mBAAmB,EAAG,MAAM,CAAC;IAC7B,kBAAkB,EAAG,MAAM,CAAC;IAC5B,IAAI,EAAG,MAAM,CAAC;IACd,cAAc,EAAG,
|
|
1
|
+
{"version":3,"file":"product-definition.entity.d.ts","sourceRoot":"","sources":["../../../entities/product-catalogues/product-definition.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,qBAAa,uBAAuB;IAChC,EAAE,EAAG,MAAM,CAAC;IACZ,mBAAmB,EAAG,MAAM,CAAC;IAC7B,kBAAkB,EAAG,MAAM,CAAC;IAC5B,IAAI,EAAG,MAAM,CAAC;IACd,cAAc,EAAG,OAAO,CAAC;IACzB,QAAQ,EAAG,GAAG,EAAE,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;gBAET,OAAO,EAAE,OAAO,CAAC,uBAAuB,CAAC;CAGxD"}
|
|
@@ -6,12 +6,12 @@ export declare class RuleEntity {
|
|
|
6
6
|
name: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
scope?: string;
|
|
9
|
-
mandatory:
|
|
9
|
+
mandatory: boolean;
|
|
10
10
|
overrideRuleType?: string;
|
|
11
11
|
overrideRuleMessage?: string;
|
|
12
12
|
inheritedFrom?: string;
|
|
13
|
-
anyPass:
|
|
14
|
-
preCashflow:
|
|
13
|
+
anyPass: boolean;
|
|
14
|
+
preCashflow: boolean;
|
|
15
15
|
productDefinitionId: string;
|
|
16
16
|
createdAt: Date;
|
|
17
17
|
updatedAt: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule.entity.d.ts","sourceRoot":"","sources":["../../../entities/product-catalogues/rule.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAG,
|
|
1
|
+
{"version":3,"file":"rule.entity.d.ts","sourceRoot":"","sources":["../../../entities/product-catalogues/rule.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAAa,UAAU;IACnB,EAAE,EAAG,MAAM,CAAC;IACZ,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAG,MAAM,CAAC;IACd,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAG,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAG,OAAO,CAAC;IAClB,WAAW,EAAG,OAAO,CAAC;IACtB,mBAAmB,EAAG,MAAM,CAAC;IAC7B,SAAS,EAAG,IAAI,CAAC;IACjB,SAAS,EAAG,IAAI,CAAC;IAGjB,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;gBAEhC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC;CAG3C"}
|
|
@@ -7,12 +7,12 @@ export class RuleEntity {
|
|
|
7
7
|
name!: string;
|
|
8
8
|
description?: string;
|
|
9
9
|
scope?: string;
|
|
10
|
-
mandatory!:
|
|
10
|
+
mandatory!: boolean;
|
|
11
11
|
overrideRuleType?: string;
|
|
12
12
|
overrideRuleMessage?: string;
|
|
13
13
|
inheritedFrom?: string;
|
|
14
|
-
anyPass!:
|
|
15
|
-
preCashflow!:
|
|
14
|
+
anyPass!: boolean;
|
|
15
|
+
preCashflow!: boolean;
|
|
16
16
|
productDefinitionId!: string;
|
|
17
17
|
createdAt!: Date;
|
|
18
18
|
updatedAt!: Date;
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[product_definition_id]` on the table `product_definitions` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
- A unique constraint covering the columns `[rule_id]` on the table `rules` will be added. If there are existing duplicate values, this will fail.
|
|
6
|
+
- Changed the type of `mandatory` on the `rules` 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 `any_pass` on the `rules` 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 `pre_cashflow` on the `rules` 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
|
+
|
|
10
|
+
*/
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "rules" DROP COLUMN "mandatory",
|
|
13
|
+
ADD COLUMN "mandatory" BOOLEAN NOT NULL,
|
|
14
|
+
DROP COLUMN "any_pass",
|
|
15
|
+
ADD COLUMN "any_pass" BOOLEAN NOT NULL,
|
|
16
|
+
DROP COLUMN "pre_cashflow",
|
|
17
|
+
ADD COLUMN "pre_cashflow" BOOLEAN NOT NULL;
|
|
18
|
+
|
|
19
|
+
-- CreateIndex
|
|
20
|
+
CREATE UNIQUE INDEX "product_definitions_product_definition_id_key" ON "product_definitions"("product_definition_id");
|
|
21
|
+
|
|
22
|
+
-- CreateIndex
|
|
23
|
+
CREATE UNIQUE INDEX "rules_rule_id_key" ON "rules"("rule_id");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `at_least_one_pass` on the `product_definitions` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "product_definitions" DROP COLUMN "at_least_one_pass",
|
|
9
|
+
ADD COLUMN "at_least_one_pass" BOOLEAN NOT NULL;
|
|
@@ -1,39 +1,16 @@
|
|
|
1
1
|
model ProductDefinition {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
-
productDefinitionId String @map("product_definition_id")
|
|
3
|
+
productDefinitionId String @unique @map("product_definition_id")
|
|
4
4
|
productCatalogueId String @map("product_catalogue_id")
|
|
5
5
|
name String @map("name")
|
|
6
|
-
atLeastOnePass
|
|
6
|
+
atLeastOnePass Boolean @map("at_least_one_pass")
|
|
7
7
|
elements Json @default("[]") @map("elements")
|
|
8
8
|
createdAt DateTime @default(now()) @map("created_at")
|
|
9
9
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
10
10
|
|
|
11
11
|
// Relations
|
|
12
|
-
productCatalogue
|
|
13
|
-
rules
|
|
12
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
13
|
+
rules Rule[]
|
|
14
14
|
|
|
15
15
|
@@map("product_definitions")
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
model Rule {
|
|
19
|
-
id String @id @default(uuid())
|
|
20
|
-
ruleId String @map("rule_id")
|
|
21
|
-
rule String @map("rule")
|
|
22
|
-
name String @map("name")
|
|
23
|
-
description String? @map("description")
|
|
24
|
-
scope String? @map("scope")
|
|
25
|
-
mandatory String @map("mandatory")
|
|
26
|
-
overrideRuleType String? @map("override_rule_type")
|
|
27
|
-
overrideRuleMessage String? @map("override_rule_message")
|
|
28
|
-
inheritedFrom String? @map("inherited_from")
|
|
29
|
-
anyPass String @map("any_pass")
|
|
30
|
-
preCashflow String @map("pre_cashflow")
|
|
31
|
-
productDefinitionId String @map("product_definition_id")
|
|
32
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
33
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
34
|
-
|
|
35
|
-
// Relations
|
|
36
|
-
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
37
|
-
|
|
38
|
-
@@map("rules")
|
|
39
|
-
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
model Rule {
|
|
2
|
+
id String @id @default(uuid())
|
|
3
|
+
ruleId String @unique @map("rule_id")
|
|
4
|
+
rule String @map("rule")
|
|
5
|
+
name String @map("name")
|
|
6
|
+
description String? @map("description")
|
|
7
|
+
scope String? @map("scope")
|
|
8
|
+
mandatory Boolean @map("mandatory")
|
|
9
|
+
overrideRuleType String? @map("override_rule_type")
|
|
10
|
+
overrideRuleMessage String? @map("override_rule_message")
|
|
11
|
+
inheritedFrom String? @map("inherited_from")
|
|
12
|
+
anyPass Boolean @map("any_pass")
|
|
13
|
+
preCashflow Boolean @map("pre_cashflow")
|
|
14
|
+
productDefinitionId String @map("product_definition_id")
|
|
15
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
16
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
17
|
+
|
|
18
|
+
// Relations
|
|
19
|
+
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
20
|
+
|
|
21
|
+
@@map("rules")
|
|
22
|
+
}
|
package/prisma/schema.prisma
CHANGED
|
@@ -413,42 +413,19 @@ model ProductCatalogue {
|
|
|
413
413
|
// From prisma/product-catalogues/product-definition.prisma
|
|
414
414
|
model ProductDefinition {
|
|
415
415
|
id String @id @default(uuid())
|
|
416
|
-
productDefinitionId String @map("product_definition_id")
|
|
416
|
+
productDefinitionId String @unique @map("product_definition_id")
|
|
417
417
|
productCatalogueId String @map("product_catalogue_id")
|
|
418
418
|
name String @map("name")
|
|
419
|
-
atLeastOnePass
|
|
419
|
+
atLeastOnePass Boolean @map("at_least_one_pass")
|
|
420
420
|
elements Json @default("[]") @map("elements")
|
|
421
421
|
createdAt DateTime @default(now()) @map("created_at")
|
|
422
422
|
updatedAt DateTime @updatedAt @map("updated_at")
|
|
423
423
|
|
|
424
424
|
// Relations
|
|
425
|
-
productCatalogue
|
|
426
|
-
rules
|
|
425
|
+
productCatalogue ProductCatalogue @relation(fields: [productCatalogueId], references: [id])
|
|
426
|
+
rules Rule[]
|
|
427
427
|
|
|
428
428
|
@@map("product_definitions")
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
model Rule {
|
|
432
|
-
id String @id @default(uuid())
|
|
433
|
-
ruleId String @map("rule_id")
|
|
434
|
-
rule String @map("rule")
|
|
435
|
-
name String @map("name")
|
|
436
|
-
description String? @map("description")
|
|
437
|
-
scope String? @map("scope")
|
|
438
|
-
mandatory String @map("mandatory")
|
|
439
|
-
overrideRuleType String? @map("override_rule_type")
|
|
440
|
-
overrideRuleMessage String? @map("override_rule_message")
|
|
441
|
-
inheritedFrom String? @map("inherited_from")
|
|
442
|
-
anyPass String @map("any_pass")
|
|
443
|
-
preCashflow String @map("pre_cashflow")
|
|
444
|
-
productDefinitionId String @map("product_definition_id")
|
|
445
|
-
createdAt DateTime @default(now()) @map("created_at")
|
|
446
|
-
updatedAt DateTime @updatedAt @map("updated_at")
|
|
447
|
-
|
|
448
|
-
// Relations
|
|
449
|
-
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
450
|
-
|
|
451
|
-
@@map("rules")
|
|
452
429
|
}
|
|
453
430
|
|
|
454
431
|
// From prisma/product-catalogues/product-variant.prisma
|
|
@@ -480,6 +457,30 @@ model Product {
|
|
|
480
457
|
@@map("products")
|
|
481
458
|
}
|
|
482
459
|
|
|
460
|
+
// From prisma/product-catalogues/rule.prisma
|
|
461
|
+
model Rule {
|
|
462
|
+
id String @id @default(uuid())
|
|
463
|
+
ruleId String @unique @map("rule_id")
|
|
464
|
+
rule String @map("rule")
|
|
465
|
+
name String @map("name")
|
|
466
|
+
description String? @map("description")
|
|
467
|
+
scope String? @map("scope")
|
|
468
|
+
mandatory Boolean @map("mandatory")
|
|
469
|
+
overrideRuleType String? @map("override_rule_type")
|
|
470
|
+
overrideRuleMessage String? @map("override_rule_message")
|
|
471
|
+
inheritedFrom String? @map("inherited_from")
|
|
472
|
+
anyPass Boolean @map("any_pass")
|
|
473
|
+
preCashflow Boolean @map("pre_cashflow")
|
|
474
|
+
productDefinitionId String @map("product_definition_id")
|
|
475
|
+
createdAt DateTime @default(now()) @map("created_at")
|
|
476
|
+
updatedAt DateTime @updatedAt @map("updated_at")
|
|
477
|
+
|
|
478
|
+
// Relations
|
|
479
|
+
productDefinition ProductDefinition @relation(fields: [productDefinitionId], references: [id])
|
|
480
|
+
|
|
481
|
+
@@map("rules")
|
|
482
|
+
}
|
|
483
|
+
|
|
483
484
|
// From prisma/applicants/applicant-credit-data.prisma
|
|
484
485
|
model ApplicantCreditData {
|
|
485
486
|
id String @id @default(uuid())
|