efiber-prisma-schema 1.5.0 → 1.5.2

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.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -44,6 +44,8 @@ model CamusatCountry {
44
44
  Country Country @relation(fields: [countryId], references: [id])
45
45
  countryId String
46
46
 
47
+ user User[]
48
+
47
49
  dispatchProject DispatchProject[]
48
50
  SubsidiaryMaterial SubsidiaryMaterial[]
49
51
  }
@@ -147,6 +149,8 @@ model Role {
147
149
  dispatch_delete_materials Boolean @default(false)
148
150
  dispatch_view_reports Boolean @default(false)
149
151
  dispatch_view_kpi Boolean @default(false)
152
+ integration_web_access Boolean @default(false)
153
+ integration_mobile Boolean @default(false)
150
154
 
151
155
  createdAt DateTime @default(now())
152
156
  updatedAt DateTime @updatedAt
@@ -321,7 +325,8 @@ model User {
321
325
  deviceId2 String? //Build ID to limit number of devices
322
326
  notificationTokens String[] @default([])
323
327
 
324
- platforms_list Platform[]
328
+ platforms_list Platform[]
329
+ managing_countries CamusatCountry[]
325
330
 
326
331
  refreshToken String? @unique
327
332
 
@@ -362,10 +367,11 @@ model User {
362
367
  cable Cable[]
363
368
  SpliceClosure SpliceClosure[]
364
369
  CableTemplate CableTemplate[]
365
- CentralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
370
+ CentralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
366
371
  centralOfficeId String?
367
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
372
+ Cluster Cluster? @relation(fields: [clusterId], references: [id])
368
373
  clusterId String?
374
+ projectPhaseLog projectPhaseLog[]
369
375
  }
370
376
 
371
377
  model MainProject {
@@ -388,6 +394,7 @@ model Project {
388
394
  status String @default("Pending")
389
395
  countries Json? //Manage countries
390
396
  auditMatrices Json? //Audit Matrices
397
+ projectPhase String? @default("In-Progress")
391
398
 
392
399
  createdAt DateTime @default(now())
393
400
  updatedAt DateTime @updatedAt
@@ -421,6 +428,23 @@ model Project {
421
428
  CableTemplate CableTemplate[]
422
429
  CentralOffice CentralOffice[]
423
430
  qrCode qrCode[]
431
+ projectPhaseLog projectPhaseLog[]
432
+ }
433
+
434
+ model projectPhaseLog {
435
+ id String @id @unique @default(uuid())
436
+ no Int @default(autoincrement())
437
+ project Project @relation(fields: [projectId], references: [id])
438
+ projectId String
439
+ phase String
440
+ action String
441
+ comment String?
442
+
443
+ createdAt DateTime @default(now())
444
+ updatedAt DateTime @updatedAt
445
+ deletedAt DateTime?
446
+ updatedBy User? @relation(fields: [updatedById], references: [id])
447
+ updatedById String?
424
448
  }
425
449
 
426
450
  model Audit {
@@ -610,6 +634,7 @@ model EmailTemplates {
610
634
  name String
611
635
  subject String?
612
636
  body String?
637
+ signature String? //Signature of the email
613
638
  attachments Json?
614
639
  workOrderInfo Json?
615
640
  mailingList Json?
@@ -718,6 +743,8 @@ model WorkOrderActivityLog {
718
743
  comment String?
719
744
  statusUpdate String?
720
745
 
746
+ actionDate DateTime? //Date the work order was completed
747
+
721
748
  createdAt DateTime @default(now())
722
749
  updatedAt DateTime @updatedAt
723
750
  deletedAt DateTime?
@@ -1173,6 +1200,7 @@ model CableTemplate {
1173
1200
  projectId String?
1174
1201
 
1175
1202
  cableAttributes CableAtttributes[]
1203
+ qrCode qrCode[]
1176
1204
  }
1177
1205
 
1178
1206
  model CableAtttributes {
@@ -1239,6 +1267,7 @@ model PboFatTemplate {
1239
1267
  pboFatAttributes PboFatAttributes[]
1240
1268
 
1241
1269
  //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase
1270
+ qrCode qrCode[]
1242
1271
  }
1243
1272
 
1244
1273
  model PboFat {
@@ -1250,6 +1279,7 @@ model PboFat {
1250
1279
  photos Json? //Upload files for photos
1251
1280
  zone Json? //Color code for zone
1252
1281
  geometry Json? //Icon for the PBO FAT
1282
+ attributes Json? //Attributes for the PBO FAT
1253
1283
 
1254
1284
  createdAt DateTime @default(now())
1255
1285
  updatedAt DateTime @updatedAt
@@ -1400,6 +1430,12 @@ model qrCode {
1400
1430
  networkElement NetworkElement? @relation(fields: [networkElementId], references: [id])
1401
1431
  networkElementId String?
1402
1432
 
1433
+ pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])
1434
+ pboFatTemplateId String?
1435
+
1436
+ cableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])
1437
+ cableTemplateId String?
1438
+
1403
1439
  // one to many relation with cable
1404
1440
  cable Cable? @relation(fields: [cableId], references: [id])
1405
1441
  cableId String?