efiber-prisma-schema 1.6.5 → 1.6.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.6.5",
3
+ "version": "1.6.7",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -442,7 +442,7 @@ model Project {
442
442
  Cable Cable[]
443
443
  CableTemplate CableTemplate[]
444
444
  CentralOffice CentralOffice[]
445
- qrCode qrCode[]
445
+ qrCodeTemplate qrCodeTemplate[]
446
446
  projectPhaseLog projectPhaseLog[]
447
447
  ZoneNro ZoneNro[]
448
448
  Pole Pole[]
@@ -1172,7 +1172,7 @@ model NetworkElement {
1172
1172
  Cable Cable[]
1173
1173
  SpliceClosure SpliceClosure[]
1174
1174
  CableTemplate CableTemplate[]
1175
- qrCode qrCode[]
1175
+ qrCodeTemplate qrCodeTemplate[]
1176
1176
  ZoneNro ZoneNro[]
1177
1177
  Pole Pole[]
1178
1178
  Manhole Manhole[]
@@ -1219,7 +1219,7 @@ model Cable {
1219
1219
  cableAttributes CableAtttributes[]
1220
1220
  PboFatAttributes PboFatAttributes[]
1221
1221
  SpliceClosureAttributes SpliceClosureAttributes[]
1222
- qrCode qrCode[]
1222
+ // qrCode qrCode[]
1223
1223
  qrCodeTag qrCodeTag[]
1224
1224
  }
1225
1225
 
@@ -1250,7 +1250,7 @@ model CableTemplate {
1250
1250
  projectId String?
1251
1251
 
1252
1252
  cableAttributes CableAtttributes[]
1253
- qrCode qrCode[]
1253
+ qrCodeTemplate qrCodeTemplate[]
1254
1254
  }
1255
1255
 
1256
1256
  model CableAtttributes {
@@ -1317,7 +1317,7 @@ model PboFatTemplate {
1317
1317
  pboFatAttributes PboFatAttributes[]
1318
1318
 
1319
1319
  //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase
1320
- qrCode qrCode[]
1320
+ qrCodeTemplate qrCodeTemplate[]
1321
1321
  }
1322
1322
 
1323
1323
  model PboFat {
@@ -1346,7 +1346,7 @@ model PboFat {
1346
1346
  projectId String?
1347
1347
 
1348
1348
  pboFatAttributes PboFatAttributes[]
1349
- qrCode qrCode[]
1349
+ // qrCode qrCode[]
1350
1350
  qrCodeTag qrCodeTag[]
1351
1351
  }
1352
1352
 
@@ -1439,6 +1439,7 @@ model SpliceClosureTemplate {
1439
1439
  clusterId String?
1440
1440
 
1441
1441
  spliceClosureAttributes SpliceClosureAttributes[]
1442
+ qrCodeTemplate qrCodeTemplate[]
1442
1443
  }
1443
1444
 
1444
1445
  model SpliceClosureAttributes {
@@ -1522,8 +1523,9 @@ model ZoneNroTemplate {
1522
1523
  project Project? @relation(fields: [projectId], references: [id])
1523
1524
  projectId String?
1524
1525
 
1525
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1526
- clusterId String?
1526
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1527
+ clusterId String?
1528
+ qrCodeTemplate qrCodeTemplate[]
1527
1529
  }
1528
1530
 
1529
1531
  model Pole {
@@ -1581,8 +1583,9 @@ model PoleTemplate {
1581
1583
  project Project? @relation(fields: [projectId], references: [id])
1582
1584
  projectId String?
1583
1585
 
1584
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1585
- clusterId String?
1586
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1587
+ clusterId String?
1588
+ qrCodeTemplate qrCodeTemplate[]
1586
1589
  }
1587
1590
 
1588
1591
  model Manhole {
@@ -1640,8 +1643,9 @@ model ManholeTemplate {
1640
1643
  project Project? @relation(fields: [projectId], references: [id])
1641
1644
  projectId String?
1642
1645
 
1643
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1644
- clusterId String?
1646
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1647
+ clusterId String?
1648
+ qrCodeTemplate qrCodeTemplate[]
1645
1649
  }
1646
1650
 
1647
1651
  model Loop {
@@ -1699,8 +1703,9 @@ model LoopTemplate {
1699
1703
  project Project? @relation(fields: [projectId], references: [id])
1700
1704
  projectId String?
1701
1705
 
1702
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1703
- clusterId String?
1706
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1707
+ clusterId String?
1708
+ qrCodeTemplate qrCodeTemplate[]
1704
1709
  }
1705
1710
 
1706
1711
  model FDTSRO {
@@ -1758,8 +1763,9 @@ model FDTSROTemplate {
1758
1763
  project Project? @relation(fields: [projectId], references: [id])
1759
1764
  projectId String?
1760
1765
 
1761
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1762
- clusterId String?
1766
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1767
+ clusterId String?
1768
+ qrCodeTemplate qrCodeTemplate[]
1763
1769
  }
1764
1770
 
1765
1771
  model SFU {
@@ -1817,8 +1823,9 @@ model SFUTemplate {
1817
1823
  project Project? @relation(fields: [projectId], references: [id])
1818
1824
  projectId String?
1819
1825
 
1820
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1821
- clusterId String?
1826
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1827
+ clusterId String?
1828
+ qrCodeTemplate qrCodeTemplate[]
1822
1829
  }
1823
1830
 
1824
1831
  model Building {
@@ -1876,8 +1883,9 @@ model BuildingTemplate {
1876
1883
  project Project? @relation(fields: [projectId], references: [id])
1877
1884
  projectId String?
1878
1885
 
1879
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1880
- clusterId String?
1886
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1887
+ clusterId String?
1888
+ qrCodeTemplate qrCodeTemplate[]
1881
1889
  }
1882
1890
 
1883
1891
  model CentralOffice {
@@ -1929,7 +1937,7 @@ model Cluster {
1929
1937
  BuildingTemplate BuildingTemplate[]
1930
1938
  }
1931
1939
 
1932
- model qrCode {
1940
+ model qrCodeTemplate {
1933
1941
  id String @id @unique @default(uuid())
1934
1942
  no Int @default(autoincrement())
1935
1943
  name String
@@ -1948,8 +1956,11 @@ model qrCode {
1948
1956
  projectId String?
1949
1957
 
1950
1958
  // one to many relation with network element
1951
- networkElement NetworkElement? @relation(fields: [networkElementId], references: [id])
1959
+ networkElement NetworkElement? @relation(fields: [networkElementTypeId], references: [id])
1960
+ networkElementTypeId String?
1961
+
1952
1962
  networkElementId String?
1963
+ templateId String?
1953
1964
 
1954
1965
  pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])
1955
1966
  pboFatTemplateId String?
@@ -1957,13 +1968,32 @@ model qrCode {
1957
1968
  cableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])
1958
1969
  cableTemplateId String?
1959
1970
 
1960
- // one to many relation with cable
1961
- cable Cable? @relation(fields: [cableId], references: [id])
1962
- cableId String?
1971
+ spliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])
1972
+ spliceClosureTemplateId String?
1973
+
1974
+ zoneNroTemplate ZoneNroTemplate? @relation(fields: [zoneNroTemplateId], references: [id])
1975
+ zoneNroTemplateId String?
1976
+
1977
+ poleTemplate PoleTemplate? @relation(fields: [poleTemplateId], references: [id])
1978
+ poleTemplateId String?
1979
+
1980
+ manholeTemplate ManholeTemplate? @relation(fields: [manholeTemplateId], references: [id])
1981
+ manholeTemplateId String?
1982
+
1983
+ loopTemplate LoopTemplate? @relation(fields: [loopTemplateId], references: [id])
1984
+ loopTemplateId String?
1985
+
1986
+ fdtsroTemplate FDTSROTemplate? @relation(fields: [fdtsroTemplateId], references: [id])
1987
+ fdtsroTemplateId String?
1988
+
1989
+ sfuTemplate SFUTemplate? @relation(fields: [sfuTemplateId], references: [id])
1990
+ sfuTemplateId String?
1991
+
1992
+ buildingTemplate BuildingTemplate? @relation(fields: [buildingTemplateId], references: [id])
1993
+ buildingTemplateId String?
1963
1994
 
1964
- // one to many relation with pbo fat
1965
- pboFat PboFat? @relation(fields: [pboFatId], references: [id])
1966
- pboFatId String?
1995
+ // cable Cable? @relation(fields: [networkElementId], references: [id])
1996
+ // pboFat PboFat? @relation(fields: [networkElementId], references: [id])
1967
1997
  qrCodeTag qrCodeTag[]
1968
1998
  }
1969
1999
 
@@ -1982,8 +2012,8 @@ model qrCodeTag {
1982
2012
  templateId String?
1983
2013
  networkElementId String?
1984
2014
 
1985
- qrCode qrCode @relation(fields: [qrCodeId], references: [id])
1986
- qrCodeId String
2015
+ qrCode qrCodeTemplate @relation(fields: [qrCodeTemplateId], references: [id])
2016
+ qrCodeTemplateId String
1987
2017
 
1988
2018
  cable Cable? @relation(fields: [cableId], references: [id])
1989
2019
  cableId String?