efiber-prisma-schema 1.11.0 → 1.11.2
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 +1 -1
- package/prisma/schema.prisma +62 -9
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -35,13 +35,30 @@ enum EquipmentType {
|
|
|
35
35
|
FDTSRO
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
enum
|
|
38
|
+
enum AggregationOperation {
|
|
39
39
|
LIST
|
|
40
40
|
SUM
|
|
41
41
|
COUNT
|
|
42
42
|
AVERAGE
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
enum ArithMeticOperation {
|
|
46
|
+
ADD
|
|
47
|
+
SUBTRACT
|
|
48
|
+
MULTIPLY
|
|
49
|
+
DIVIDE
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
enum ReportUsage {
|
|
53
|
+
TABLE
|
|
54
|
+
VISUALIZATION
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
enum ValueFormat {
|
|
58
|
+
PERCENTAGE
|
|
59
|
+
NUMBER
|
|
60
|
+
}
|
|
61
|
+
|
|
45
62
|
enum ChartType {
|
|
46
63
|
BAR
|
|
47
64
|
LINE
|
|
@@ -2404,21 +2421,43 @@ model IntegrationReportTemplate {
|
|
|
2404
2421
|
createdBy User? @relation(fields: [createdById], references: [id])
|
|
2405
2422
|
createdById String?
|
|
2406
2423
|
|
|
2407
|
-
metrics
|
|
2424
|
+
metrics ReportMetric[]
|
|
2408
2425
|
visualizations ReportVisualization[]
|
|
2426
|
+
ReportTable ReportTable[]
|
|
2409
2427
|
}
|
|
2410
2428
|
|
|
2411
2429
|
model ReportMetric {
|
|
2412
2430
|
id String @id @unique @default(uuid())
|
|
2413
2431
|
|
|
2414
|
-
reportTemplate
|
|
2415
|
-
reportTemplateId
|
|
2432
|
+
reportTemplate IntegrationReportTemplate @relation(fields: [reportTemplateId], references: [id])
|
|
2433
|
+
reportTemplateId String
|
|
2416
2434
|
|
|
2417
|
-
elementType
|
|
2418
|
-
attributeName
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2435
|
+
elementType NetworkElementChildType
|
|
2436
|
+
attributeName String //Name of the attribute to be reported
|
|
2437
|
+
|
|
2438
|
+
// Aggregation across records
|
|
2439
|
+
formula AggregationOperation
|
|
2440
|
+
groupByLevel ProjectLevel
|
|
2441
|
+
|
|
2442
|
+
// Formula configuration
|
|
2443
|
+
formulaConfig ReportFormulaConfig?
|
|
2444
|
+
|
|
2445
|
+
// Usage Classification
|
|
2446
|
+
usage ReportUsage[] @default([TABLE])
|
|
2447
|
+
|
|
2448
|
+
visualizations ReportVisualization[]
|
|
2449
|
+
ReportTable ReportTable[]
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
model ReportFormulaConfig {
|
|
2453
|
+
metricId String @id
|
|
2454
|
+
metric ReportMetric @relation(fields: [metricId], references: [id])
|
|
2455
|
+
|
|
2456
|
+
resultName String //Name of the result to be reported
|
|
2457
|
+
numberOfVariables Int //Number of variables in the formula
|
|
2458
|
+
variableAttributes Json //e.g {"variable1": "Client Name", "variable2": "Fat Available Capacity"}
|
|
2459
|
+
operations ArithMeticOperation //e.g {"operation1": "sum", "operation2": "average"}
|
|
2460
|
+
resultFormat ValueFormat @default(NUMBER)
|
|
2422
2461
|
}
|
|
2423
2462
|
|
|
2424
2463
|
model ReportVisualization {
|
|
@@ -2437,3 +2476,17 @@ model ReportVisualization {
|
|
|
2437
2476
|
useCustomColors Boolean @default(false)
|
|
2438
2477
|
customColors Json? //e.g {"red": "#FF0000", "blue": "#0000FF"}
|
|
2439
2478
|
}
|
|
2479
|
+
|
|
2480
|
+
model ReportTable {
|
|
2481
|
+
id String @id @unique @default(uuid())
|
|
2482
|
+
|
|
2483
|
+
templateId String
|
|
2484
|
+
template IntegrationReportTemplate @relation(fields: [templateId], references: [id])
|
|
2485
|
+
|
|
2486
|
+
metricId String
|
|
2487
|
+
metric ReportMetric @relation(fields: [metricId], references: [id])
|
|
2488
|
+
|
|
2489
|
+
columns String[] //e.g ["Client Name", "Fat Available Capacity"]
|
|
2490
|
+
includeHeader Boolean @default(true)
|
|
2491
|
+
sortBy Json? //e.g {"column": "Client Name", "order": "asc"} for sorting the table by a specific column
|
|
2492
|
+
}
|