efiber-prisma-schema 1.11.5 → 1.11.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efiber-prisma-schema",
3
- "version": "1.11.5",
3
+ "version": "1.11.7",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,5 @@
1
+ -- CreateEnum
2
+ CREATE TYPE "MetricType" AS ENUM ('ProjectInfo', 'NetworkElement', 'NetworkElementAttributes', 'FormulaResult');
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "ReportMetric" ADD COLUMN "metricType" "MetricType";
@@ -65,6 +65,13 @@ enum ChartType {
65
65
  PIE
66
66
  }
67
67
 
68
+ enum MetricType {
69
+ ProjectInfo
70
+ NetworkElement
71
+ NetworkElementAttributes
72
+ FormulaResult
73
+ }
74
+
68
75
  model Country {
69
76
  id String @id @unique @default(uuid())
70
77
  no Int @default(autoincrement())
@@ -1339,7 +1346,7 @@ model Cable {
1339
1346
  cableAttributes CableAtttributes[]
1340
1347
  PboFatAttributes PboFatAttributes[]
1341
1348
  qrCodeTag qrCodeTag[]
1342
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1349
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1343
1350
  clusterId String?
1344
1351
  }
1345
1352
 
@@ -1373,7 +1380,7 @@ model CableTemplate {
1373
1380
  cableAttributes CableAtttributes[]
1374
1381
  qrCodeTemplate qrCodeTemplate[]
1375
1382
  Cable Cable[]
1376
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1383
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1377
1384
  clusterId String?
1378
1385
  }
1379
1386
 
@@ -1444,7 +1451,7 @@ model PboFatTemplate {
1444
1451
  //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase
1445
1452
  qrCodeTemplate qrCodeTemplate[]
1446
1453
  PboFat PboFat[]
1447
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1454
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1448
1455
  clusterId String?
1449
1456
  }
1450
1457
 
@@ -1493,7 +1500,7 @@ model PboFat {
1493
1500
  pboFatAttributes PboFatAttributes[]
1494
1501
  // qrCode qrCode[]
1495
1502
  qrCodeTag qrCodeTag[]
1496
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1503
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1497
1504
  clusterId String?
1498
1505
 
1499
1506
  dependencies PreviousEquipment[]
@@ -2435,6 +2442,8 @@ model ReportMetric {
2435
2442
  elementType NetworkElementChildType?
2436
2443
  attributeName String //Name of the attribute to be reported
2437
2444
 
2445
+ metricType MetricType?
2446
+
2438
2447
  // Aggregation across records
2439
2448
  formula AggregationOperation?
2440
2449
  groupByLevel ProjectLevel?