efiber-prisma-schema 1.10.14 → 1.11.1
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 +107 -0
package/package.json
CHANGED
package/prisma/schema.prisma
CHANGED
|
@@ -7,6 +7,15 @@ datasource db {
|
|
|
7
7
|
url = env("DATABASE_URL")
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
enum ProjectLevel {
|
|
11
|
+
Subsidiary
|
|
12
|
+
Client
|
|
13
|
+
MainProject
|
|
14
|
+
Project
|
|
15
|
+
CentralOffice
|
|
16
|
+
Cluster
|
|
17
|
+
}
|
|
18
|
+
|
|
10
19
|
enum NetworkElementChildType {
|
|
11
20
|
PboFat
|
|
12
21
|
Cable
|
|
@@ -26,6 +35,19 @@ enum EquipmentType {
|
|
|
26
35
|
FDTSRO
|
|
27
36
|
}
|
|
28
37
|
|
|
38
|
+
enum FormulaOperation {
|
|
39
|
+
LIST
|
|
40
|
+
SUM
|
|
41
|
+
COUNT
|
|
42
|
+
AVERAGE
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
enum ChartType {
|
|
46
|
+
BAR
|
|
47
|
+
LINE
|
|
48
|
+
PIE
|
|
49
|
+
}
|
|
50
|
+
|
|
29
51
|
model Country {
|
|
30
52
|
id String @id @unique @default(uuid())
|
|
31
53
|
no Int @default(autoincrement())
|
|
@@ -409,6 +431,7 @@ model User {
|
|
|
409
431
|
integrationProjectUserStatus integrationProjectUserStatus[]
|
|
410
432
|
integrationUserLocation integrationUserLocation[]
|
|
411
433
|
CamusatClient CamusatClient[]
|
|
434
|
+
IntegrationReportTemplate IntegrationReportTemplate[]
|
|
412
435
|
}
|
|
413
436
|
|
|
414
437
|
model MainProject {
|
|
@@ -1274,6 +1297,9 @@ model Cable {
|
|
|
1274
1297
|
namePrefix String?
|
|
1275
1298
|
templateIndex Int?
|
|
1276
1299
|
|
|
1300
|
+
// Reporting mirrors
|
|
1301
|
+
cableLength Float? //Length of the cable in meters
|
|
1302
|
+
|
|
1277
1303
|
createdAt DateTime @default(now())
|
|
1278
1304
|
updatedAt DateTime @updatedAt
|
|
1279
1305
|
deletedAt DateTime?
|
|
@@ -1421,6 +1447,11 @@ model PboFat {
|
|
|
1421
1447
|
namePrefix String?
|
|
1422
1448
|
templateIndex Int?
|
|
1423
1449
|
|
|
1450
|
+
// Reporting mirrors
|
|
1451
|
+
fatMaxCapacity Int? //Maximum capacity of the PBO FAT
|
|
1452
|
+
fatExistingSubscribers Int? //Existing subscribers in the PBO FAT
|
|
1453
|
+
fatAvailableCapacity Int? //Available capacity in the PBO FAT
|
|
1454
|
+
|
|
1424
1455
|
createdAt DateTime @default(now())
|
|
1425
1456
|
updatedAt DateTime @updatedAt
|
|
1426
1457
|
deletedAt DateTime?
|
|
@@ -1496,6 +1527,9 @@ model SpliceClosure {
|
|
|
1496
1527
|
namePrefix String?
|
|
1497
1528
|
templateIndex Int?
|
|
1498
1529
|
|
|
1530
|
+
// Reporting mirrors
|
|
1531
|
+
spliceClosureMaxCapacity Int? //Maximum capacity of the Splice Closure
|
|
1532
|
+
|
|
1499
1533
|
createdAt DateTime @default(now())
|
|
1500
1534
|
updatedAt DateTime @updatedAt
|
|
1501
1535
|
updatedBy User? @relation(fields: [updatedById], references: [id])
|
|
@@ -1599,6 +1633,9 @@ model ZoneNro {
|
|
|
1599
1633
|
namePrefix String?
|
|
1600
1634
|
templateIndex Int?
|
|
1601
1635
|
|
|
1636
|
+
// Reporting mirrors
|
|
1637
|
+
zoneHouseCount Int? //Number of houses in the zone
|
|
1638
|
+
|
|
1602
1639
|
createdAt DateTime @default(now())
|
|
1603
1640
|
updatedAt DateTime @updatedAt
|
|
1604
1641
|
deletedAt DateTime?
|
|
@@ -1892,6 +1929,9 @@ model FDTSRO {
|
|
|
1892
1929
|
namePrefix String?
|
|
1893
1930
|
templateIndex Int?
|
|
1894
1931
|
|
|
1932
|
+
// Reporting mirrors
|
|
1933
|
+
fdtsroMaxCapacity Int? //Maximum capacity of the FDTSRO
|
|
1934
|
+
|
|
1895
1935
|
createdAt DateTime @default(now())
|
|
1896
1936
|
updatedAt DateTime @updatedAt
|
|
1897
1937
|
deletedAt DateTime?
|
|
@@ -2040,6 +2080,11 @@ model Building {
|
|
|
2040
2080
|
namePrefix String?
|
|
2041
2081
|
templateIndex Int?
|
|
2042
2082
|
|
|
2083
|
+
// Reporting mirrors
|
|
2084
|
+
totalFlats Int? //Total number of flats in the building
|
|
2085
|
+
floorCount Int? //Number of floors in the building
|
|
2086
|
+
flatsPerFloor Int? //Number of flats per floor
|
|
2087
|
+
|
|
2043
2088
|
createdAt DateTime @default(now())
|
|
2044
2089
|
updatedAt DateTime @updatedAt
|
|
2045
2090
|
deletedAt DateTime?
|
|
@@ -2346,3 +2391,65 @@ model integrationUserLocation {
|
|
|
2346
2391
|
updatedAt DateTime @updatedAt
|
|
2347
2392
|
deletedAt DateTime?
|
|
2348
2393
|
}
|
|
2394
|
+
|
|
2395
|
+
model IntegrationReportTemplate {
|
|
2396
|
+
id String @id @unique @default(uuid())
|
|
2397
|
+
no Int @default(autoincrement())
|
|
2398
|
+
name String
|
|
2399
|
+
|
|
2400
|
+
createdAt DateTime @default(now())
|
|
2401
|
+
updatedAt DateTime @updatedAt
|
|
2402
|
+
deletedAt DateTime?
|
|
2403
|
+
|
|
2404
|
+
createdBy User? @relation(fields: [createdById], references: [id])
|
|
2405
|
+
createdById String?
|
|
2406
|
+
|
|
2407
|
+
metrics ReportMetric[]
|
|
2408
|
+
visualizations ReportVisualization[]
|
|
2409
|
+
ReportTable ReportTable[]
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
model ReportMetric {
|
|
2413
|
+
id String @id @unique @default(uuid())
|
|
2414
|
+
|
|
2415
|
+
reportTemplate IntegrationReportTemplate @relation(fields: [reportTemplateId], references: [id])
|
|
2416
|
+
reportTemplateId String
|
|
2417
|
+
|
|
2418
|
+
elementType NetworkElementChildType
|
|
2419
|
+
attributeName String //Name of the attribute to be reported
|
|
2420
|
+
formula FormulaOperation
|
|
2421
|
+
groupByLevel ProjectLevel
|
|
2422
|
+
visualizations ReportVisualization[]
|
|
2423
|
+
ReportTable ReportTable[]
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
model ReportVisualization {
|
|
2427
|
+
id String @id @unique @default(uuid())
|
|
2428
|
+
|
|
2429
|
+
template IntegrationReportTemplate @relation(fields: [templateId], references: [id])
|
|
2430
|
+
templateId String
|
|
2431
|
+
|
|
2432
|
+
metric ReportMetric @relation(fields: [metricId], references: [id])
|
|
2433
|
+
metricId String
|
|
2434
|
+
|
|
2435
|
+
chartType ChartType
|
|
2436
|
+
xAxisField String? //e.g "Client Name"
|
|
2437
|
+
yAxisField String? //e.g "Fat Available Capacity"
|
|
2438
|
+
|
|
2439
|
+
useCustomColors Boolean @default(false)
|
|
2440
|
+
customColors Json? //e.g {"red": "#FF0000", "blue": "#0000FF"}
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
model ReportTable {
|
|
2444
|
+
id String @id @unique @default(uuid())
|
|
2445
|
+
|
|
2446
|
+
templateId String
|
|
2447
|
+
template IntegrationReportTemplate @relation(fields: [templateId], references: [id])
|
|
2448
|
+
|
|
2449
|
+
metricId String
|
|
2450
|
+
metric ReportMetric @relation(fields: [metricId], references: [id])
|
|
2451
|
+
|
|
2452
|
+
columns String[] //e.g ["Client Name", "Fat Available Capacity"]
|
|
2453
|
+
includeHeader Boolean @default(true)
|
|
2454
|
+
sortBy Json? //e.g {"column": "Client Name", "order": "asc"} for sorting the table by a specific column
|
|
2455
|
+
}
|