efiber-prisma-schema 1.2.13 → 1.4.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.2.13",
3
+ "version": "1.4.0",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -362,6 +362,10 @@ model User {
362
362
  cable Cable[]
363
363
  SpliceClosure SpliceClosure[]
364
364
  CableTemplate CableTemplate[]
365
+ CentralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
366
+ centralOfficeId String?
367
+ Cluster Cluster? @relation(fields: [clusterId], references: [id])
368
+ clusterId String?
365
369
  }
366
370
 
367
371
  model MainProject {
@@ -415,6 +419,8 @@ model Project {
415
419
  spliceClosureAttributes SpliceClosureAttributes[]
416
420
  Cable Cable[]
417
421
  CableTemplate CableTemplate[]
422
+ CentralOffice CentralOffice[]
423
+ qrCode qrCode[]
418
424
  }
419
425
 
420
426
  model Audit {
@@ -1107,6 +1113,7 @@ model NetworkElement {
1107
1113
  Cable Cable[]
1108
1114
  SpliceClosure SpliceClosure[]
1109
1115
  CableTemplate CableTemplate[]
1116
+ qrCode qrCode[]
1110
1117
  }
1111
1118
 
1112
1119
  model Cable {
@@ -1137,6 +1144,7 @@ model Cable {
1137
1144
  cableAttributes CableAtttributes[]
1138
1145
  PboFatAttributes PboFatAttributes[]
1139
1146
  SpliceClosureAttributes SpliceClosureAttributes[]
1147
+ qrCode qrCode[]
1140
1148
  }
1141
1149
 
1142
1150
  model CableTemplate {
@@ -1168,11 +1176,11 @@ model CableTemplate {
1168
1176
  }
1169
1177
 
1170
1178
  model CableAtttributes {
1171
- id String @id @unique @default(uuid())
1172
- no Int @default(autoincrement())
1173
- name String
1174
- description String?
1175
- value String?
1179
+ id String @id @unique @default(uuid())
1180
+ no Int @default(autoincrement())
1181
+ name String
1182
+ description String?
1183
+ value String?
1176
1184
  visibleOnMobile Boolean @default(false)
1177
1185
 
1178
1186
  createdAt DateTime @default(now())
@@ -1257,6 +1265,7 @@ model PboFat {
1257
1265
  projectId String?
1258
1266
 
1259
1267
  pboFatAttributes PboFatAttributes[]
1268
+ qrCode qrCode[]
1260
1269
  }
1261
1270
 
1262
1271
  model PboFatAttributes {
@@ -1335,3 +1344,67 @@ model SpliceClosureAttributes {
1335
1344
  spliceClosure SpliceClosure @relation(fields: [spliceClosureId], references: [id])
1336
1345
  spliceClosureId String
1337
1346
  }
1347
+
1348
+ model CentralOffice {
1349
+ id String @id @unique @default(uuid())
1350
+ no Int @default(autoincrement())
1351
+ name String @unique
1352
+
1353
+ createdAt DateTime @default(now())
1354
+ updatedAt DateTime @updatedAt
1355
+ deletedAt DateTime?
1356
+
1357
+ project Project? @relation(fields: [projectId], references: [id])
1358
+ projectId String?
1359
+
1360
+ users User[]
1361
+ Cluster Cluster[]
1362
+ }
1363
+
1364
+ model Cluster {
1365
+ id String @id @unique @default(uuid())
1366
+ no Int @default(autoincrement())
1367
+ name String @unique
1368
+
1369
+ createdAt DateTime @default(now())
1370
+ updatedAt DateTime @updatedAt
1371
+ deletedAt DateTime?
1372
+
1373
+ projectPhase String?
1374
+
1375
+ centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
1376
+ centralOfficeId String?
1377
+
1378
+ users User[]
1379
+ }
1380
+
1381
+ model qrCode {
1382
+ id String @id @unique @default(uuid())
1383
+ no Int @default(autoincrement())
1384
+ name String
1385
+ prefix String
1386
+ index Int //number of qr code generated
1387
+ scanned Int @default(0)
1388
+ link String? @unique //where the qr code will redirect to
1389
+ tagDetails Json?
1390
+ status String @default("active")
1391
+
1392
+ createdAt DateTime @default(now())
1393
+ updatedAt DateTime @updatedAt
1394
+ deletedAt DateTime?
1395
+
1396
+ project Project? @relation(fields: [projectId], references: [id])
1397
+ projectId String?
1398
+
1399
+ // one to many relation with network element
1400
+ networkElement NetworkElement? @relation(fields: [networkElementId], references: [id])
1401
+ networkElementId String?
1402
+
1403
+ // one to many relation with cable
1404
+ cable Cable? @relation(fields: [cableId], references: [id])
1405
+ cableId String?
1406
+
1407
+ // one to many relation with pbo fat
1408
+ pboFat PboFat? @relation(fields: [pboFatId], references: [id])
1409
+ pboFatId String?
1410
+ }