efiber-prisma-schema 1.5.0 → 1.5.1

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.1",
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?
@@ -1250,6 +1277,7 @@ model PboFat {
1250
1277
  photos Json? //Upload files for photos
1251
1278
  zone Json? //Color code for zone
1252
1279
  geometry Json? //Icon for the PBO FAT
1280
+ attributes Json? //Attributes for the PBO FAT
1253
1281
 
1254
1282
  createdAt DateTime @default(now())
1255
1283
  updatedAt DateTime @updatedAt