efiber-prisma-schema 1.6.12 → 1.7.0

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.6.12",
3
+ "version": "1.7.0",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1222,11 +1222,14 @@ model Cable {
1222
1222
  project Project? @relation(fields: [projectId], references: [id])
1223
1223
  projectId String?
1224
1224
 
1225
- cableAttributes CableAtttributes[]
1226
- PboFatAttributes PboFatAttributes[]
1227
- SpliceClosureAttributes SpliceClosureAttributes[]
1225
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1226
+ installationId String?
1227
+
1228
+ cableAttributes CableAtttributes[]
1229
+ PboFatAttributes PboFatAttributes[]
1230
+ // SpliceClosureAttributes SpliceClosureAttributes[]
1228
1231
  // qrCode qrCode[]
1229
- qrCodeTag qrCodeTag[]
1232
+ qrCodeTag qrCodeTag[]
1230
1233
  }
1231
1234
 
1232
1235
  model CableTemplate {
@@ -1363,6 +1366,9 @@ model PboFat {
1363
1366
  project Project? @relation(fields: [projectId], references: [id])
1364
1367
  projectId String?
1365
1368
 
1369
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1370
+ installationId String?
1371
+
1366
1372
  pboFatAttributes PboFatAttributes[]
1367
1373
  // qrCode qrCode[]
1368
1374
  qrCodeTag qrCodeTag[]
@@ -1430,6 +1436,9 @@ model SpliceClosure {
1430
1436
  cluster Cluster? @relation(fields: [clusterId], references: [id])
1431
1437
  clusterId String?
1432
1438
 
1439
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1440
+ installationId String?
1441
+
1433
1442
  spliceClosureAttributes SpliceClosureAttributes[]
1434
1443
  qrCodeTag qrCodeTag[]
1435
1444
  }
@@ -1480,8 +1489,8 @@ model SpliceClosureAttributes {
1480
1489
  updatedAt DateTime @updatedAt
1481
1490
  deletedAt DateTime?
1482
1491
 
1483
- cable Cable? @relation(fields: [cableId], references: [id])
1484
- cableId String?
1492
+ // cable Cable? @relation(fields: [cableId], references: [id])
1493
+ // cableId String?
1485
1494
 
1486
1495
  project Project? @relation(fields: [projectId], references: [id])
1487
1496
  projectId String?
@@ -1527,8 +1536,12 @@ model ZoneNro {
1527
1536
  project Project? @relation(fields: [projectId], references: [id])
1528
1537
  projectId String?
1529
1538
 
1530
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1539
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1531
1540
  clusterId String?
1541
+
1542
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1543
+ installationId String?
1544
+
1532
1545
  qrCodeTag qrCodeTag[]
1533
1546
  }
1534
1547
 
@@ -1597,8 +1610,12 @@ model Pole {
1597
1610
  project Project? @relation(fields: [projectId], references: [id])
1598
1611
  projectId String?
1599
1612
 
1600
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1613
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1601
1614
  clusterId String?
1615
+
1616
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1617
+ installationId String?
1618
+
1602
1619
  qrCodeTag qrCodeTag[]
1603
1620
  }
1604
1621
 
@@ -1666,8 +1683,12 @@ model Manhole {
1666
1683
  project Project? @relation(fields: [projectId], references: [id])
1667
1684
  projectId String?
1668
1685
 
1669
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1686
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1670
1687
  clusterId String?
1688
+
1689
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1690
+ installationId String?
1691
+
1671
1692
  qrCodeTag qrCodeTag[]
1672
1693
  }
1673
1694
 
@@ -1735,8 +1756,12 @@ model Loop {
1735
1756
  project Project? @relation(fields: [projectId], references: [id])
1736
1757
  projectId String?
1737
1758
 
1738
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1759
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1739
1760
  clusterId String?
1761
+
1762
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1763
+ installationId String?
1764
+
1740
1765
  qrCodeTag qrCodeTag[]
1741
1766
  }
1742
1767
 
@@ -1804,8 +1829,12 @@ model FDTSRO {
1804
1829
  project Project? @relation(fields: [projectId], references: [id])
1805
1830
  projectId String?
1806
1831
 
1807
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1832
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1808
1833
  clusterId String?
1834
+
1835
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1836
+ installationId String?
1837
+
1809
1838
  qrCodeTag qrCodeTag[]
1810
1839
  }
1811
1840
 
@@ -1873,8 +1902,12 @@ model SFU {
1873
1902
  project Project? @relation(fields: [projectId], references: [id])
1874
1903
  projectId String?
1875
1904
 
1876
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1905
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1877
1906
  clusterId String?
1907
+
1908
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1909
+ installationId String?
1910
+
1878
1911
  qrCodeTag qrCodeTag[]
1879
1912
  }
1880
1913
 
@@ -1942,8 +1975,12 @@ model Building {
1942
1975
  project Project? @relation(fields: [projectId], references: [id])
1943
1976
  projectId String?
1944
1977
 
1945
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1978
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1946
1979
  clusterId String?
1980
+
1981
+ installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1982
+ installationId String?
1983
+
1947
1984
  qrCodeTag qrCodeTag[]
1948
1985
  }
1949
1986
 
@@ -1980,6 +2017,31 @@ model BuildingTemplate {
1980
2017
  Building Building[]
1981
2018
  }
1982
2019
 
2020
+ model NetworkElementInstallation {
2021
+ id String @id @unique @default(uuid())
2022
+ no Int @default(autoincrement())
2023
+
2024
+ createdAt DateTime @default(now())
2025
+ updatedAt DateTime @updatedAt
2026
+
2027
+ previousType String?
2028
+ previousName String?
2029
+ previousId String?
2030
+ nextType String?
2031
+ nextName String?
2032
+ nextId String?
2033
+ Cable Cable[]
2034
+ PboFat PboFat[]
2035
+ SpliceClosure SpliceClosure[]
2036
+ ZoneNro ZoneNro[]
2037
+ Pole Pole[]
2038
+ Manhole Manhole[]
2039
+ Loop Loop[]
2040
+ FDTSRO FDTSRO[]
2041
+ SFU SFU[]
2042
+ Building Building[]
2043
+ }
2044
+
1983
2045
  model CentralOffice {
1984
2046
  id String @id @unique @default(uuid())
1985
2047
  no Int @default(autoincrement())