efiber-prisma-schema 1.5.2 → 1.6.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/prisma/schema.prisma +235 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efiber-prisma-schema",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -372,6 +372,13 @@ model User {
372
372
  Cluster Cluster? @relation(fields: [clusterId], references: [id])
373
373
  clusterId String?
374
374
  projectPhaseLog projectPhaseLog[]
375
+ ZoneNro ZoneNro[]
376
+ Pole Pole[]
377
+ Manhole Manhole[]
378
+ Loop Loop[]
379
+ FDTSRO FDTSRO[]
380
+ SFU SFU[]
381
+ Building Building[]
375
382
  }
376
383
 
377
384
  model MainProject {
@@ -429,6 +436,13 @@ model Project {
429
436
  CentralOffice CentralOffice[]
430
437
  qrCode qrCode[]
431
438
  projectPhaseLog projectPhaseLog[]
439
+ ZoneNro ZoneNro[]
440
+ Pole Pole[]
441
+ Manhole Manhole[]
442
+ Loop Loop[]
443
+ FDTSRO FDTSRO[]
444
+ SFU SFU[]
445
+ Building Building[]
432
446
  }
433
447
 
434
448
  model projectPhaseLog {
@@ -1141,6 +1155,13 @@ model NetworkElement {
1141
1155
  SpliceClosure SpliceClosure[]
1142
1156
  CableTemplate CableTemplate[]
1143
1157
  qrCode qrCode[]
1158
+ ZoneNro ZoneNro[]
1159
+ Pole Pole[]
1160
+ Manhole Manhole[]
1161
+ Loop Loop[]
1162
+ FDTSRO FDTSRO[]
1163
+ SFU SFU[]
1164
+ Building Building[]
1144
1165
  }
1145
1166
 
1146
1167
  model Cable {
@@ -1328,16 +1349,16 @@ model PboFatAttributes {
1328
1349
 
1329
1350
  model SpliceClosure {
1330
1351
  // TODO: Add the fields for previous/next equipment, CO and project phase
1331
- id String @id @unique @default(uuid())
1332
- no Int @default(autoincrement())
1333
- name String
1334
- maxCapacity Int
1335
- coordinates String?
1336
- qrCode String?
1337
- photo String?
1338
- status String @default("active")
1339
- brand String?
1340
- description String?
1352
+ id String @id @unique @default(uuid())
1353
+ no Int @default(autoincrement())
1354
+ name String
1355
+ status String @default("active")
1356
+ terminalAccess Boolean @default(false)
1357
+ photos Json? //Upload files for photos
1358
+ zone Json? //Color code for zone
1359
+ geometry Json? //Icon for the PBO FAT
1360
+ attributes Json? //Attributes for the PBO FAT
1361
+ description String?
1341
1362
 
1342
1363
  createdAt DateTime @default(now())
1343
1364
  updatedAt DateTime @updatedAt
@@ -1375,6 +1396,202 @@ model SpliceClosureAttributes {
1375
1396
  spliceClosureId String
1376
1397
  }
1377
1398
 
1399
+ model ZoneNro {
1400
+ id String @id @unique @default(uuid())
1401
+ no Int @default(autoincrement())
1402
+
1403
+ status String @default("active")
1404
+ terminalAccess Boolean @default(false)
1405
+ photos Json?
1406
+ zone Json?
1407
+ geometry Json?
1408
+ attributes Json?
1409
+
1410
+ createdAt DateTime @default(now())
1411
+ updatedAt DateTime @updatedAt
1412
+ deletedAt DateTime?
1413
+
1414
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1415
+ updatedById String?
1416
+
1417
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1418
+ networkElementId String
1419
+
1420
+ project Project? @relation(fields: [projectId], references: [id])
1421
+ projectId String?
1422
+
1423
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1424
+ clusterId String?
1425
+ }
1426
+
1427
+ model Pole {
1428
+ id String @id @unique @default(uuid())
1429
+ no Int @default(autoincrement())
1430
+
1431
+ status String @default("active")
1432
+ terminalAccess Boolean @default(false)
1433
+ photos Json?
1434
+ zone Json?
1435
+ geometry Json?
1436
+ attributes Json?
1437
+
1438
+ createdAt DateTime @default(now())
1439
+ updatedAt DateTime @updatedAt
1440
+ deletedAt DateTime?
1441
+
1442
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1443
+ updatedById String?
1444
+
1445
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1446
+ networkElementId String
1447
+
1448
+ project Project? @relation(fields: [projectId], references: [id])
1449
+ projectId String?
1450
+
1451
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1452
+ clusterId String?
1453
+ }
1454
+
1455
+ model Manhole {
1456
+ id String @id @unique @default(uuid())
1457
+ no Int @default(autoincrement())
1458
+
1459
+ status String @default("active")
1460
+ terminalAccess Boolean @default(false)
1461
+ photos Json?
1462
+ zone Json?
1463
+ geometry Json?
1464
+ attributes Json?
1465
+
1466
+ createdAt DateTime @default(now())
1467
+ updatedAt DateTime @updatedAt
1468
+ deletedAt DateTime?
1469
+
1470
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1471
+ updatedById String?
1472
+
1473
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1474
+ networkElementId String
1475
+
1476
+ project Project? @relation(fields: [projectId], references: [id])
1477
+ projectId String?
1478
+
1479
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1480
+ clusterId String?
1481
+ }
1482
+
1483
+ model Loop {
1484
+ id String @id @unique @default(uuid())
1485
+ no Int @default(autoincrement())
1486
+
1487
+ status String @default("active")
1488
+ terminalAccess Boolean @default(false)
1489
+ photos Json?
1490
+ zone Json?
1491
+ geometry Json?
1492
+ attributes Json?
1493
+
1494
+ createdAt DateTime @default(now())
1495
+ updatedAt DateTime @updatedAt
1496
+ deletedAt DateTime?
1497
+
1498
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1499
+ updatedById String?
1500
+
1501
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1502
+ networkElementId String
1503
+
1504
+ project Project? @relation(fields: [projectId], references: [id])
1505
+ projectId String?
1506
+
1507
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1508
+ clusterId String?
1509
+ }
1510
+
1511
+ model FDTSRO {
1512
+ id String @id @unique @default(uuid())
1513
+ no Int @default(autoincrement())
1514
+
1515
+ status String @default("active")
1516
+ terminalAccess Boolean @default(false)
1517
+ photos Json?
1518
+ zone Json?
1519
+ geometry Json?
1520
+ attributes Json?
1521
+
1522
+ createdAt DateTime @default(now())
1523
+ updatedAt DateTime @updatedAt
1524
+ deletedAt DateTime?
1525
+
1526
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1527
+ updatedById String?
1528
+
1529
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1530
+ networkElementId String
1531
+
1532
+ project Project? @relation(fields: [projectId], references: [id])
1533
+ projectId String?
1534
+
1535
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1536
+ clusterId String?
1537
+ }
1538
+
1539
+ model SFU {
1540
+ id String @id @unique @default(uuid())
1541
+ no Int @default(autoincrement())
1542
+
1543
+ status String @default("active")
1544
+ terminalAccess Boolean @default(false)
1545
+ photos Json?
1546
+ zone Json?
1547
+ geometry Json?
1548
+ attributes Json?
1549
+
1550
+ createdAt DateTime @default(now())
1551
+ updatedAt DateTime @updatedAt
1552
+ deletedAt DateTime?
1553
+
1554
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1555
+ updatedById String?
1556
+
1557
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1558
+ networkElementId String
1559
+
1560
+ project Project? @relation(fields: [projectId], references: [id])
1561
+ projectId String?
1562
+
1563
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1564
+ clusterId String?
1565
+ }
1566
+
1567
+ model Building {
1568
+ id String @id @unique @default(uuid())
1569
+ no Int @default(autoincrement())
1570
+
1571
+ status String @default("active")
1572
+ terminalAccess Boolean @default(false)
1573
+ photos Json?
1574
+ zone Json?
1575
+ geometry Json?
1576
+ attributes Json?
1577
+
1578
+ createdAt DateTime @default(now())
1579
+ updatedAt DateTime @updatedAt
1580
+ deletedAt DateTime?
1581
+
1582
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1583
+ updatedById String?
1584
+
1585
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1586
+ networkElementId String
1587
+
1588
+ project Project? @relation(fields: [projectId], references: [id])
1589
+ projectId String?
1590
+
1591
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1592
+ clusterId String?
1593
+ }
1594
+
1378
1595
  model CentralOffice {
1379
1596
  id String @id @unique @default(uuid())
1380
1597
  no Int @default(autoincrement())
@@ -1405,7 +1622,14 @@ model Cluster {
1405
1622
  centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
1406
1623
  centralOfficeId String?
1407
1624
 
1408
- users User[]
1625
+ users User[]
1626
+ ZoneNro ZoneNro[]
1627
+ Pole Pole[]
1628
+ Manhole Manhole[]
1629
+ Loop Loop[]
1630
+ FDTSRO FDTSRO[]
1631
+ SFU SFU[]
1632
+ Building Building[]
1409
1633
  }
1410
1634
 
1411
1635
  model qrCode {