@dynamatix/gb-schemas 2.0.64 → 2.0.66
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-variant.entity.d.ts +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-variant.entity.ts +1 -1
- package/entities/product-catalogues/rule.entity.ts +3 -3
- package/package.json +1 -1
- package/prisma/migrations/20250521180300_update_product_variant_schema/migration.sql +8 -0
- package/prisma/migrations/20250521191050_update_product_definition_schema/migration.sql +23 -0
- package/prisma/product-catalogues/product-definition.prisma +2 -25
- package/prisma/product-catalogues/product-variant.prisma +1 -1
- package/prisma/product-catalogues/rule.prisma +22 -0
- package/prisma/schema.prisma +26 -25
|
@@ -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,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- A unique constraint covering the columns `[variant_id]` on the table `product_variants` will be added. If there are existing duplicate values, this will fail.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- CreateIndex
|
|
8
|
+
CREATE UNIQUE INDEX "product_variants_variant_id_key" ON "product_variants"("variant_id");
|
|
@@ -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");
|
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
atLeastOnePass String @map("at_least_one_pass")
|
|
@@ -13,27 +13,4 @@ model ProductDefinition {
|
|
|
13
13
|
rules Rule[]
|
|
14
14
|
|
|
15
15
|
@@map("product_definitions")
|
|
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
|
-
}
|
|
16
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
model ProductVariant {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
3
|
productCatalogueId String @map("product_catalogue_id")
|
|
4
|
-
|
|
4
|
+
variantId String @unique @map("variant_id")
|
|
5
5
|
name String @map("name")
|
|
6
6
|
variantCode String @map("variant_code")
|
|
7
7
|
label String? @map("label")
|
|
@@ -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,7 +413,7 @@ 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
419
|
atLeastOnePass String @map("at_least_one_pass")
|
|
@@ -426,36 +426,13 @@ model ProductDefinition {
|
|
|
426
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
|
|
455
432
|
model ProductVariant {
|
|
456
433
|
id String @id @default(uuid())
|
|
457
434
|
productCatalogueId String @map("product_catalogue_id")
|
|
458
|
-
|
|
435
|
+
variantId String @unique @map("variant_id")
|
|
459
436
|
name String @map("name")
|
|
460
437
|
variantCode String @map("variant_code")
|
|
461
438
|
label String? @map("label")
|
|
@@ -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())
|