efiber-prisma-schema 1.12.1 → 1.12.3

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.12.1",
3
+ "version": "1.12.3",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,59 @@
1
+ -- AlterTable
2
+ ALTER TABLE "Building" ADD COLUMN "files" JSONB;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "BuildingTemplate" ADD COLUMN "files" JSONB;
6
+
7
+ -- AlterTable
8
+ ALTER TABLE "Cable" ADD COLUMN "files" JSONB;
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "CableTemplate" ADD COLUMN "files" JSONB;
12
+
13
+ -- AlterTable
14
+ ALTER TABLE "FDTSRO" ADD COLUMN "files" JSONB;
15
+
16
+ -- AlterTable
17
+ ALTER TABLE "FDTSROTemplate" ADD COLUMN "files" JSONB;
18
+
19
+ -- AlterTable
20
+ ALTER TABLE "Loop" ADD COLUMN "files" JSONB;
21
+
22
+ -- AlterTable
23
+ ALTER TABLE "LoopTemplate" ADD COLUMN "files" JSONB;
24
+
25
+ -- AlterTable
26
+ ALTER TABLE "Manhole" ADD COLUMN "files" JSONB;
27
+
28
+ -- AlterTable
29
+ ALTER TABLE "ManholeTemplate" ADD COLUMN "files" JSONB;
30
+
31
+ -- AlterTable
32
+ ALTER TABLE "PboFat" ADD COLUMN "files" JSONB;
33
+
34
+ -- AlterTable
35
+ ALTER TABLE "PboFatTemplate" ADD COLUMN "files" JSONB;
36
+
37
+ -- AlterTable
38
+ ALTER TABLE "Pole" ADD COLUMN "files" JSONB;
39
+
40
+ -- AlterTable
41
+ ALTER TABLE "PoleTemplate" ADD COLUMN "files" JSONB;
42
+
43
+ -- AlterTable
44
+ ALTER TABLE "SFU" ADD COLUMN "files" JSONB;
45
+
46
+ -- AlterTable
47
+ ALTER TABLE "SFUTemplate" ADD COLUMN "files" JSONB;
48
+
49
+ -- AlterTable
50
+ ALTER TABLE "SpliceClosure" ADD COLUMN "files" JSONB;
51
+
52
+ -- AlterTable
53
+ ALTER TABLE "SpliceClosureTemplate" ADD COLUMN "files" JSONB;
54
+
55
+ -- AlterTable
56
+ ALTER TABLE "ZoneNro" ADD COLUMN "files" JSONB;
57
+
58
+ -- AlterTable
59
+ ALTER TABLE "ZoneNroTemplate" ADD COLUMN "files" JSONB;
@@ -462,6 +462,8 @@ model User {
462
462
  integrationUserLocation integrationUserLocation[]
463
463
  CamusatClient CamusatClient[]
464
464
  IntegrationReportTemplate IntegrationReportTemplate[]
465
+ MapElementTemplate MapElementTemplate[]
466
+ MapElement MapElement[]
465
467
  }
466
468
 
467
469
  model MainProject {
@@ -536,6 +538,9 @@ model Project {
536
538
  SFUTemplate SFUTemplate[]
537
539
  BuildingTemplate BuildingTemplate[]
538
540
  usersOnline integrationProjectUserStatus[]
541
+ MapElementTemplate MapElementTemplate? @relation(fields: [mapElementTemplateId], references: [id])
542
+ mapElementTemplateId String?
543
+ MapElement MapElement[]
539
544
  }
540
545
 
541
546
  model integrationProjectUserStatus {
@@ -1281,12 +1286,12 @@ model ReportFormats {
1281
1286
  }
1282
1287
 
1283
1288
  model NetworkElement {
1284
- id String @id @unique @default(uuid())
1285
- no Int @default(autoincrement())
1286
- type String @unique
1287
- createdAt DateTime @default(now())
1288
- updatedAt DateTime @updatedAt
1289
- deletedAt DateTime?
1289
+ id String @id @unique @default(uuid())
1290
+ no Int @default(autoincrement())
1291
+ type String @unique
1292
+ createdAt DateTime @default(now())
1293
+ updatedAt DateTime @updatedAt
1294
+ deletedAt DateTime?
1290
1295
  classification NetworkElementClassification @default(NetworkElement)
1291
1296
 
1292
1297
  PboFat PboFat[]
@@ -1310,6 +1315,8 @@ model NetworkElement {
1310
1315
  FDTSROTemplate FDTSROTemplate[]
1311
1316
  SFUTemplate SFUTemplate[]
1312
1317
  BuildingTemplate BuildingTemplate[]
1318
+ MapElementTemplate MapElementTemplate[]
1319
+ MapElement MapElement[]
1313
1320
  }
1314
1321
 
1315
1322
  model Cable {
@@ -1321,6 +1328,7 @@ model Cable {
1321
1328
  terminalAccess Boolean @default(false)
1322
1329
  photos Json? //Upload files for photos
1323
1330
  texts Json? //Add text attributes to the cable
1331
+ files Json? //Upload files for the cable
1324
1332
  zone Json? //Color code for zone
1325
1333
  geometry Json? //Icon for the cable
1326
1334
  attributes Json? //Attributes for the cable
@@ -1366,6 +1374,7 @@ model CableTemplate {
1366
1374
  name String?
1367
1375
  terminalAccess Boolean @default(false)
1368
1376
  photos Json? //Upload files for photos
1377
+ files Json? //Upload files for the cable
1369
1378
  texts Json? //Add text attributes to the cable
1370
1379
  zone Json? //Color code for zone
1371
1380
  geometry Json? //Icon for the cable
@@ -1438,6 +1447,7 @@ model PboFatTemplate {
1438
1447
  name String?
1439
1448
  photos Json? //Upload files for photos
1440
1449
  texts Json? //Add text attributes to the PBO FAT
1450
+ files Json? //Upload files for the PBO FAT
1441
1451
  zone Json? //Color code for zone
1442
1452
  geometry Json? //Icon for the PBO FAT
1443
1453
  attributes Json? //Attributes for the PBO FAT
@@ -1474,6 +1484,7 @@ model PboFat {
1474
1484
  name String?
1475
1485
  photos Json? //Upload files for photos
1476
1486
  texts Json? //Add text attributes to the PBO FAT
1487
+ files Json? //Upload files for the PBO FAT
1477
1488
  zone Json? //Color code for zone
1478
1489
  geometry Json? //Icon for the PBO FAT
1479
1490
  attributes Json? //Attributes for the PBO FAT
@@ -1554,6 +1565,7 @@ model SpliceClosure {
1554
1565
  terminalAccess Boolean @default(false)
1555
1566
  photos Json? //Upload files for photos
1556
1567
  texts Json? //Add text attributes to the PBO FAT
1568
+ files Json? //Upload files for the PBO FAT
1557
1569
  zone Json? //Color code for zone
1558
1570
  geometry Json? //Icon for the PBO FAT
1559
1571
  attributes Json? //Attributes for the PBO FAT
@@ -1602,6 +1614,7 @@ model SpliceClosureTemplate {
1602
1614
  terminalAccess Boolean @default(false)
1603
1615
  photos Json? //Upload files for photos
1604
1616
  texts Json? //Add text attributes to the PBO FAT
1617
+ files Json? //Upload files for the PBO FAT
1605
1618
  zone Json? //Color code for zone
1606
1619
  geometry Json? //Icon for the PBO FAT
1607
1620
  attributes Json? //Attributes for the PBO FAT
@@ -1663,6 +1676,7 @@ model ZoneNro {
1663
1676
  name String?
1664
1677
  photos Json?
1665
1678
  texts Json? //Add text attributes to the zone
1679
+ files Json? //Upload files for the zone
1666
1680
  zone Json?
1667
1681
  geometry Json?
1668
1682
  attributes Json?
@@ -1708,6 +1722,7 @@ model ZoneNroTemplate {
1708
1722
  name String?
1709
1723
  photos Json?
1710
1724
  texts Json? //Add text attributes to the zone
1725
+ files Json? //Upload files for the zone
1711
1726
  zone Json?
1712
1727
  geometry Json?
1713
1728
  attributes Json?
@@ -1742,6 +1757,7 @@ model Pole {
1742
1757
  name String?
1743
1758
  photos Json?
1744
1759
  texts Json? //Add text attributes to the pole
1760
+ files Json? //Upload files for the pole
1745
1761
  zone Json?
1746
1762
  geometry Json?
1747
1763
  attributes Json?
@@ -1784,6 +1800,7 @@ model PoleTemplate {
1784
1800
  name String?
1785
1801
  photos Json?
1786
1802
  texts Json? //Add text attributes to the pole
1803
+ files Json? //Upload files for the pole
1787
1804
  zone Json?
1788
1805
  geometry Json?
1789
1806
  attributes Json?
@@ -1817,6 +1834,7 @@ model Manhole {
1817
1834
  name String?
1818
1835
  photos Json?
1819
1836
  texts Json? //Add text attributes to the manhole
1837
+ files Json? //Upload files for the manhole
1820
1838
  zone Json?
1821
1839
  geometry Json?
1822
1840
  attributes Json?
@@ -1859,6 +1877,7 @@ model ManholeTemplate {
1859
1877
  name String?
1860
1878
  photos Json?
1861
1879
  texts Json? //Add text attributes to the manhole
1880
+ files Json? //Upload files for the manhole
1862
1881
  zone Json?
1863
1882
  geometry Json?
1864
1883
  attributes Json?
@@ -1892,6 +1911,7 @@ model Loop {
1892
1911
  name String?
1893
1912
  photos Json?
1894
1913
  texts Json? //Add text attributes to the loop
1914
+ files Json? //Upload files for the loop
1895
1915
  zone Json?
1896
1916
  geometry Json?
1897
1917
  attributes Json?
@@ -1934,6 +1954,7 @@ model LoopTemplate {
1934
1954
  name String?
1935
1955
  photos Json?
1936
1956
  texts Json? //Add text attributes to the loop
1957
+ files Json? //Upload files for the loop
1937
1958
  zone Json?
1938
1959
  geometry Json?
1939
1960
  attributes Json?
@@ -1967,6 +1988,7 @@ model FDTSRO {
1967
1988
  name String?
1968
1989
  photos Json?
1969
1990
  texts Json? //Add text attributes to the FDTSRO
1991
+ files Json? //Upload files for the FDTSRO
1970
1992
  zone Json?
1971
1993
  geometry Json?
1972
1994
  attributes Json?
@@ -2013,6 +2035,7 @@ model FDTSROTemplate {
2013
2035
  name String?
2014
2036
  photos Json?
2015
2037
  texts Json? //Add text attributes to the FDTSRO
2038
+ files Json? //Upload files for the FDTSRO
2016
2039
  zone Json?
2017
2040
  geometry Json?
2018
2041
  attributes Json?
@@ -2046,6 +2069,7 @@ model SFU {
2046
2069
  name String?
2047
2070
  photos Json?
2048
2071
  texts Json? //Add text attributes to the SFU
2072
+ files Json? //Upload files for the SFU
2049
2073
  zone Json?
2050
2074
  geometry Json?
2051
2075
  attributes Json?
@@ -2089,6 +2113,7 @@ model SFUTemplate {
2089
2113
  name String?
2090
2114
  photos Json?
2091
2115
  texts Json? //Add text attributes to the SFU
2116
+ files Json? //Upload files for the SFU
2092
2117
  zone Json?
2093
2118
  geometry Json?
2094
2119
  attributes Json?
@@ -2122,6 +2147,7 @@ model Building {
2122
2147
  name String?
2123
2148
  photos Json?
2124
2149
  texts Json? //Add text attributes to the building
2150
+ files Json? //Upload files for the building
2125
2151
  zone Json?
2126
2152
  geometry Json?
2127
2153
  attributes Json?
@@ -2170,6 +2196,7 @@ model BuildingTemplate {
2170
2196
  name String?
2171
2197
  photos Json?
2172
2198
  texts Json? //Add text attributes to the building
2199
+ files Json? //Upload files for the building
2173
2200
  zone Json?
2174
2201
  geometry Json?
2175
2202
  attributes Json?
@@ -2194,6 +2221,74 @@ model BuildingTemplate {
2194
2221
  Building Building[]
2195
2222
  }
2196
2223
 
2224
+ model MapElementTemplate {
2225
+ id String @id @unique @default(uuid())
2226
+ no Int @default(autoincrement())
2227
+
2228
+ status String @default("active")
2229
+ name String?
2230
+ photos Json? //Upload files for photos
2231
+ texts Json? //Add text attributes to the map element
2232
+ files Json? //Upload files for the map element
2233
+ zone Json? //Color code for zone
2234
+ geometry Json? //Icon for the map element
2235
+
2236
+ createdAt DateTime @default(now())
2237
+ updatedAt DateTime @updatedAt
2238
+ deletedAt DateTime?
2239
+
2240
+ updatedBy User? @relation(fields: [updatedById], references: [id])
2241
+ updatedById String?
2242
+
2243
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2244
+ networkElementId String
2245
+
2246
+ projects Project[]
2247
+
2248
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
2249
+ clusterId String?
2250
+ qrCodeTemplate qrCodeTemplate[]
2251
+ MapElement MapElement[]
2252
+ }
2253
+
2254
+ model MapElement {
2255
+ id String @id @unique @default(uuid())
2256
+ no Int @default(autoincrement())
2257
+
2258
+ status String @default("active")
2259
+ name String?
2260
+ photos Json? //Upload files for photos
2261
+ texts Json? //Add text attributes to the map element
2262
+ files Json? //Upload files for the map element
2263
+ zone Json? //Color code for zone
2264
+ geometry Json? //Icon for the map element
2265
+ coordinates Json?
2266
+ autoincrement Boolean @default(true)
2267
+ namePrefix String?
2268
+ templateIndex Int?
2269
+
2270
+ createdAt DateTime @default(now())
2271
+ updatedAt DateTime @updatedAt
2272
+ deletedAt DateTime?
2273
+
2274
+ updatedBy User? @relation(fields: [updatedById], references: [id])
2275
+ updatedById String?
2276
+
2277
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2278
+ networkElementId String
2279
+
2280
+ template MapElementTemplate? @relation(fields: [templateId], references: [id])
2281
+ templateId String?
2282
+
2283
+ project Project? @relation(fields: [projectId], references: [id])
2284
+ projectId String?
2285
+
2286
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
2287
+ clusterId String?
2288
+
2289
+ qrCodeTag qrCodeTag[]
2290
+ }
2291
+
2197
2292
  model NetworkElementInstallation {
2198
2293
  id String @id @unique @default(uuid())
2199
2294
  no Int @default(autoincrement())
@@ -2277,6 +2372,8 @@ model Cluster {
2277
2372
  usersOnline integrationProjectUserStatus[]
2278
2373
  qrCodeTemplate qrCodeTemplate[]
2279
2374
  integrationUserLocation integrationUserLocation[]
2375
+ MapElementTemplate MapElementTemplate[]
2376
+ MapElement MapElement[]
2280
2377
  }
2281
2378
 
2282
2379
  model qrCodeTemplate {
@@ -2339,7 +2436,9 @@ model qrCodeTemplate {
2339
2436
 
2340
2437
  // cable Cable? @relation(fields: [networkElementId], references: [id])
2341
2438
  // pboFat PboFat? @relation(fields: [networkElementId], references: [id])
2342
- qrCodeTag qrCodeTag[]
2439
+ qrCodeTag qrCodeTag[]
2440
+ MapElementTemplate MapElementTemplate? @relation(fields: [mapElementTemplateId], references: [id])
2441
+ mapElementTemplateId String?
2343
2442
  }
2344
2443
 
2345
2444
  model qrCodeTag {
@@ -2387,8 +2486,10 @@ model qrCodeTag {
2387
2486
  sfu SFU? @relation(fields: [sfuId], references: [id])
2388
2487
  sfuId String?
2389
2488
 
2390
- building Building? @relation(fields: [buildingId], references: [id])
2391
- buildingId String?
2489
+ building Building? @relation(fields: [buildingId], references: [id])
2490
+ buildingId String?
2491
+ MapElement MapElement? @relation(fields: [mapElementId], references: [id])
2492
+ mapElementId String?
2392
2493
  }
2393
2494
 
2394
2495
  model installationSequence {
@@ -2469,7 +2570,7 @@ model ReportMetric {
2469
2570
  elementType NetworkElementChildType?
2470
2571
  attributeName String //Name of the attribute to be reported
2471
2572
 
2472
- metricType MetricType?
2573
+ metricType MetricType?
2473
2574
 
2474
2575
  // Aggregation across records
2475
2576
  formula AggregationOperation?
@@ -2481,7 +2582,7 @@ model ReportMetric {
2481
2582
  // Usage Classification
2482
2583
  usage ReportUsage[] @default([TABLE])
2483
2584
 
2484
- ReportTable ReportTable[]
2585
+ ReportTable ReportTable[]
2485
2586
  }
2486
2587
 
2487
2588
  model ReportFormulaConfig {