efiber-prisma-schema 2.0.12 → 2.0.14

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 (38) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/index.js.map +1 -1
  5. package/dist/prisma/generated/edge.js +8 -4
  6. package/dist/prisma/generated/index.js +15 -7
  7. package/dist/prisma/generated/package.json +1 -1
  8. package/dist/prisma/generated/schema.prisma +3 -2
  9. package/dist/prisma/generated/wasm.js +8 -4
  10. package/package.json +3 -2
  11. package/dist/prisma/generated/generated/client.d.ts +0 -1
  12. package/dist/prisma/generated/generated/client.js +0 -5
  13. package/dist/prisma/generated/generated/default.d.ts +0 -1
  14. package/dist/prisma/generated/generated/default.js +0 -5
  15. package/dist/prisma/generated/generated/edge.d.ts +0 -1
  16. package/dist/prisma/generated/generated/edge.js +0 -2467
  17. package/dist/prisma/generated/generated/index-browser.js +0 -2450
  18. package/dist/prisma/generated/generated/index.d.ts +0 -347177
  19. package/dist/prisma/generated/generated/index.js +0 -2492
  20. package/dist/prisma/generated/generated/libquery_engine-darwin-arm64.dylib.node +0 -0
  21. package/dist/prisma/generated/generated/package.json +0 -183
  22. package/dist/prisma/generated/generated/query_engine_bg.js +0 -2
  23. package/dist/prisma/generated/generated/query_engine_bg.wasm +0 -0
  24. package/dist/prisma/generated/generated/runtime/edge-esm.js +0 -35
  25. package/dist/prisma/generated/generated/runtime/edge.js +0 -35
  26. package/dist/prisma/generated/generated/runtime/index-browser.d.ts +0 -370
  27. package/dist/prisma/generated/generated/runtime/index-browser.js +0 -17
  28. package/dist/prisma/generated/generated/runtime/library.d.ts +0 -3982
  29. package/dist/prisma/generated/generated/runtime/library.js +0 -147
  30. package/dist/prisma/generated/generated/runtime/react-native.js +0 -84
  31. package/dist/prisma/generated/generated/runtime/wasm-compiler-edge.js +0 -85
  32. package/dist/prisma/generated/generated/runtime/wasm-engine-edge.js +0 -38
  33. package/dist/prisma/generated/generated/schema.prisma +0 -3347
  34. package/dist/prisma/generated/generated/wasm-edge-light-loader.mjs +0 -5
  35. package/dist/prisma/generated/generated/wasm-worker-loader.mjs +0 -5
  36. package/dist/prisma/generated/generated/wasm.d.ts +0 -1
  37. package/dist/prisma/generated/generated/wasm.js +0 -2474
  38. /package/dist/prisma/generated/{generated/libquery_engine-debian-openssl-3.0.x.so.node → libquery_engine-debian-openssl-3.0.x.so.node} +0 -0
@@ -1,3347 +0,0 @@
1
- generator client {
2
- provider = "prisma-client-js"
3
- output = "./generated"
4
- binaryTargets = ["native", "debian-openssl-3.0.x"]
5
- }
6
-
7
- datasource db {
8
- provider = "postgresql"
9
- url = env("DATABASE_URL")
10
- }
11
-
12
- enum NetworkElementClassification {
13
- NetworkElement
14
- InfrastructureElement
15
- MapElement
16
- }
17
-
18
- enum ProjectLevel {
19
- Subsidiary
20
- Client
21
- MainProject
22
- Project
23
- CentralOffice
24
- Cluster
25
- }
26
-
27
- enum NetworkElementChildType {
28
- PboFat
29
- Cable
30
- SpliceClosure
31
- Zone
32
- SFU
33
- Loop
34
- FDTSRO
35
- Manhole
36
- Building
37
- Pole
38
- }
39
-
40
- enum EquipmentType {
41
- PboFat
42
- SpliceClosure
43
- FDTSRO
44
- }
45
-
46
- enum AggregationOperation {
47
- LIST
48
- SUM
49
- COUNT
50
- AVERAGE
51
- }
52
-
53
- enum ArithmeticOperation {
54
- ADD
55
- SUBTRACT
56
- MULTIPLY
57
- DIVIDE
58
- }
59
-
60
- enum ReportUsage {
61
- TABLE
62
- VISUALIZATION
63
- }
64
-
65
- enum ValueFormat {
66
- PERCENTAGE
67
- NUMBER
68
- }
69
-
70
- enum ChartType {
71
- BAR
72
- LINE
73
- PIE
74
- }
75
-
76
- enum MetricType {
77
- ProjectInfo
78
- NetworkElement
79
- NetworkElementAttributes
80
- FormulaResult
81
- }
82
-
83
- enum MapElementType {
84
- Marker
85
- Polyline
86
- Polygon
87
- }
88
-
89
- enum CentralOfficeTeamPosition {
90
- Supervisor
91
- Designer
92
- Technician
93
- }
94
-
95
- enum NotificationPlatform {
96
- Web
97
- Mobile
98
- }
99
-
100
- enum ClusterProjectPhase {
101
- Survey
102
- Design
103
- Construction
104
- GIS
105
- Dispatch
106
- }
107
-
108
- enum RevisionStatus {
109
- IN_PROGRESS
110
- SUBMITTED
111
- APPROVED
112
- REJECTED
113
- }
114
-
115
- enum RelationType {
116
- INSTALLED_ON
117
- CONNECTED_TO
118
- ENCLOSURE_ORIGIN
119
- ENCLOSURE_DESTINATION
120
- }
121
-
122
- enum AttributeType {
123
- TEXT
124
- NUMBER
125
- BOOLEAN
126
- DROPDOWN
127
- OPTIONS
128
- DATE
129
- JSON
130
- }
131
-
132
- enum CableAttachmentRole {
133
- DESTINATION
134
- ORIGIN
135
- }
136
-
137
- model Country {
138
- id String @id @unique @default(uuid())
139
- no Int @default(autoincrement())
140
- name String
141
- official_name String
142
- code String
143
- capital String
144
- region String
145
- subregion String
146
- population String
147
- timezones String
148
- flag String?
149
-
150
- createdAt DateTime @default(now())
151
- updatedAt DateTime @updatedAt
152
- CamusatCountry CamusatCountry[]
153
- User User[]
154
- }
155
-
156
- model CamusatCountry {
157
- id String @id @unique @default(uuid())
158
- no Int @default(autoincrement())
159
- name String @unique
160
- original String?
161
- description String?
162
- status String @default("active")
163
- type String @default("subsidiary")
164
-
165
- createdAt DateTime @default(now())
166
- updatedAt DateTime @updatedAt
167
- deletedAt DateTime?
168
- CamusatClient CamusatClient[]
169
- mainProjects MainProject[]
170
-
171
- Country Country @relation(fields: [countryId], references: [id])
172
- countryId String
173
-
174
- user User[]
175
-
176
- dispatchProject DispatchProject[]
177
- SubsidiaryMaterial SubsidiaryMaterial[]
178
- }
179
-
180
- model CamusatClient {
181
- id String @id @unique @default(uuid())
182
- no Int @default(autoincrement())
183
- name String
184
- logo String? @db.Text //Upload file for logo
185
- type String @default("client")
186
-
187
- createdAt DateTime @default(now())
188
- updatedAt DateTime @updatedAt
189
- deletedAt DateTime?
190
-
191
- Country CamusatCountry @relation(fields: [countryId], references: [id])
192
- countryId String
193
-
194
- mainProject MainProject[]
195
- clientMaterial clientMaterial[]
196
- users User[]
197
- }
198
-
199
- model Platform {
200
- id String @id @unique @default(uuid())
201
- no Int @default(autoincrement())
202
- name String
203
- url String?
204
- directory String?
205
- status String @default("active")
206
- countries Json?
207
- createdAt DateTime @default(now())
208
- updatedAt DateTime @updatedAt
209
- deletedAt DateTime?
210
-
211
- User User[]
212
- Project Project[]
213
- }
214
-
215
- model Position {
216
- id String @id @unique @default(uuid())
217
- no Int @default(autoincrement())
218
- name String
219
- description String?
220
- status String @default("active")
221
- countries Json?
222
-
223
- createdAt DateTime @default(now())
224
- updatedAt DateTime @updatedAt
225
- deletedAt DateTime?
226
- User User[]
227
- }
228
-
229
- model Role {
230
- id String @id @unique @default(uuid())
231
- no Int @default(autoincrement())
232
- name String
233
- description String?
234
- status String @default("active")
235
- countries Json?
236
- platforms Json?
237
- login Boolean @default(false)
238
- access_web Boolean @default(false)
239
- access_mobile Boolean @default(false)
240
- add_users Boolean @default(false)
241
- view_users Boolean @default(false)
242
- delete_users Boolean @default(false)
243
- view_requests Boolean @default(false)
244
- manage_requests Boolean @default(false) //Either approve or rejects
245
- add_main_projects Boolean @default(false)
246
- view_main_projects Boolean @default(false)
247
- edit_main_projects Boolean @default(false)
248
- delete_main_projects Boolean @default(false)
249
- view_settings Boolean @default(false)
250
- view_audit Boolean @default(false)
251
- full_projects Boolean @default(false)
252
- add_projects Boolean @default(false)
253
- edit_projects Boolean @default(false)
254
- view_projects Boolean @default(false)
255
- delete_projects Boolean @default(false)
256
- add_sub_projects Boolean @default(false)
257
- manage_work_orders Boolean @default(false)
258
- full_teams Boolean @default(false)
259
- add_team Boolean @default(false)
260
- view_team Boolean @default(false)
261
- quality Boolean @default(false)
262
- dispatch_web_access Boolean @default(false)
263
- dispatch_mobile Boolean @default(false)
264
- dispatch_add_workorders Boolean @default(false)
265
- dispatch_view_workorders Boolean @default(false)
266
- dispatch_edit_workorders Boolean @default(false)
267
- dispatch_view_schedule Boolean @default(false)
268
- dispatch_add_teams Boolean @default(false)
269
- dispatch_view_teams Boolean @default(false)
270
- dispatch_edit_teams Boolean @default(false)
271
- dispatch_delete_teams Boolean @default(false)
272
- dispatch_view_projects Boolean @default(false)
273
- dispatch_edit_projects Boolean @default(false)
274
- dispatch_edit_materials Boolean @default(false)
275
- dispatch_view_materials Boolean @default(false)
276
- dispatch_add_materials Boolean @default(false)
277
- dispatch_delete_materials Boolean @default(false)
278
- dispatch_view_reports Boolean @default(false)
279
- dispatch_view_kpi Boolean @default(false)
280
- integration_web_access Boolean @default(false)
281
- integration_mobile Boolean @default(false)
282
-
283
- createdAt DateTime @default(now())
284
- updatedAt DateTime @updatedAt
285
- deletedAt DateTime?
286
- User User[]
287
- }
288
-
289
- model Template {
290
- id String @id @unique @default(uuid())
291
- no Int @default(autoincrement())
292
- name String @unique
293
- statusColor String?
294
- buttonName String
295
- workflowType String @default("template")
296
-
297
- createdAt DateTime @default(now())
298
-
299
- features Feature[]
300
- templateComponents TemplateComponent[]
301
- projectWorkFlow ProjectWorkFlow[]
302
- }
303
-
304
- model Feature {
305
- id String @id @unique @default(uuid())
306
- no Int @default(autoincrement())
307
- functionality String? // Describes the feature type
308
- description String // Placeholder in the mobile app
309
- classification String
310
- KPI String
311
- options Json?
312
- linkToScheduler Boolean @default(false) // For Date and Time, will reschedule the work order
313
- value String?
314
-
315
- createdAt DateTime @default(now())
316
- updatedAt DateTime @updatedAt
317
- deletedAt DateTime?
318
-
319
- featureType FeatureType @relation(fields: [featureTypeId], references: [id])
320
- featureTypeId String
321
-
322
- template Template @relation(fields: [templateId], references: [id])
323
- templateId String
324
- }
325
-
326
- model FeatureType {
327
- id String @id @unique @default(uuid())
328
- no Int @default(autoincrement())
329
- type String
330
- functionality String
331
-
332
- createdAt DateTime @default(now())
333
- updatedAt DateTime @updatedAt
334
- deletedAt DateTime?
335
-
336
- Feature Feature[]
337
- }
338
-
339
- model TemplateComponent {
340
- id String @id @unique @default(uuid())
341
- no Int @default(autoincrement())
342
-
343
- type String
344
- createdAt DateTime @default(now())
345
-
346
- template Template? @relation(fields: [templateId], references: [id])
347
- templateId String?
348
-
349
- bomComponent BillOfMaterial? @relation(fields: [bomComponentId], references: [id])
350
- bomComponentId String?
351
-
352
- dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])
353
- dispatchProjectId String?
354
-
355
- index Int? //order of the component
356
-
357
- workOrderTasks WorkOrderTask[]
358
-
359
- // TODO: Figure out how to tie this to a dispatch Project
360
- }
361
-
362
- model ProjectWorkFlow {
363
- id String @id @unique @default(uuid())
364
- no Int @default(autoincrement())
365
- name String
366
- project Project @relation(fields: [projectId], references: [id])
367
- projectId String
368
- index Int? //order of the workflow
369
-
370
- createdAt DateTime @default(now())
371
- updatedAt DateTime @updatedAt
372
-
373
- template Template? @relation(fields: [templateId], references: [id])
374
- templateId String?
375
-
376
- billofMaterial BillOfMaterial? @relation(fields: [billofMaterialId], references: [id])
377
- billofMaterialId String?
378
- }
379
-
380
- model TeamType {
381
- id String @id @unique @default(uuid())
382
- no Int @default(autoincrement())
383
- name String
384
- description String?
385
- status String @default("active")
386
- countries Json?
387
- platforms Json?
388
-
389
- createdAt DateTime @default(now())
390
- updatedAt DateTime @updatedAt
391
- deletedAt DateTime?
392
-
393
- Team Team[]
394
- User User[]
395
- }
396
-
397
- model Team {
398
- id String @id @unique @default(uuid())
399
- no Int @default(autoincrement())
400
- name String
401
- description String?
402
- status String @default("active")
403
- countries Json?
404
- platforms Json?
405
-
406
- createdAt DateTime @default(now())
407
- updatedAt DateTime @updatedAt
408
- deletedAt DateTime?
409
-
410
- teamType TeamType @relation(fields: [teamTypeId], references: [id])
411
- teamTypeId String
412
- TeamPlatform TeamPlatform[]
413
- User User[]
414
- DispatchTeam DispatchTeam[]
415
- }
416
-
417
- model TeamPlatform {
418
- id String @id @unique @default(uuid())
419
- no Int @default(autoincrement())
420
- name String
421
- description String?
422
- priority String?
423
- status String @default("active")
424
- countries Json?
425
- platforms Json?
426
- staffs Json?
427
-
428
- createdAt DateTime @default(now())
429
- updatedAt DateTime @updatedAt
430
- deletedAt DateTime?
431
-
432
- team Team @relation(fields: [teamId], references: [id])
433
- teamId String
434
- User User? @relation(fields: [userId], references: [id])
435
- userId String?
436
- }
437
-
438
- model User {
439
- id String @id @unique @default(uuid())
440
- no Int @default(autoincrement())
441
- name String
442
- surname String
443
- email String @unique
444
- mobile String
445
- password String
446
- otp String?
447
- passport String? //National Id/ Passport No.
448
- passportFile String? @db.Text //Upload file for passport
449
- status String @default("active")
450
- countries Json? //Manage countrie
451
- platforms Json? //Platform Access
452
- staffId String? //Staff ID
453
- deviceId1 String? //Build ID to limit number of devices
454
- deviceId2 String? //Build ID to limit number of devices
455
- notificationTokens String[] @default([])
456
- webNotificationTokens String[] @default([])
457
-
458
- platforms_list Platform[]
459
- managing_countries CamusatCountry[]
460
-
461
- refreshToken String? @unique
462
-
463
- createdAt DateTime @default(now())
464
- updatedAt DateTime @updatedAt
465
- activatedAt DateTime?
466
- deletedAt DateTime?
467
-
468
- position Position? @relation(fields: [positionId], references: [id])
469
- teamType TeamType? @relation(fields: [teamTypeId], references: [id])
470
- team Team? @relation(fields: [teamId], references: [id])
471
- country Country? @relation(fields: [countryId], references: [id])
472
- role Role? @relation(fields: [roleId], references: [id])
473
-
474
- positionId String?
475
- teamTypeId String?
476
- teamId String?
477
- countryId String?
478
- roleId String?
479
-
480
- TeamPlatform TeamPlatform[]
481
- project Project[]
482
- audit Audit[]
483
-
484
- leadTechnician DispatchTeam[] @relation("LeadTechnician")
485
- firstTechnician DispatchTeam[] @relation("FirstTechnician")
486
- secondTechnician DispatchTeam[] @relation("SecondTechnician")
487
- otherTechnician DispatchTeam[] @relation("OtherTechnician")
488
- DispatchProject DispatchProject[]
489
- WorkOrder WorkOrder[]
490
- WorkOrderTasks WorkOrderTask[]
491
- workOrderActivityLogs WorkOrderActivityLog[]
492
- workOrderEditLogs WorkOrderEditLog[]
493
- Notifications Notifications[]
494
-
495
- pboFatTemplates PboFatTemplate[]
496
- pboFat PboFat[]
497
- cable Cable[]
498
- SpliceClosure SpliceClosure[]
499
- CableTemplate CableTemplate[]
500
- CentralOffices CentralOffice[]
501
- Clusters Cluster[]
502
- projectPhaseLog projectPhaseLog[]
503
- ZoneNro ZoneNro[]
504
- Pole Pole[]
505
- Manhole Manhole[]
506
- Loop Loop[]
507
- FDTSRO FDTSRO[]
508
- SFU SFU[]
509
- Building Building[]
510
- SpliceClosureTemplate SpliceClosureTemplate[]
511
- ZoneNroTemplate ZoneNroTemplate[]
512
- PoleTemplate PoleTemplate[]
513
- ManholeTemplate ManholeTemplate[]
514
- LoopTemplate LoopTemplate[]
515
- FDTSROTemplate FDTSROTemplate[]
516
- SFUTemplate SFUTemplate[]
517
- BuildingTemplate BuildingTemplate[]
518
- integrationProjectUserStatus integrationProjectUserStatus[]
519
- integrationUserLocation integrationUserLocation[]
520
- CamusatClient CamusatClient[]
521
- IntegrationReportTemplate IntegrationReportTemplate[]
522
- MapElementTemplate MapElementTemplate[]
523
- MapElement MapElement[]
524
- CentralOfficeUser CentralOfficeUser[]
525
- ClusterComments ClusterComments[]
526
- CreatedRevisions Revision[] @relation("revisionCreatedBy")
527
- ResolvedRevisions Revision[] @relation("revisionResolvedBy")
528
- ClusterNotes ClusterNotes[]
529
- Conduit Conduit[]
530
- ConduitTemplate ConduitTemplate[]
531
- WorkOrderComments WorkOrderComments[]
532
- }
533
-
534
- model MainProject {
535
- id String @id @unique @default(uuid())
536
- no Int @default(autoincrement())
537
- CamusatCountry CamusatCountry @relation(fields: [camusatCountryId], references: [id])
538
- camusatCountryId String
539
-
540
- CamusatClient CamusatClient? @relation(fields: [camusatClientId], references: [id])
541
- camusatClientId String?
542
- name String
543
- projects Project[]
544
- }
545
-
546
- model Project {
547
- id String @id @unique @default(uuid())
548
- no Int @default(autoincrement())
549
- name String
550
- logo String? @db.Text //Upload file for logo
551
- status String @default("Pending")
552
- countries Json? //Manage countries
553
- auditMatrices Json? //Audit Matrices
554
- projectPhase String? @default("In-Progress")
555
-
556
- createdAt DateTime @default(now())
557
- updatedAt DateTime @updatedAt
558
- activatedAt DateTime?
559
- deletedAt DateTime?
560
-
561
- types ProjectType[]
562
-
563
- mainProject MainProject @relation(fields: [mainProjectId], references: [id])
564
- mainProjectId String
565
-
566
- User User? @relation(fields: [userId], references: [id])
567
- userId String?
568
-
569
- DispatchProject DispatchProject[]
570
- projectWorkflow ProjectWorkFlow[]
571
- BillOfMaterial BillOfMaterial[]
572
- WorkOrder WorkOrder[]
573
- EmailConfigurations EmailConfigurations[]
574
- WorkOrderChannel WorkOrderChannel[]
575
- problemCategorization problemCategorization[]
576
- EmailTemplates EmailTemplates[]
577
- ReportFormats ReportFormats[]
578
- platforms Platform[]
579
-
580
- pboFatTemplates PboFatTemplate[]
581
- pboFat PboFat[]
582
- cableAttributes CableAttributes[]
583
- spliceClosureAttributes SpliceClosureAttributes[]
584
- Cable Cable[]
585
- CableTemplate CableTemplate[]
586
- CentralOffice CentralOffice[]
587
- qrCodeTemplate qrCodeTemplate[]
588
- projectPhaseLog projectPhaseLog[]
589
- ZoneNro ZoneNro[]
590
- Pole Pole[]
591
- Manhole Manhole[]
592
- Loop Loop[]
593
- FDTSRO FDTSRO[]
594
- SFU SFU[]
595
- Building Building[]
596
- SpliceClosure SpliceClosure[]
597
- SpliceClosureTemplate SpliceClosureTemplate[]
598
- ZoneNroTemplate ZoneNroTemplate[]
599
- PoleTemplate PoleTemplate[]
600
- ManholeTemplate ManholeTemplate[]
601
- LoopTemplate LoopTemplate[]
602
- FDTSROTemplate FDTSROTemplate[]
603
- SFUTemplate SFUTemplate[]
604
- BuildingTemplate BuildingTemplate[]
605
- usersOnline integrationProjectUserStatus[]
606
- MapElementTemplate MapElementTemplate[]
607
- MapElement MapElement[]
608
- ConduitTemplate ConduitTemplate? @relation(fields: [conduitTemplateId], references: [id])
609
- conduitTemplateId String?
610
- }
611
-
612
- model integrationProjectUserStatus {
613
- id String @id @unique @default(uuid())
614
- no Int @default(autoincrement())
615
- isOnline Boolean @default(false)
616
- connectedAt DateTime?
617
-
618
- createdAt DateTime @default(now())
619
- updatedAt DateTime @updatedAt
620
- deletedAt DateTime?
621
-
622
- User User? @relation(fields: [userId], references: [id])
623
- userId String?
624
-
625
- Project Project? @relation(fields: [projectId], references: [id])
626
- projectId String?
627
-
628
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
629
- clusterId String?
630
- }
631
-
632
- model projectPhaseLog {
633
- id String @id @unique @default(uuid())
634
- no Int @default(autoincrement())
635
- project Project @relation(fields: [projectId], references: [id])
636
- projectId String
637
- phase String
638
- action String
639
- comment String?
640
-
641
- createdAt DateTime @default(now())
642
- updatedAt DateTime @updatedAt
643
- deletedAt DateTime?
644
- updatedBy User? @relation(fields: [updatedById], references: [id])
645
- updatedById String?
646
- }
647
-
648
- model Audit {
649
- id Int @id @default(autoincrement())
650
- no Int @default(autoincrement())
651
- module String
652
- moduleId Int?
653
- activity String
654
- detail String? @db.Text
655
- device String? @db.Text
656
- deviceIp String?
657
- platform String?
658
- status String @default("active")
659
-
660
- createdAt DateTime @default(now())
661
- updatedAt DateTime @updatedAt
662
- deletedAt DateTime?
663
- User User? @relation(fields: [userId], references: [id])
664
- userId String?
665
- }
666
-
667
- model DispatchTeam {
668
- id String @id @unique @default(uuid())
669
- name String? //Team name
670
- status String @default("active")
671
-
672
- createdAt DateTime @default(now())
673
- updatedAt DateTime @updatedAt
674
- deletedAt DateTime?
675
- type String @default("team")
676
-
677
- LeadTechnician User @relation("LeadTechnician", fields: [leadTechnicianId], references: [id])
678
- FirstTechnician User? @relation("FirstTechnician", fields: [firstTechnicianId], references: [id])
679
- SecondTechnician User? @relation("SecondTechnician", fields: [secondTechnicianId], references: [id])
680
- OtherTechnician User? @relation("OtherTechnician", fields: [otherTechnicianId], references: [id])
681
- leadTechnicianId String
682
- firstTechnicianId String?
683
- secondTechnicianId String?
684
- otherTechnicianId String?
685
-
686
- contractorTeam Team? @relation(fields: [contractorTeamId], references: [id])
687
- contractorTeamId String?
688
-
689
- TeamMaterial TeamMaterial[]
690
- WorkOrders WorkOrder[]
691
- dispatchProjects DispatchProject[]
692
- workOrderActivityLogs WorkOrderActivityLog[]
693
- }
694
-
695
- model DispatchProject {
696
- id String @id @unique @default(uuid())
697
- no Int @default(autoincrement())
698
- name String //sub project name
699
- type String
700
- teams DispatchTeam[] //Prject Teams
701
- logo String? @db.Text //Upload file for logo
702
- status String @default("active")
703
- createdAt DateTime @default(now())
704
- updatedAt DateTime @updatedAt
705
- activatedAt DateTime?
706
- deletedAt DateTime?
707
- userId String?
708
- projectId String?
709
- Project Project? @relation(fields: [projectId], references: [id])
710
- User User? @relation(fields: [userId], references: [id])
711
- subsidiary CamusatCountry? @relation(fields: [subsidiaryId], references: [id])
712
- subsidiaryId String?
713
- DispatchMaterial DispatchMaterial[]
714
- SubsidiaryMaterial SubsidiaryMaterial[]
715
- clientMaterial clientMaterial[]
716
- teamMaterial TeamMaterial[]
717
- workOrderMaterial WorkOrderMaterial[]
718
- templateComponent TemplateComponent[]
719
- clientMaterialMovementLog clientMaterialMovementLog[]
720
- teamMaterialMovementLog TeamMaterialMovementLog[]
721
- subsidiaryMaterialMovementLog SubsidiaryMaterialMovementLog[]
722
- }
723
-
724
- model ProjectType {
725
- id String @id @unique @default(uuid())
726
- no Int @default(autoincrement())
727
- name String
728
- projects Project[]
729
- }
730
-
731
- model EmailConfigurations {
732
- id String @id @unique @default(uuid())
733
- no Int @default(autoincrement())
734
- name String?
735
- email String?
736
- password String?
737
- typeserver String? @default("IMAP")
738
- server String?
739
- serverportincoming String?
740
- serverportoutgoing String?
741
- authincoming String?
742
- authoutgoing String?
743
- sslincoming Boolean? @default(true)
744
- ssloutgoing Boolean? @default(true)
745
- infodelimiter String? @default(":")
746
- otherdelimiter String?
747
- subject String?
748
- status String @default("active")
749
- channel String @default("EMAIL")
750
- mainId String?
751
- column1title String?
752
- column1key String?
753
- column2title String?
754
- column2key String?
755
- typeKey String?
756
- types Json?
757
- data Json?
758
- sampleData String? @db.Text
759
- emailcount Int? @default(0)
760
- emailsamplenumber Int?
761
- emailuid String?
762
- emailfirstpull Int?
763
- emailfirstcount Int?
764
- excelrownumber Int?
765
- isCustomSla Boolean @default(false)
766
- slaFieldKey String?
767
-
768
- createdAt DateTime @default(now())
769
- updatedAt DateTime @updatedAt
770
- activatedAt DateTime?
771
- deletedAt DateTime?
772
- EmailsIncoming EmailsIncoming[]
773
- EmailsOutGoing EmailsOutgoing[]
774
- WorkOrder WorkOrder[]
775
- Project Project? @relation(fields: [projectId], references: [id])
776
- projectId String?
777
- EmailsIncomingSample EmailsIncomingSample[]
778
- }
779
-
780
- model EmailsIncomingSample {
781
- id String @id @unique @default(uuid())
782
- messageId String?
783
- subject String?
784
- rawbody String?
785
- attachment String?
786
- headers Json?
787
- body Json?
788
- createdAt DateTime @default(now())
789
- updatedAt DateTime @updatedAt
790
-
791
- emailConfigurationsId String
792
- EmailConfigurations EmailConfigurations @relation(fields: [emailConfigurationsId], references: [id])
793
- }
794
-
795
- model EmailsIncoming {
796
- id String @id @unique @default(uuid())
797
- no Int @default(autoincrement())
798
- messageId String
799
- sender String
800
- receiver String
801
- datereceived String
802
- datesent String?
803
- subject String?
804
- body String?
805
- attachment String?
806
- seen Boolean @default(false)
807
- status String @default("active")
808
- createdAt DateTime @default(now())
809
- updatedAt DateTime @updatedAt
810
- activatedAt DateTime?
811
- deletedAt DateTime?
812
- emailConfigurationsId String?
813
- EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])
814
-
815
- WorkOrder WorkOrder[]
816
- }
817
-
818
- model EmailsOutgoing {
819
- id String @id @unique @default(uuid())
820
- no Int @default(autoincrement())
821
- receiver String
822
- subject String?
823
- body String?
824
- attachment String?
825
- status String @default("active")
826
- createdAt DateTime @default(now())
827
- updatedAt DateTime @updatedAt
828
- activatedAt DateTime?
829
- deletedAt DateTime?
830
- emailConfigurationsId String?
831
- EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])
832
- }
833
-
834
- model EmailTemplates {
835
- id String @id @unique @default(uuid())
836
- no Int @default(autoincrement())
837
- name String
838
- subject String?
839
- body String?
840
- signature String? //Signature of the email
841
- attachments Json?
842
- workOrderInfo Json?
843
- mailingList Json?
844
- carbonCopyList Json?
845
- templateInfo Json?
846
- status String @default("active")
847
- createdAt DateTime @default(now())
848
- updatedAt DateTime @updatedAt
849
- deletedAt DateTime?
850
- project Project @relation(fields: [projectId], references: [id])
851
- projectId String
852
- }
853
-
854
- model WorkOrder {
855
- id String @id @unique @default(uuid())
856
- no Int @default(autoincrement())
857
- mainId String
858
- column1 String?
859
- column2 String?
860
- type String?
861
- channel String? @default("EMAIL")
862
- data Json?
863
- rawData Json?
864
- status String @default("new")
865
- statusColour String @default("#ffffff")
866
- workOrderTeamStatus String?
867
- scheduledStartAt DateTime?
868
- scheduledEndAt DateTime?
869
- actionDate DateTime? //Date the work order was completed
870
- auditMatrices Json?
871
- slaStartAt DateTime? //SLA Start Time
872
- sla String?
873
- isPaused Boolean @default(false)
874
-
875
- createdAt DateTime @default(now())
876
- updatedAt DateTime @updatedAt
877
- deletedAt DateTime?
878
-
879
- team DispatchTeam? @relation(fields: [teamId], references: [id])
880
- teamId String?
881
-
882
- projectId String
883
- Project Project @relation(fields: [projectId], references: [id])
884
-
885
- EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])
886
- emailConfigurationsId String?
887
-
888
- EmailsIncoming EmailsIncoming? @relation(fields: [emailsIncomingId], references: [id])
889
- emailsIncomingId String?
890
-
891
- manager User? @relation(fields: [managerId], references: [id])
892
- managerId String?
893
-
894
- workOrderTasks WorkOrderTask[]
895
- workOrderActivityLogs WorkOrderActivityLog[]
896
- workOrderEditLogs WorkOrderEditLog[]
897
- pboFatAttributes PboFatAttributes[]
898
- PboFat PboFat? @relation(fields: [pboFatId], references: [id])
899
- pboFatId String?
900
- SFU SFU? @relation(fields: [sFUId], references: [id])
901
- sFUId String?
902
- Building Building? @relation(fields: [buildingId], references: [id])
903
- buildingId String?
904
- WorkOrderPauses WorkOrderPauses[]
905
- WorkOrderComments WorkOrderComments[]
906
- }
907
-
908
- model WorkOrderChannel {
909
- id String @id @unique @default(uuid())
910
- no Int @default(autoincrement())
911
- name String
912
-
913
- Project Project @relation(fields: [projectId], references: [id])
914
- projectId String
915
-
916
- createdAt DateTime @default(now())
917
- updatedAt DateTime @updatedAt
918
- deletedAt DateTime?
919
- }
920
-
921
- model WorkOrderTask {
922
- id String @id @unique @default(uuid())
923
- no Int @default(autoincrement())
924
- name String
925
- buttonName String
926
- isSpecialFeature Boolean @default(false)
927
- statusColor String?
928
- featureName String?
929
- status String @default("pending")
930
- features Json?
931
- comments String?
932
- scheduledStartAt DateTime?
933
-
934
- createdAt DateTime @default(now())
935
- updatedAt DateTime @updatedAt
936
- deletedAt DateTime?
937
-
938
- technician User? @relation(fields: [technicianId], references: [id])
939
- technicianId String?
940
-
941
- workOrder WorkOrder @relation(fields: [workOrderId], references: [id])
942
- workOrderId String
943
-
944
- templateComponent TemplateComponent? @relation(fields: [templateComponentId], references: [id])
945
- templateComponentId String
946
-
947
- // workOrderTaskData WorkOrderTaskData[]
948
- }
949
-
950
- model WorkOrderActivityLog {
951
- id String @id @unique @default(uuid())
952
- no Int @default(autoincrement())
953
- type String //Type of activity
954
- activity String
955
- detail Json?
956
- reason String?
957
- comment String?
958
- statusUpdate String?
959
-
960
- actionDate DateTime? //Date the work order was completed
961
-
962
- createdAt DateTime @default(now())
963
- updatedAt DateTime @updatedAt
964
- deletedAt DateTime?
965
-
966
- workOrder WorkOrder @relation(fields: [workOrderId], references: [id])
967
- workOrderId String
968
-
969
- User User? @relation(fields: [userId], references: [id])
970
- userId String?
971
-
972
- team DispatchTeam? @relation(fields: [teamId], references: [id])
973
- teamId String?
974
- }
975
-
976
- model WorkOrderEditLog {
977
- id String @id @unique @default(uuid())
978
- no Int @default(autoincrement())
979
- action String @default("Edit")
980
- description String @default("Edit Ticket")
981
- newValues Json?
982
- oldValues Json?
983
-
984
- createdAt DateTime @default(now())
985
- updatedAt DateTime @updatedAt
986
- deletedAt DateTime?
987
-
988
- workOrder WorkOrder @relation(fields: [workOrderId], references: [id])
989
- workOrderId String
990
-
991
- User User? @relation(fields: [userId], references: [id])
992
- userId String?
993
- }
994
-
995
- // Have data as JSON for now
996
- model WorkOrderTaskData {
997
- id String @id @unique @default(uuid())
998
- no Int @default(autoincrement())
999
- description String
1000
- value String
1001
-
1002
- createdAt DateTime @default(now())
1003
- updatedAt DateTime @updatedAt
1004
- deletedAt DateTime?
1005
-
1006
- // workOrderTask WorkOrderTask @relation(fields: [workOrderTaskId], references: [id])
1007
- // workOrderTaskId String
1008
- }
1009
-
1010
- model WorkOrderPauses {
1011
- id String @id @unique @default(uuid())
1012
- no Int @default(autoincrement())
1013
-
1014
- pauseStartAt DateTime
1015
- pauseEndAt DateTime?
1016
-
1017
- createdAt DateTime @default(now())
1018
- updatedAt DateTime @updatedAt
1019
-
1020
- workOrder WorkOrder @relation(fields: [workOrderId], references: [id])
1021
- workOrderId String
1022
- }
1023
-
1024
- model WorkOrderComments {
1025
- id String @id @unique @default(uuid())
1026
- no Int @default(autoincrement())
1027
- comment String
1028
- hasAttachment Boolean @default(false)
1029
- attachment String? @db.Text //Upload file for attachment
1030
-
1031
- createdAt DateTime @default(now())
1032
- updatedAt DateTime @updatedAt
1033
-
1034
- workOrder WorkOrder @relation(fields: [workOrderId], references: [id])
1035
- workOrderId String
1036
-
1037
- createdBy User? @relation(fields: [createdById], references: [id])
1038
- createdById String?
1039
- }
1040
-
1041
- // Houses the materials of a project
1042
- model BillOfMaterial {
1043
- id String @id @unique @default(uuid())
1044
- no Int @default(autoincrement())
1045
- name String
1046
- project Project? @relation(fields: [projectId], references: [id])
1047
- projectId String?
1048
- workflowType String @default("bom")
1049
-
1050
- materials MaterialBillOfMaterial[]
1051
- projectWorkFlow ProjectWorkFlow[]
1052
- templateComponent TemplateComponent[]
1053
-
1054
- createdAt DateTime @default(now())
1055
- updatedAt DateTime @updatedAt
1056
- deletedAt DateTime?
1057
- }
1058
-
1059
- model Material {
1060
- id String @id @unique @default(uuid())
1061
- no Int @default(autoincrement())
1062
- name String
1063
- code String
1064
- description String?
1065
- unit String
1066
- status String @default("active")
1067
-
1068
- createdAt DateTime @default(now())
1069
- updatedAt DateTime @updatedAt
1070
- deletedAt DateTime?
1071
-
1072
- billOfMaterial MaterialBillOfMaterial[]
1073
-
1074
- pboFatAttributes PboFatAttributes[]
1075
- cableAttributes CableAttributes[]
1076
- spliceClosureAttributes SpliceClosureAttributes[]
1077
- }
1078
-
1079
- model MaterialBillOfMaterial {
1080
- id String @id @unique @default(uuid())
1081
- no Int @default(autoincrement())
1082
-
1083
- createdAt DateTime @default(now())
1084
- updatedAt DateTime @updatedAt
1085
- deletedAt DateTime?
1086
-
1087
- material Material @relation(fields: [materialId], references: [id])
1088
- materialId String
1089
- billOfMaterial BillOfMaterial @relation(fields: [billOfMaterialId], references: [id])
1090
- billOfMaterialId String
1091
-
1092
- dispatchMaterial DispatchMaterial[]
1093
- }
1094
-
1095
- model DispatchMaterial {
1096
- id String @id @unique @default(uuid())
1097
- no Int @default(autoincrement())
1098
- materialBillOfMaterial MaterialBillOfMaterial? @relation(fields: [materialbomId], references: [id])
1099
- materialbomId String?
1100
-
1101
- dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])
1102
- dispatchProjectId String?
1103
-
1104
- materialCode String?
1105
- materialName String?
1106
- description String?
1107
- unit String?
1108
- status String @default("active")
1109
-
1110
- quantityAdded String @default("0")
1111
- quantityUsed String @default("0")
1112
- quantityRemaining String @default("0")
1113
-
1114
- createdAt DateTime @default(now())
1115
- updatedAt DateTime @updatedAt
1116
- deletedAt DateTime?
1117
-
1118
- stockMovement StockMovement[]
1119
- clientMaterial clientMaterial[]
1120
- teamMaterial TeamMaterial[]
1121
- workOrderMaterial WorkOrderMaterial[]
1122
- subsidiaryMaterial SubsidiaryMaterial[]
1123
- MaterialChangeLog MaterialChangeLog[]
1124
- }
1125
-
1126
- model StockMovement {
1127
- id String @id @unique @default(uuid())
1128
- no Int @default(autoincrement())
1129
- material DispatchMaterial[]
1130
- movementType String
1131
- to String?
1132
- toId String?
1133
- from String?
1134
- fromId String?
1135
- quantity String
1136
-
1137
- createdAt DateTime @default(now())
1138
- updatedAt DateTime @updatedAt
1139
- }
1140
-
1141
- model clientMaterial {
1142
- id String @id @unique @default(uuid())
1143
- no Int @default(autoincrement())
1144
- material DispatchMaterial @relation(fields: [materialId], references: [id])
1145
- materialId String
1146
- client CamusatClient @relation(fields: [clientId], references: [id])
1147
- clientId String
1148
-
1149
- quantityAdded String @default("0")
1150
- quantityUsed String @default("0")
1151
- quantityRemaining String @default("0")
1152
- status String @default("active")
1153
- type String @default("client")
1154
-
1155
- createdAt DateTime @default(now())
1156
- updatedAt DateTime @updatedAt
1157
- deletedAt DateTime?
1158
-
1159
- clientMaterialMovementLog clientMaterialMovementLog[]
1160
- dispatchProject DispatchProject[]
1161
- }
1162
-
1163
- model clientMaterialMovementLog {
1164
- id String @id @unique @default(uuid())
1165
- no Int @default(autoincrement())
1166
- material clientMaterial[]
1167
- movementType String
1168
- movementFrom String?
1169
- movementFromName String?
1170
- movementFromId String?
1171
- movementTo String?
1172
- movementToName String?
1173
- movementToId String?
1174
- quantity String
1175
- materialMoved Json?
1176
-
1177
- dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])
1178
- dispatchProjectId String?
1179
-
1180
- createdAt DateTime @default(now())
1181
- updatedAt DateTime @updatedAt
1182
- deletedAt DateTime?
1183
- }
1184
-
1185
- model SubsidiaryMaterial {
1186
- id String @id @unique @default(uuid())
1187
- no Int @default(autoincrement())
1188
- material DispatchMaterial @relation(fields: [materialId], references: [id])
1189
- materialId String
1190
-
1191
- subsidiary CamusatCountry @relation(fields: [subsidiaryId], references: [id])
1192
- subsidiaryId String
1193
- dispatchProject DispatchProject[]
1194
-
1195
- quantityAdded String @default("0")
1196
- quantityUsed String @default("0")
1197
- quantityRemaining String @default("0")
1198
- status String @default("active")
1199
- type String @default("subsidiary")
1200
-
1201
- createdAt DateTime @default(now())
1202
- updatedAt DateTime @updatedAt
1203
- deletedAt DateTime?
1204
-
1205
- subsidiaryMaterialMovementLog SubsidiaryMaterialMovementLog[]
1206
- }
1207
-
1208
- model SubsidiaryMaterialMovementLog {
1209
- id String @id @unique @default(uuid())
1210
- no Int @default(autoincrement())
1211
- material SubsidiaryMaterial[]
1212
- movementType String
1213
- movementFrom String?
1214
- movementFromName String?
1215
- movementFromId String?
1216
- movementTo String?
1217
- movementToName String?
1218
- movementToId String?
1219
- quantity String
1220
- materialMoved Json?
1221
-
1222
- dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])
1223
- dispatchProjectId String?
1224
-
1225
- createdAt DateTime @default(now())
1226
- updatedAt DateTime @updatedAt
1227
- deletedAt DateTime?
1228
- }
1229
-
1230
- model TeamMaterial {
1231
- id String @id @unique @default(uuid())
1232
- no Int @default(autoincrement())
1233
- material DispatchMaterial @relation(fields: [materialId], references: [id])
1234
- materialId String
1235
- team DispatchTeam @relation(fields: [teamId], references: [id])
1236
- teamId String
1237
-
1238
- quantityAdded String @default("0")
1239
- quantityUsed String @default("0")
1240
- quantityRemaining String @default("0")
1241
- status String @default("active")
1242
- type String @default("team")
1243
-
1244
- createdAt DateTime @default(now())
1245
- updatedAt DateTime @updatedAt
1246
- deletedAt DateTime?
1247
-
1248
- teamMaterialMovementLog TeamMaterialMovementLog[]
1249
- dispatchProject DispatchProject[]
1250
- }
1251
-
1252
- model TeamMaterialMovementLog {
1253
- id String @id @unique @default(uuid())
1254
- no Int @default(autoincrement())
1255
- material TeamMaterial[]
1256
- movementType String
1257
- movementFrom String?
1258
- movementFromName String?
1259
- movementFromId String?
1260
- movementTo String?
1261
- movementToName String?
1262
- movementToId String?
1263
- quantity String
1264
- materialMoved Json?
1265
-
1266
- dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])
1267
- dispatchProjectId String?
1268
-
1269
- createdAt DateTime @default(now())
1270
- updatedAt DateTime @updatedAt
1271
- deletedAt DateTime?
1272
- }
1273
-
1274
- model WorkOrderMaterial {
1275
- id String @id @unique @default(uuid())
1276
- no Int @default(autoincrement())
1277
- material DispatchMaterial @relation(fields: [materialId], references: [id])
1278
- materialId String
1279
-
1280
- quantityAdded String? @default("0")
1281
- quantityUsed String @default("0")
1282
- quantityRemaining String @default("0")
1283
- status String @default("active")
1284
-
1285
- createdAt DateTime @default(now())
1286
- updatedAt DateTime @updatedAt
1287
- deletedAt DateTime?
1288
-
1289
- ticketMaterialMovementLog ticketMaterialMovementLog[]
1290
- dispatchProject DispatchProject[]
1291
- }
1292
-
1293
- model ticketMaterialMovementLog {
1294
- id String @id @unique @default(uuid())
1295
- no Int @default(autoincrement())
1296
- material WorkOrderMaterial[]
1297
- movementType String
1298
- movementFrom String?
1299
- movementFromId String?
1300
- movementTo String?
1301
- movementToId String?
1302
- quantity String
1303
- materialMoved Json?
1304
-
1305
- createdAt DateTime @default(now())
1306
- updatedAt DateTime @updatedAt
1307
- deletedAt DateTime?
1308
- }
1309
-
1310
- model MaterialChangeLog {
1311
- id String @id @unique @default(uuid())
1312
- no Int @default(autoincrement())
1313
-
1314
- material DispatchMaterial @relation(fields: [materialId], references: [id])
1315
- materialId String
1316
-
1317
- action String
1318
- createdAt DateTime @default(now())
1319
- updatedAt DateTime @updatedAt
1320
- deletedAt DateTime?
1321
- }
1322
-
1323
- model problemCategorization {
1324
- id String @id @unique @default(uuid())
1325
- no Int @default(autoincrement())
1326
- reason String
1327
- problemType String
1328
- platformName String
1329
- project Project? @relation(fields: [projectId], references: [id])
1330
- projectId String?
1331
-
1332
- createdAt DateTime @default(now())
1333
- updatedAt DateTime @updatedAt
1334
- deletedAt DateTime?
1335
- }
1336
-
1337
- model Notifications {
1338
- id String @id @unique @default(uuid())
1339
- no Int @default(autoincrement())
1340
- title String
1341
- description String
1342
- status String @default("unread")
1343
- platform NotificationPlatform @default(Mobile)
1344
- createdAt DateTime @default(now())
1345
- updatedAt DateTime @updatedAt
1346
- deletedAt DateTime?
1347
-
1348
- user User @relation(fields: [userId], references: [id])
1349
- userId String
1350
- }
1351
-
1352
- model ReportFormats {
1353
- id String @id @unique @default(uuid())
1354
- no Int @default(autoincrement())
1355
- name String
1356
- header1 String?
1357
- header2 String?
1358
- header3 String?
1359
- mainInfo Json? //Ticket Main info
1360
- ticketDetails Json? //More ticket details
1361
- materialInfo Json? //Material Info
1362
- teamInfo Json? //Team Info
1363
- interventionResults Json? //Work Order Results
1364
- attachments Json? //Attachments
1365
-
1366
- status String @default("active")
1367
-
1368
- createdAt DateTime @default(now())
1369
- updatedAt DateTime @updatedAt
1370
- deletedAt DateTime?
1371
-
1372
- project Project @relation(fields: [projectId], references: [id])
1373
- projectId String
1374
- }
1375
-
1376
- model NetworkElement {
1377
- id String @id @unique @default(uuid())
1378
- no Int @default(autoincrement())
1379
- type String @unique
1380
- createdAt DateTime @default(now())
1381
- updatedAt DateTime @updatedAt
1382
- deletedAt DateTime?
1383
- classification NetworkElementClassification @default(NetworkElement)
1384
-
1385
- PboFat PboFat[]
1386
- pboFatTemplate PboFatTemplate[]
1387
- Cable Cable[]
1388
- SpliceClosure SpliceClosure[]
1389
- CableTemplate CableTemplate[]
1390
- qrCodeTemplate qrCodeTemplate[]
1391
- ZoneNro ZoneNro[]
1392
- Pole Pole[]
1393
- Manhole Manhole[]
1394
- Loop Loop[]
1395
- FDTSRO FDTSRO[]
1396
- SFU SFU[]
1397
- Building Building[]
1398
- SpliceClosureTemplate SpliceClosureTemplate[]
1399
- ZoneNroTemplate ZoneNroTemplate[]
1400
- PoleTemplate PoleTemplate[]
1401
- ManholeTemplate ManholeTemplate[]
1402
- LoopTemplate LoopTemplate[]
1403
- FDTSROTemplate FDTSROTemplate[]
1404
- SFUTemplate SFUTemplate[]
1405
- BuildingTemplate BuildingTemplate[]
1406
- MapElementTemplate MapElementTemplate[]
1407
- MapElement MapElement[]
1408
- ElementNode ElementNode[]
1409
- Conduit Conduit[]
1410
- ConduitTemplate ConduitTemplate[]
1411
- }
1412
-
1413
- model ElementNode {
1414
- id String @id @unique @default(uuid())
1415
- typeId String
1416
- type NetworkElement @relation(fields: [typeId], references: [id])
1417
- name String
1418
- lat Float?
1419
- lng Float?
1420
- geometry Json?
1421
-
1422
- isInstalled Boolean @default(false)
1423
- installationDate DateTime?
1424
-
1425
- relationsFrom ElementRelation[] @relation("relationsFrom")
1426
- relationsTo ElementRelation[] @relation("relationsTo")
1427
-
1428
- createdAt DateTime @default(now())
1429
- updatedAt DateTime @updatedAt
1430
- AttributeValues AttributeValue[]
1431
- PboFat PboFat[]
1432
- Cable Cable[]
1433
- SpliceClosure SpliceClosure[]
1434
- ZoneNro ZoneNro[]
1435
- Pole Pole[]
1436
- Manhole Manhole[]
1437
- Loop Loop[]
1438
- FDTSRO FDTSRO[]
1439
- SFU SFU[]
1440
- Building Building[]
1441
- MapElement MapElement[]
1442
- Conduit Conduit[]
1443
- }
1444
-
1445
- model ElementRelation {
1446
- id String @id @unique @default(uuid())
1447
- fromId String
1448
- toId String
1449
- relationType RelationType
1450
- metadata Json?
1451
- from ElementNode @relation("relationsFrom", fields: [fromId], references: [id])
1452
- to ElementNode @relation("relationsTo", fields: [toId], references: [id])
1453
-
1454
- clusterId String?
1455
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1456
-
1457
- @@index([fromId])
1458
- @@index([toId])
1459
- @@index([relationType])
1460
- }
1461
-
1462
- model AttributeDefinition {
1463
- id String @id @unique @default(uuid())
1464
- no Int @default(autoincrement())
1465
- key String @unique
1466
- label String
1467
- type AttributeType
1468
-
1469
- required Boolean @default(false)
1470
- visibleOnWeb Boolean @default(true)
1471
- visibleOnMobile Boolean @default(true)
1472
- visibleOnDispatchMobile Boolean @default(true)
1473
- AttributeValue AttributeValue[]
1474
- }
1475
-
1476
- model OptionSource {
1477
- id String @id @unique @default(uuid())
1478
- sourceType String
1479
- staticOptions Json?
1480
- dynamicOptions Json?
1481
- foreignTable String?
1482
- }
1483
-
1484
- model AttributeValue {
1485
- id String @id @unique @default(uuid())
1486
- attributeDefId String
1487
- attributeDef AttributeDefinition @relation(fields: [attributeDefId], references: [id])
1488
- value String //Always store as string, convert to other types in the application layer
1489
-
1490
- node ElementNode @relation(fields: [nodeId], references: [id])
1491
- nodeId String
1492
-
1493
- @@index([nodeId])
1494
- @@index([attributeDefId])
1495
- }
1496
-
1497
- model Cable {
1498
- id String @id @unique @default(uuid())
1499
- no Int @default(autoincrement())
1500
-
1501
- status String @default("active")
1502
- name String?
1503
- terminalAccess Boolean @default(false)
1504
- photos Json? //Upload files for photos
1505
- texts Json? //Add text attributes to the cable
1506
- files Json? //Upload files for the cable
1507
- zone Json? //Color code for zone
1508
- geometry Json? //Icon for the cable
1509
- attributes Json? //Attributes for the cable
1510
- coordinates Json?
1511
- autoincrement Boolean @default(true)
1512
- namePrefix String?
1513
- templateIndex Int?
1514
-
1515
- asBuiltCoordinates Json? //As built coordinates
1516
- isInstalled Boolean @default(false)
1517
- installationDate DateTime?
1518
-
1519
- isInRevision Boolean @default(false)
1520
- installationStatus String? @default("pending") //pending, approved, in-revision
1521
-
1522
- comments String?
1523
-
1524
- // Reporting mirrors
1525
- enclosureOriginType String? //Type of the origin enclosure
1526
- enclosureOriginId String? //ID of the origin enclosure
1527
- enclosureDestinationType String? //Type of the destination enclosure
1528
- enclosureDestinationId String? //ID of the destination enclosure
1529
- cableLength Float? //Length of the cable in meters
1530
- actualCableLength Float? //Actual length of the cable in meters
1531
- type String? //Type of cable (e.g., aerial, underground)
1532
- capacity String? //Capacity of cable(12FO, 24FO, 48FO)
1533
- fibersActive Int? //Number of active fibers
1534
- fibersReserved Int? //Number of reserved fibers
1535
- fibersDark Int? //Number of dark fibers
1536
- fibersDedicated Int? //Number of dedicated fibers
1537
- brand String? //Brand of the cable
1538
- brandDescription String? //Description of the brand
1539
- centralOffice String? //Central office associated with the cable
1540
- mainProject String? //Main project associated with the cable
1541
- projectPhase String? //Project phase (e.g., planning, execution)
1542
- client String? //Client associated with the cable
1543
- subsidiary String? //Subsidiary or branch
1544
-
1545
- // parent/subcable implementation
1546
- isSubcable Boolean @default(false)
1547
-
1548
- parentCable Cable? @relation("CableToSubcables", fields: [parentCableId], references: [id])
1549
- parentCableId String?
1550
- parentCableName String?
1551
-
1552
- subcables Cable[] @relation("CableToSubcables")
1553
-
1554
- createdAt DateTime @default(now())
1555
- updatedAt DateTime @updatedAt
1556
- deletedAt DateTime?
1557
-
1558
- updatedBy User? @relation(fields: [updatedById], references: [id])
1559
- updatedById String?
1560
-
1561
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1562
- networkElementId String
1563
-
1564
- template CableTemplate? @relation(fields: [templateId], references: [id])
1565
- templateId String?
1566
-
1567
- project Project? @relation(fields: [projectId], references: [id])
1568
- projectId String?
1569
-
1570
- node ElementNode? @relation(fields: [nodeId], references: [id])
1571
- nodeId String?
1572
-
1573
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1574
- installationId String?
1575
-
1576
- cableAttachments CableAttachment[]
1577
- cableAttributes CableAttributes[]
1578
- PboFatAttributes PboFatAttributes[]
1579
- spliceClosures SpliceClosure[]
1580
- qrCodeTag qrCodeTag[]
1581
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1582
- clusterId String?
1583
- Revision Revision[]
1584
- ducts Duct[]
1585
- PboFat PboFat[]
1586
- Loop Loop[]
1587
- fdtsro FDTSRO[]
1588
-
1589
- @@index([enclosureOriginType, enclosureOriginId])
1590
- @@index([enclosureDestinationType, enclosureDestinationId])
1591
- }
1592
-
1593
- model CableAttachment {
1594
- id String @id @unique @default(uuid())
1595
- no Int @default(autoincrement())
1596
-
1597
- cable Cable @relation(fields: [cableId], references: [id])
1598
- cableId String
1599
-
1600
- targetType String
1601
- targetId String
1602
-
1603
- role CableAttachmentRole
1604
- metadata Json?
1605
-
1606
- createdAt DateTime @default(now())
1607
- updatedAt DateTime @updatedAt
1608
-
1609
- @@unique([cableId, targetType, targetId, role])
1610
- @@index([targetType, targetId])
1611
- @@index([cableId, role])
1612
- }
1613
-
1614
- model CableTemplate {
1615
- id String @id @unique @default(uuid())
1616
- no Int @default(autoincrement())
1617
-
1618
- status String @default("active")
1619
- name String?
1620
- terminalAccess Boolean @default(false)
1621
- photos Json? //Upload files for photos
1622
- files Json? //Upload files for the cable
1623
- texts Json? //Add text attributes to the cable
1624
- zone Json? //Color code for zone
1625
- geometry Json? //Icon for the cable
1626
- attributes Json? //Attributes for the cable
1627
- coordinates Json?
1628
- autoincrement Boolean @default(true)
1629
- namePrefix String?
1630
-
1631
- createdAt DateTime @default(now())
1632
- updatedAt DateTime @updatedAt
1633
- deletedAt DateTime?
1634
-
1635
- updatedBy User? @relation(fields: [updatedById], references: [id])
1636
- updatedById String?
1637
-
1638
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1639
- networkElementId String
1640
-
1641
- projects Project[]
1642
-
1643
- cableAttributes CableAttributes[]
1644
- qrCodeTemplate qrCodeTemplate[]
1645
- Cable Cable[]
1646
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1647
- clusterId String?
1648
- }
1649
-
1650
- model Conduit {
1651
- id String @id @unique @default(uuid())
1652
- no Int @default(autoincrement())
1653
-
1654
- status String @default("active")
1655
- name String
1656
- terminalAccess Boolean @default(false)
1657
- photos Json? //Upload files for photos
1658
- texts Json? //Add text attributes to the conduit
1659
- files Json? //Upload files for the conduit
1660
- zone Json? //Color code for zone
1661
- geometry Json? //Icon for the conduit
1662
- attributes Json? //Attributes for the conduit
1663
- coordinates Json?
1664
-
1665
- createdAt DateTime @default(now())
1666
- updatedAt DateTime @updatedAt
1667
- deletedAt DateTime?
1668
-
1669
- namePrefix String?
1670
-
1671
- asBuiltCoordinates Json? //As built coordinates
1672
- isInstalled Boolean @default(false)
1673
- installationDate DateTime?
1674
-
1675
- isInRevision Boolean @default(false)
1676
- installationStatus String? @default("pending") //pending, approved, in-revision
1677
-
1678
- address String? //Address of the conduit
1679
- deploymentPhase String? //Deployment phase of the conduit
1680
- trenchConfiguration String? //Trench configuration for the conduit
1681
- trenchDepth Float? //Trench depth for the conduit
1682
- backfillMaterial String? //Backfill material for the conduit
1683
- reinforcementMaterial String? //Reinforcement material for the conduit
1684
- specialCharacteristics String? //Special characteristics of the conduit
1685
- enclosureOriginType String? //Type of the origin enclosure
1686
- enclosureOriginId String? //ID of the origin enclosure
1687
- enclosureDestinationType String? //Type of the destination enclosure
1688
- enclosureDestinationId String? //ID of the destination enclosure
1689
- conduitLength Float? //Length of the conduit in meters
1690
- brand String? //Brand of the conduit
1691
- brandDescription String? //Description of the brand
1692
- materialListReference String? //Reference to the material list
1693
-
1694
- comments String?
1695
-
1696
- updatedBy User? @relation(fields: [updatedById], references: [id])
1697
- updatedById String?
1698
-
1699
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1700
- networkElementId String
1701
-
1702
- node ElementNode? @relation(fields: [nodeId], references: [id])
1703
- nodeId String?
1704
-
1705
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1706
- installationId String?
1707
-
1708
- template ConduitTemplate? @relation(fields: [templateId], references: [id])
1709
- templateId String?
1710
-
1711
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1712
- clusterId String?
1713
- qrCodeTag qrCodeTag[]
1714
- ducts Duct[]
1715
- }
1716
-
1717
- model Duct {
1718
- id String @id @unique @default(uuid())
1719
- no Int @default(autoincrement())
1720
-
1721
- type String
1722
- material String
1723
- dimension Float
1724
- typeOptions String[]
1725
- materialOptions String[]
1726
-
1727
- createdAt DateTime @default(now())
1728
- updatedAt DateTime @updatedAt
1729
- deletedAt DateTime?
1730
-
1731
- conduit Conduit @relation(fields: [conduitId], references: [id])
1732
- conduitId String
1733
-
1734
- cables Cable[]
1735
- }
1736
-
1737
- model ductTemplate {
1738
- id String @id @unique @default(uuid())
1739
- no Int @default(autoincrement())
1740
-
1741
- type String
1742
- material String
1743
- dimension Float
1744
-
1745
- typeOptions String[]
1746
- materialOptions String[]
1747
-
1748
- createdAt DateTime @default(now())
1749
- updatedAt DateTime @updatedAt
1750
- deletedAt DateTime?
1751
-
1752
- conduit ConduitTemplate @relation(fields: [conduitTemplateId], references: [id])
1753
- conduitTemplateId String
1754
- }
1755
-
1756
- model ConduitTemplate {
1757
- id String @id @unique @default(uuid())
1758
- no Int @default(autoincrement())
1759
-
1760
- status String @default("active")
1761
- name String
1762
- terminalAccess Boolean @default(false)
1763
- photos Json? //Upload files for photos
1764
- texts Json? //Add text attributes to the conduit
1765
- files Json? //Upload files for the conduit
1766
- zone Json? //Color code for zone
1767
- geometry Json? //Icon for the conduit
1768
- attributes Json? //Attributes for the conduit
1769
-
1770
- createdAt DateTime @default(now())
1771
- updatedAt DateTime @updatedAt
1772
- deletedAt DateTime?
1773
-
1774
- updatedBy User? @relation(fields: [updatedById], references: [id])
1775
- updatedById String?
1776
-
1777
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1778
- networkElementId String
1779
-
1780
- projects Project[]
1781
- Conduit Conduit[]
1782
-
1783
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1784
- clusterId String?
1785
- qrCodeTemplate qrCodeTemplate[]
1786
- ductTemplates ductTemplate[]
1787
- }
1788
-
1789
- model CableAttributes {
1790
- id String @id @unique @default(uuid())
1791
- no Int @default(autoincrement())
1792
- name String
1793
- description String?
1794
- value String?
1795
- visibleOnMobile Boolean @default(false)
1796
-
1797
- createdAt DateTime @default(now())
1798
- updatedAt DateTime @updatedAt
1799
- deletedAt DateTime?
1800
-
1801
- cable Cable? @relation(fields: [cableId], references: [id])
1802
- cableId String?
1803
-
1804
- project Project? @relation(fields: [projectId], references: [id])
1805
- projectId String?
1806
-
1807
- material Material? @relation(fields: [materialId], references: [id])
1808
- materialId String?
1809
- CableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])
1810
- cableTemplateId String?
1811
- }
1812
-
1813
- model Splitter {
1814
- id String @id @unique @default(uuid())
1815
- no Int @default(autoincrement())
1816
- noOfPorts Int
1817
-
1818
- createdAt DateTime @default(now())
1819
- updatedAt DateTime @updatedAt
1820
- deletedAt DateTime?
1821
-
1822
- PboFatAttributes PboFatAttributes[]
1823
- }
1824
-
1825
- model PboFatTemplate {
1826
- id String @id @unique @default(uuid())
1827
- no Int @default(autoincrement())
1828
-
1829
- status String @default("active")
1830
- terminalAccess Boolean @default(false)
1831
- name String?
1832
- photos Json? //Upload files for photos
1833
- texts Json? //Add text attributes to the PBO FAT
1834
- files Json? //Upload files for the PBO FAT
1835
- zone Json? //Color code for zone
1836
- geometry Json? //Icon for the PBO FAT
1837
- attributes Json? //Attributes for the PBO FAT
1838
- autoincrement Boolean @default(true)
1839
- namePrefix String?
1840
-
1841
- createdAt DateTime @default(now())
1842
- updatedAt DateTime @updatedAt
1843
- deletedAt DateTime?
1844
-
1845
- updatedBy User? @relation(fields: [updatedById], references: [id])
1846
- updatedById String?
1847
-
1848
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1849
- networkElementId String
1850
-
1851
- projects Project[]
1852
-
1853
- pboFatAttributes PboFatAttributes[]
1854
-
1855
- //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase
1856
- qrCodeTemplate qrCodeTemplate[]
1857
- PboFat PboFat[]
1858
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1859
- clusterId String?
1860
- }
1861
-
1862
- model PboFat {
1863
- id String @id @unique @default(uuid())
1864
- no Int @default(autoincrement())
1865
-
1866
- status String @default("active")
1867
- terminalAccess Boolean @default(false)
1868
- name String?
1869
- photos Json? //Upload files for photos
1870
- texts Json? //Add text attributes to the PBO FAT
1871
- files Json? //Upload files for the PBO FAT
1872
- zone Json? //Color code for zone
1873
- geometry Json? //Icon for the PBO FAT
1874
- attributes Json? //Attributes for the PBO FAT
1875
- coordinates Json?
1876
- autoincrement Boolean @default(true)
1877
- namePrefix String?
1878
- templateIndex Int?
1879
-
1880
- asBuiltCoordinates Json? //Coordinates when installed
1881
- isInstalled Boolean @default(false)
1882
- installationDate DateTime?
1883
-
1884
- comments String?
1885
-
1886
- isInRevision Boolean @default(false)
1887
- installationStatus String? @default("pending") //pending, approved, in-revision
1888
-
1889
- // Reporting mirrors
1890
- fatMaximumCapacity Int? //Maximum capacity of the PBO FAT
1891
- fatExistingSubscribers Int? //Existing subscribers in the PBO FAT
1892
- fatAvailableCapacity Int? //Available capacity in the PBO FAT
1893
- placeOfInstallation String? //ID to an Infrastructure element
1894
- address String? //Address of the PBO FAT
1895
- splitter1 String? //1:2, 1:4, 1:8 etc
1896
- splitter2 String?
1897
- previousEquipmentType String? //Type of the previous equipment
1898
- previousEquipmentId String? //ID of the previous equipment
1899
- nextEquipmentType String? //Type of the next equipment
1900
- nextEquipmentId String? //ID of the next equipment
1901
- brand String?
1902
- brandDescription String?
1903
- materialListReference String? //Reference to the material list
1904
-
1905
- createdAt DateTime @default(now())
1906
- updatedAt DateTime @updatedAt
1907
- deletedAt DateTime?
1908
-
1909
- updatedBy User? @relation(fields: [updatedById], references: [id])
1910
- updatedById String?
1911
-
1912
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1913
- networkElementId String
1914
-
1915
- template PboFatTemplate? @relation(fields: [templateId], references: [id])
1916
- templateId String?
1917
-
1918
- project Project? @relation(fields: [projectId], references: [id])
1919
- projectId String?
1920
-
1921
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
1922
- installationId String?
1923
-
1924
- workOrders WorkOrder[]
1925
-
1926
- pboFatAttributes PboFatAttributes[]
1927
- // qrCode qrCode[]
1928
- qrCodeTag qrCodeTag[]
1929
- cluster Cluster? @relation(fields: [clusterId], references: [id])
1930
- clusterId String?
1931
- // cluster relationship but static fields for centraloffice,project, main project etc
1932
- centralOffice String?
1933
- projectPhase String?
1934
- mainProject String?
1935
- client String?
1936
- subsidiary String?
1937
- cables Cable[]
1938
-
1939
- node ElementNode? @relation(fields: [nodeId], references: [id])
1940
- nodeId String?
1941
-
1942
- dependencies PreviousEquipment[]
1943
- Revision Revision[]
1944
- SFU SFU[]
1945
- Building Building[]
1946
-
1947
- @@index([nodeId])
1948
- @@index([clusterId])
1949
- }
1950
-
1951
- model PboFatAttributes {
1952
- id String @id @unique @default(uuid())
1953
- no Int @default(autoincrement())
1954
- name String
1955
- description String?
1956
- value String?
1957
- visibleOnMobile Boolean @default(false)
1958
-
1959
- createdAt DateTime @default(now())
1960
- updatedAt DateTime @updatedAt
1961
- deletedAt DateTime?
1962
-
1963
- cable Cable? @relation(fields: [cableId], references: [id])
1964
- cableId String?
1965
-
1966
- material Material? @relation(fields: [materialId], references: [id])
1967
- materialId String?
1968
-
1969
- pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])
1970
- pboFatTemplateId String?
1971
-
1972
- pboFat PboFat? @relation(fields: [pboFatId], references: [id])
1973
- pboFatId String?
1974
-
1975
- splitter Splitter[]
1976
- workOrder WorkOrder[]
1977
- }
1978
-
1979
- model SpliceClosure {
1980
- // TODO: Add the fields for previous/next equipment, CO and project phase
1981
- id String @id @unique @default(uuid())
1982
- no Int @default(autoincrement())
1983
- name String?
1984
- status String @default("active")
1985
- terminalAccess Boolean @default(false)
1986
- photos Json? //Upload files for photos
1987
- texts Json? //Add text attributes to the PBO FAT
1988
- files Json? //Upload files for the PBO FAT
1989
- zone Json? //Color code for zone
1990
- geometry Json? //Icon for the PBO FAT
1991
- attributes Json? //Attributes for the PBO FAT
1992
- coordinates Json?
1993
- description String?
1994
- autoincrement Boolean @default(true)
1995
- namePrefix String?
1996
- templateIndex Int?
1997
-
1998
- asBuiltCoordinates Json? //Coordinates when installed
1999
- isInstalled Boolean @default(false)
2000
- installationDate DateTime?
2001
-
2002
- isInRevision Boolean @default(false)
2003
- installationStatus String? @default("pending") //pending, approved, in-revision
2004
-
2005
- comments String?
2006
-
2007
- // Reporting mirrors
2008
- spliceClosureMaximumCapacity String? //Maximum capacity of the Splice Closure
2009
- placeOfInstallation String? //ID to an Infrastructure element
2010
- address String? //Address of the Splice Closure
2011
- previousEquipmentType String? //Type of the previous equipment
2012
- previousEquipmentId String? //ID of the previous equipment
2013
- nextEquipmentType String? //Type of the next equipment
2014
- nextEquipmentId String? //ID of the next equipment
2015
- brand String?
2016
- brandDescription String?
2017
- materialListReference String? //Reference to the material list
2018
-
2019
- createdAt DateTime @default(now())
2020
- updatedAt DateTime @updatedAt
2021
- updatedBy User? @relation(fields: [updatedById], references: [id])
2022
- updatedById String?
2023
- deletedAt DateTime?
2024
-
2025
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2026
- networkElementId String
2027
-
2028
- project Project? @relation(fields: [projectId], references: [id])
2029
- projectId String?
2030
-
2031
- template SpliceClosureTemplate? @relation(fields: [templateId], references: [id])
2032
- templateId String?
2033
-
2034
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2035
- clusterId String?
2036
-
2037
- node ElementNode? @relation(fields: [nodeId], references: [id])
2038
- nodeId String?
2039
-
2040
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2041
- installationId String?
2042
-
2043
- spliceClosureAttributes SpliceClosureAttributes[]
2044
- qrCodeTag qrCodeTag[]
2045
-
2046
- dependencies PreviousEquipment[]
2047
- Revision Revision[]
2048
- cables Cable[]
2049
- }
2050
-
2051
- model SpliceClosureTemplate {
2052
- // TODO: Add the fields for previous/next equipment, CO and project phase
2053
- id String @id @unique @default(uuid())
2054
- no Int @default(autoincrement())
2055
- name String?
2056
- status String @default("active")
2057
- terminalAccess Boolean @default(false)
2058
- photos Json? //Upload files for photos
2059
- texts Json? //Add text attributes to the PBO FAT
2060
- files Json? //Upload files for the PBO FAT
2061
- zone Json? //Color code for zone
2062
- geometry Json? //Icon for the PBO FAT
2063
- attributes Json? //Attributes for the PBO FAT
2064
- description String?
2065
- autoincrement Boolean @default(true)
2066
- namePrefix String?
2067
-
2068
- createdAt DateTime @default(now())
2069
- updatedAt DateTime @updatedAt
2070
- updatedBy User? @relation(fields: [updatedById], references: [id])
2071
- updatedById String?
2072
- deletedAt DateTime?
2073
-
2074
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2075
- networkElementId String
2076
-
2077
- projects Project[]
2078
-
2079
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2080
- clusterId String?
2081
-
2082
- spliceClosureAttributes SpliceClosureAttributes[]
2083
- qrCodeTemplate qrCodeTemplate[]
2084
- SpliceClosure SpliceClosure[]
2085
- }
2086
-
2087
- model SpliceClosureAttributes {
2088
- id String @id @unique @default(uuid())
2089
- no Int @default(autoincrement())
2090
- name String
2091
- description String?
2092
- value String?
2093
-
2094
- createdAt DateTime @default(now())
2095
- updatedAt DateTime @updatedAt
2096
- deletedAt DateTime?
2097
-
2098
- // cable Cable? @relation(fields: [cableId], references: [id])
2099
- // cableId String?
2100
-
2101
- project Project? @relation(fields: [projectId], references: [id])
2102
- projectId String?
2103
-
2104
- material Material? @relation(fields: [materialId], references: [id])
2105
- materialId String?
2106
-
2107
- spliceClosure SpliceClosure @relation(fields: [spliceClosureId], references: [id])
2108
- spliceClosureId String
2109
- SpliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])
2110
- spliceClosureTemplateId String?
2111
- }
2112
-
2113
- model ZoneNro {
2114
- id String @id @unique @default(uuid())
2115
- no Int @default(autoincrement())
2116
-
2117
- status String @default("active")
2118
- terminalAccess Boolean @default(false)
2119
- name String?
2120
- photos Json?
2121
- texts Json? //Add text attributes to the zone
2122
- files Json? //Upload files for the zone
2123
- zone Json?
2124
- geometry Json?
2125
- attributes Json?
2126
- coordinates Json?
2127
- autoincrement Boolean @default(true)
2128
- namePrefix String?
2129
- templateIndex Int?
2130
-
2131
- // Reporting mirrors
2132
- zoneHouseCount Int? //Number of houses in the zone
2133
-
2134
- createdAt DateTime @default(now())
2135
- updatedAt DateTime @updatedAt
2136
- deletedAt DateTime?
2137
-
2138
- updatedBy User? @relation(fields: [updatedById], references: [id])
2139
- updatedById String?
2140
-
2141
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2142
- networkElementId String
2143
-
2144
- template ZoneNroTemplate? @relation(fields: [templateId], references: [id])
2145
- templateId String?
2146
-
2147
- project Project? @relation(fields: [projectId], references: [id])
2148
- projectId String?
2149
-
2150
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2151
- clusterId String?
2152
-
2153
- node ElementNode? @relation(fields: [nodeId], references: [id])
2154
- nodeId String?
2155
-
2156
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2157
- installationId String?
2158
-
2159
- qrCodeTag qrCodeTag[]
2160
- }
2161
-
2162
- model ZoneNroTemplate {
2163
- id String @id @unique @default(uuid())
2164
- no Int @default(autoincrement())
2165
-
2166
- status String @default("active")
2167
- terminalAccess Boolean @default(false)
2168
- name String?
2169
- photos Json?
2170
- texts Json? //Add text attributes to the zone
2171
- files Json? //Upload files for the zone
2172
- zone Json?
2173
- geometry Json?
2174
- attributes Json?
2175
- coordinates Json?
2176
- autoincrement Boolean @default(true)
2177
- namePrefix String?
2178
-
2179
- createdAt DateTime @default(now())
2180
- updatedAt DateTime @updatedAt
2181
- deletedAt DateTime?
2182
-
2183
- updatedBy User? @relation(fields: [updatedById], references: [id])
2184
- updatedById String?
2185
-
2186
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2187
- networkElementId String
2188
-
2189
- projects Project[]
2190
-
2191
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2192
- clusterId String?
2193
- qrCodeTemplate qrCodeTemplate[]
2194
- ZoneNro ZoneNro[]
2195
- }
2196
-
2197
- model Pole {
2198
- id String @id @unique @default(uuid())
2199
- no Int @default(autoincrement())
2200
-
2201
- status String @default("active")
2202
- terminalAccess Boolean @default(false)
2203
- name String?
2204
- photos Json?
2205
- texts Json? //Add text attributes to the pole
2206
- files Json? //Upload files for the pole
2207
- zone Json?
2208
- geometry Json?
2209
- attributes Json?
2210
- coordinates Json?
2211
- autoincrement Boolean @default(true)
2212
- namePrefix String?
2213
- templateIndex Int?
2214
-
2215
- asBuiltCoordinates Json? //Coordinates when installed
2216
- isInstalled Boolean @default(false)
2217
- installationDate DateTime?
2218
-
2219
- address String? //Address of the pole
2220
- material String? //Material of the pole
2221
- height Float? //Height of the pole in meters
2222
- topDiameter Float? //Top diameter of the pole in meters
2223
- bottomDiameter Float? //Bottom diameter of the pole in meters
2224
- downGuy Boolean @default(false) //Does the pole have a down guy?
2225
- brand String? //Brand of the pole
2226
- brandDescription String? //Description of the brand
2227
- materialListReference String? //Reference to the material list
2228
-
2229
- comments String?
2230
-
2231
- isInRevision Boolean @default(false)
2232
- installationStatus String? @default("pending") //pending, approved, in-revision
2233
-
2234
- createdAt DateTime @default(now())
2235
- updatedAt DateTime @updatedAt
2236
- deletedAt DateTime?
2237
-
2238
- updatedBy User? @relation(fields: [updatedById], references: [id])
2239
- updatedById String?
2240
-
2241
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2242
- networkElementId String
2243
-
2244
- template PoleTemplate? @relation(fields: [templateId], references: [id])
2245
- templateId String?
2246
-
2247
- project Project? @relation(fields: [projectId], references: [id])
2248
- projectId String?
2249
-
2250
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2251
- clusterId String?
2252
-
2253
- node ElementNode? @relation(fields: [nodeId], references: [id])
2254
- nodeId String?
2255
-
2256
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2257
- installationId String?
2258
-
2259
- qrCodeTag qrCodeTag[]
2260
- Revision Revision[]
2261
- }
2262
-
2263
- model PoleTemplate {
2264
- id String @id @unique @default(uuid())
2265
- no Int @default(autoincrement())
2266
-
2267
- status String @default("active")
2268
- terminalAccess Boolean @default(false)
2269
- name String?
2270
- photos Json?
2271
- texts Json? //Add text attributes to the pole
2272
- files Json? //Upload files for the pole
2273
- zone Json?
2274
- geometry Json?
2275
- attributes Json?
2276
- autoincrement Boolean @default(true)
2277
- namePrefix String?
2278
-
2279
- createdAt DateTime @default(now())
2280
- updatedAt DateTime @updatedAt
2281
- deletedAt DateTime?
2282
-
2283
- updatedBy User? @relation(fields: [updatedById], references: [id])
2284
- updatedById String?
2285
-
2286
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2287
- networkElementId String
2288
-
2289
- projects Project[]
2290
-
2291
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2292
- clusterId String?
2293
- qrCodeTemplate qrCodeTemplate[]
2294
- Pole Pole[]
2295
- }
2296
-
2297
- model Manhole {
2298
- id String @id @unique @default(uuid())
2299
- no Int @default(autoincrement())
2300
-
2301
- status String @default("active")
2302
- terminalAccess Boolean @default(false)
2303
- name String?
2304
- photos Json?
2305
- texts Json? //Add text attributes to the manhole
2306
- files Json? //Upload files for the manhole
2307
- zone Json?
2308
- geometry Json?
2309
- attributes Json?
2310
- coordinates Json?
2311
- autoincrement Boolean @default(true)
2312
- namePrefix String?
2313
- templateIndex Int?
2314
-
2315
- asBuiltCoordinates Json? //Coordinates when installed
2316
- isInstalled Boolean @default(false)
2317
- installationDate DateTime?
2318
-
2319
- address String? //Address of the manhole
2320
- material String? //Material of the manhole
2321
- dimension String? //Dimension of the manhole
2322
- coverType String? //Type of the cover
2323
- brand String? //Brand of the manhole
2324
- brandDescription String? //Description of the brand
2325
- materialListReference String? //Reference to the material list
2326
-
2327
- comments String?
2328
-
2329
- isInRevision Boolean @default(false)
2330
- installationStatus String? @default("pending") //pending, approved, in-revision
2331
-
2332
- createdAt DateTime @default(now())
2333
- updatedAt DateTime @updatedAt
2334
- deletedAt DateTime?
2335
-
2336
- updatedBy User? @relation(fields: [updatedById], references: [id])
2337
- updatedById String?
2338
-
2339
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2340
- networkElementId String
2341
-
2342
- template ManholeTemplate? @relation(fields: [templateId], references: [id])
2343
- templateId String?
2344
-
2345
- project Project? @relation(fields: [projectId], references: [id])
2346
- projectId String?
2347
-
2348
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2349
- clusterId String?
2350
-
2351
- node ElementNode? @relation(fields: [nodeId], references: [id])
2352
- nodeId String?
2353
-
2354
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2355
- installationId String?
2356
-
2357
- qrCodeTag qrCodeTag[]
2358
- Revision Revision[]
2359
- }
2360
-
2361
- model ManholeTemplate {
2362
- id String @id @unique @default(uuid())
2363
- no Int @default(autoincrement())
2364
-
2365
- status String @default("active")
2366
- terminalAccess Boolean @default(false)
2367
- name String?
2368
- photos Json?
2369
- texts Json? //Add text attributes to the manhole
2370
- files Json? //Upload files for the manhole
2371
- zone Json?
2372
- geometry Json?
2373
- attributes Json?
2374
- autoincrement Boolean @default(true)
2375
- namePrefix String?
2376
-
2377
- createdAt DateTime @default(now())
2378
- updatedAt DateTime @updatedAt
2379
- deletedAt DateTime?
2380
-
2381
- updatedBy User? @relation(fields: [updatedById], references: [id])
2382
- updatedById String?
2383
-
2384
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2385
- networkElementId String
2386
-
2387
- projects Project[]
2388
-
2389
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2390
- clusterId String?
2391
- qrCodeTemplate qrCodeTemplate[]
2392
- Manhole Manhole[]
2393
- }
2394
-
2395
- model Loop {
2396
- id String @id @unique @default(uuid())
2397
- no Int @default(autoincrement())
2398
-
2399
- status String @default("active")
2400
- terminalAccess Boolean @default(false)
2401
- name String?
2402
- photos Json?
2403
- texts Json? //Add text attributes to the loop
2404
- files Json? //Upload files for the loop
2405
- zone Json?
2406
- geometry Json?
2407
- attributes Json?
2408
- coordinates Json?
2409
- autoincrement Boolean @default(true)
2410
- namePrefix String?
2411
- templateIndex Int?
2412
-
2413
- asBuiltCoordinates Json? //Coordinates when installed
2414
- isInstalled Boolean @default(false)
2415
- installationDate DateTime?
2416
-
2417
- length Float? //Length of the loop in meters
2418
- brand String? //Brand of the loop
2419
- brandDescription String? //Description of the brand
2420
- materialListReference String? //Reference to the material list
2421
-
2422
- comments String?
2423
-
2424
- isInRevision Boolean @default(false)
2425
- installationStatus String? @default("pending") //pending, approved, in-revision
2426
-
2427
- createdAt DateTime @default(now())
2428
- updatedAt DateTime @updatedAt
2429
- deletedAt DateTime?
2430
-
2431
- updatedBy User? @relation(fields: [updatedById], references: [id])
2432
- updatedById String?
2433
-
2434
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2435
- networkElementId String
2436
-
2437
- template LoopTemplate? @relation(fields: [templateId], references: [id])
2438
- templateId String?
2439
-
2440
- project Project? @relation(fields: [projectId], references: [id])
2441
- projectId String?
2442
-
2443
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2444
- clusterId String?
2445
-
2446
- node ElementNode? @relation(fields: [nodeId], references: [id])
2447
- nodeId String?
2448
-
2449
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2450
- installationId String?
2451
-
2452
- cable Cable? @relation(fields: [cableId], references: [id])
2453
- cableId String?
2454
-
2455
- qrCodeTag qrCodeTag[]
2456
- Revision Revision[]
2457
- }
2458
-
2459
- model LoopTemplate {
2460
- id String @id @unique @default(uuid())
2461
- no Int @default(autoincrement())
2462
-
2463
- status String @default("active")
2464
- terminalAccess Boolean @default(false)
2465
- name String?
2466
- photos Json?
2467
- texts Json? //Add text attributes to the loop
2468
- files Json? //Upload files for the loop
2469
- zone Json?
2470
- geometry Json?
2471
- attributes Json?
2472
- autoincrement Boolean @default(true)
2473
- namePrefix String?
2474
-
2475
- createdAt DateTime @default(now())
2476
- updatedAt DateTime @updatedAt
2477
- deletedAt DateTime?
2478
-
2479
- updatedBy User? @relation(fields: [updatedById], references: [id])
2480
- updatedById String?
2481
-
2482
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2483
- networkElementId String
2484
-
2485
- projects Project[]
2486
-
2487
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2488
- clusterId String?
2489
- qrCodeTemplate qrCodeTemplate[]
2490
- Loop Loop[]
2491
- }
2492
-
2493
- model FDTSRO {
2494
- id String @id @unique @default(uuid())
2495
- no Int @default(autoincrement())
2496
-
2497
- status String @default("active")
2498
- terminalAccess Boolean @default(false)
2499
- name String?
2500
- photos Json?
2501
- texts Json? //Add text attributes to the FDTSRO
2502
- files Json? //Upload files for the FDTSRO
2503
- zone Json?
2504
- geometry Json?
2505
- attributes Json?
2506
- coordinates Json?
2507
- autoincrement Boolean @default(true)
2508
- namePrefix String?
2509
- templateIndex Int?
2510
-
2511
- asBuiltCoordinates Json? //Coordinates when installed
2512
- isInstalled Boolean @default(false)
2513
- installationDate DateTime?
2514
-
2515
- comments String?
2516
-
2517
- isInRevision Boolean @default(false)
2518
- installationStatus String? @default("pending") //pending, approved, in-revision
2519
-
2520
- // Reporting mirrors
2521
- maximumCapacity Int? //Maximum capacity of the FDTSRO
2522
- typeOfEnclosure String? //Type of the enclosure
2523
- placeOfInstallation String? //ID to an Infrastructure element
2524
- address String? //Address of the FDTSRO
2525
- previousEquipmentType String? //Type of the previous equipment
2526
- previousEquipmentId String? //ID of the previous equipment
2527
- nextEquipmentType String? //Type of the next equipment
2528
- nextEquipmentId String? //ID of the next equipment
2529
- splitter1 String? //1:2, 1:4, 1:8 etc
2530
- brand String?
2531
- brandDescription String? //Description of the brand
2532
- materialListReference String? //Reference to the material list
2533
-
2534
- createdAt DateTime @default(now())
2535
- updatedAt DateTime @updatedAt
2536
- deletedAt DateTime?
2537
-
2538
- updatedBy User? @relation(fields: [updatedById], references: [id])
2539
- updatedById String?
2540
-
2541
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2542
- networkElementId String
2543
-
2544
- template FDTSROTemplate? @relation(fields: [templateId], references: [id])
2545
- templateId String?
2546
-
2547
- project Project? @relation(fields: [projectId], references: [id])
2548
- projectId String?
2549
-
2550
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2551
- clusterId String?
2552
-
2553
- node ElementNode? @relation(fields: [nodeId], references: [id])
2554
- nodeId String?
2555
-
2556
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2557
- installationId String?
2558
-
2559
- qrCodeTag qrCodeTag[]
2560
- PreviousEquipment PreviousEquipment[]
2561
- Revision Revision[]
2562
- cables Cable[]
2563
- }
2564
-
2565
- model FDTSROTemplate {
2566
- id String @id @unique @default(uuid())
2567
- no Int @default(autoincrement())
2568
-
2569
- status String @default("active")
2570
- terminalAccess Boolean @default(false)
2571
- name String?
2572
- photos Json?
2573
- texts Json? //Add text attributes to the FDTSRO
2574
- files Json? //Upload files for the FDTSRO
2575
- zone Json?
2576
- geometry Json?
2577
- attributes Json?
2578
- autoincrement Boolean @default(true)
2579
- namePrefix String?
2580
-
2581
- createdAt DateTime @default(now())
2582
- updatedAt DateTime @updatedAt
2583
- deletedAt DateTime?
2584
-
2585
- updatedBy User? @relation(fields: [updatedById], references: [id])
2586
- updatedById String?
2587
-
2588
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2589
- networkElementId String
2590
-
2591
- projects Project[]
2592
-
2593
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2594
- clusterId String?
2595
- qrCodeTemplate qrCodeTemplate[]
2596
- FDTSRO FDTSRO[]
2597
- }
2598
-
2599
- model SFU {
2600
- id String @id @unique @default(uuid())
2601
- no Int @default(autoincrement())
2602
-
2603
- status String @default("active")
2604
- terminalAccess Boolean @default(false)
2605
- name String?
2606
- photos Json?
2607
- texts Json? //Add text attributes to the SFU
2608
- files Json? //Upload files for the SFU
2609
- zone Json?
2610
- geometry Json?
2611
- attributes Json?
2612
- coordinates Json?
2613
- autoincrement Boolean @default(true)
2614
- namePrefix String?
2615
- templateIndex Int?
2616
-
2617
- asBuiltCoordinates Json? //Coordinates when installed
2618
- isInstalled Boolean @default(false)
2619
- installationDate DateTime?
2620
-
2621
- address String? //Address of the SFU
2622
- linkToDispatch String? //Link to the dispatch system
2623
- macAddress String? //MAC address of the Router in the SFU
2624
- gponAddress String? //GPON address of the SFU
2625
-
2626
- isInRevision Boolean @default(false)
2627
- installationStatus String? @default("pending") //pending, approved, in-revision
2628
-
2629
- comments String?
2630
-
2631
- createdAt DateTime @default(now())
2632
- updatedAt DateTime @updatedAt
2633
- deletedAt DateTime?
2634
-
2635
- updatedBy User? @relation(fields: [updatedById], references: [id])
2636
- updatedById String?
2637
-
2638
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2639
- networkElementId String
2640
-
2641
- template SFUTemplate? @relation(fields: [templateId], references: [id])
2642
- templateId String?
2643
-
2644
- project Project? @relation(fields: [projectId], references: [id])
2645
- projectId String?
2646
-
2647
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2648
- clusterId String?
2649
-
2650
- node ElementNode? @relation(fields: [nodeId], references: [id])
2651
- nodeId String?
2652
-
2653
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2654
- installationId String?
2655
-
2656
- pboFat PboFat? @relation(fields: [pboFatId], references: [id])
2657
- pboFatId String?
2658
-
2659
- qrCodeTag qrCodeTag[]
2660
- workOrders WorkOrder[]
2661
- Revision Revision[]
2662
- Building Building? @relation(fields: [buildingId], references: [id])
2663
- buildingId String?
2664
- }
2665
-
2666
- model SFUTemplate {
2667
- id String @id @unique @default(uuid())
2668
- no Int @default(autoincrement())
2669
-
2670
- status String @default("active")
2671
- terminalAccess Boolean @default(false)
2672
- name String?
2673
- photos Json?
2674
- texts Json? //Add text attributes to the SFU
2675
- files Json? //Upload files for the SFU
2676
- zone Json?
2677
- geometry Json?
2678
- attributes Json?
2679
- autoincrement Boolean @default(true)
2680
- namePrefix String?
2681
-
2682
- createdAt DateTime @default(now())
2683
- updatedAt DateTime @updatedAt
2684
- deletedAt DateTime?
2685
-
2686
- updatedBy User? @relation(fields: [updatedById], references: [id])
2687
- updatedById String?
2688
-
2689
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2690
- networkElementId String
2691
-
2692
- projects Project[]
2693
-
2694
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2695
- clusterId String?
2696
- qrCodeTemplate qrCodeTemplate[]
2697
- SFU SFU[]
2698
- }
2699
-
2700
- model Building {
2701
- id String @id @unique @default(uuid())
2702
- no Int @default(autoincrement())
2703
-
2704
- status String @default("active")
2705
- terminalAccess Boolean @default(false)
2706
- name String?
2707
- photos Json?
2708
- texts Json? //Add text attributes to the building
2709
- files Json? //Upload files for the building
2710
- zone Json?
2711
- geometry Json?
2712
- attributes Json?
2713
- coordinates Json?
2714
- autoincrement Boolean @default(true)
2715
- namePrefix String?
2716
- templateIndex Int?
2717
-
2718
- asBuiltCoordinates Json? //Coordinates when installed
2719
- isInstalled Boolean @default(false)
2720
- installationDate DateTime?
2721
-
2722
- comments String?
2723
-
2724
- isInRevision Boolean @default(false)
2725
- installationStatus String? @default("pending") //pending, approved, in-revision
2726
-
2727
- // Reporting mirrors
2728
- address String? //Address of the building
2729
- buildingName String? //Name of the building
2730
- totalFlats Int? //Total number of flats in the building
2731
- floorCount Int? //Number of floors in the building
2732
- flatsPerFloor Int? //Number of flats per floor
2733
- managerName String? //Name of the building manager
2734
- managerPhone String? //Phone number of the building manager
2735
-
2736
- createdAt DateTime @default(now())
2737
- updatedAt DateTime @updatedAt
2738
- deletedAt DateTime?
2739
-
2740
- updatedBy User? @relation(fields: [updatedById], references: [id])
2741
- updatedById String?
2742
-
2743
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2744
- networkElementId String
2745
-
2746
- template BuildingTemplate? @relation(fields: [templateId], references: [id])
2747
- templateId String?
2748
-
2749
- project Project? @relation(fields: [projectId], references: [id])
2750
- projectId String?
2751
-
2752
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2753
- clusterId String?
2754
-
2755
- node ElementNode? @relation(fields: [nodeId], references: [id])
2756
- nodeId String?
2757
-
2758
- installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
2759
- installationId String?
2760
-
2761
- pboFat PboFat? @relation(fields: [pboFatId], references: [id])
2762
- pboFatId String?
2763
-
2764
- sfu SFU[]
2765
- qrCodeTag qrCodeTag[]
2766
- workOrders WorkOrder[]
2767
- Revision Revision[]
2768
- }
2769
-
2770
- model BuildingTemplate {
2771
- id String @id @unique @default(uuid())
2772
- no Int @default(autoincrement())
2773
-
2774
- status String @default("active")
2775
- terminalAccess Boolean @default(false)
2776
- name String?
2777
- photos Json?
2778
- texts Json? //Add text attributes to the building
2779
- files Json? //Upload files for the building
2780
- zone Json?
2781
- geometry Json?
2782
- attributes Json?
2783
- autoincrement Boolean @default(true)
2784
- namePrefix String?
2785
-
2786
- createdAt DateTime @default(now())
2787
- updatedAt DateTime @updatedAt
2788
- deletedAt DateTime?
2789
-
2790
- updatedBy User? @relation(fields: [updatedById], references: [id])
2791
- updatedById String?
2792
-
2793
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2794
- networkElementId String
2795
-
2796
- projects Project[]
2797
-
2798
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2799
- clusterId String?
2800
- qrCodeTemplate qrCodeTemplate[]
2801
- Building Building[]
2802
- }
2803
-
2804
- model Revision {
2805
- id String @id @unique @default(uuid())
2806
-
2807
- pboFatId String?
2808
- spliceClosureId String?
2809
- manholeId String?
2810
- loopId String?
2811
- fdtsroId String?
2812
- sfuId String?
2813
- buildingId String?
2814
- cableId String?
2815
- poleId String?
2816
-
2817
- title String
2818
- comment String
2819
- status RevisionStatus @default(IN_PROGRESS)
2820
- priority Int @default(1)
2821
-
2822
- createdById String?
2823
- resolvedById String?
2824
-
2825
- clusterId String?
2826
-
2827
- createdAt DateTime @default(now())
2828
- updatedAt DateTime @updatedAt
2829
- resolvedAt DateTime?
2830
-
2831
- clientRevisionId String? // ID of the revision from the client side
2832
-
2833
- resolutionNotes String?
2834
-
2835
- pboFat PboFat? @relation(fields: [pboFatId], references: [id])
2836
- spliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])
2837
- manhole Manhole? @relation(fields: [manholeId], references: [id])
2838
- loop Loop? @relation(fields: [loopId], references: [id])
2839
- fdtsro FDTSRO? @relation(fields: [fdtsroId], references: [id])
2840
- sfu SFU? @relation(fields: [sfuId], references: [id])
2841
- building Building? @relation(fields: [buildingId], references: [id])
2842
- cable Cable? @relation(fields: [cableId], references: [id])
2843
- pole Pole? @relation(fields: [poleId], references: [id])
2844
-
2845
- createdBy User? @relation("revisionCreatedBy", fields: [createdById], references: [id])
2846
- resolvedBy User? @relation("revisionResolvedBy", fields: [resolvedById], references: [id])
2847
-
2848
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2849
- }
2850
-
2851
- model MapElementTemplate {
2852
- id String @id @unique @default(uuid())
2853
- no Int @default(autoincrement())
2854
-
2855
- status String @default("active")
2856
- name String?
2857
- photos Json? //Upload files for photos
2858
- texts Json? //Add text attributes to the map element
2859
- files Json? //Upload files for the map element
2860
- zone Json? //Color code for zone
2861
- geometry Json? //Icon for the map element
2862
-
2863
- mapElementType MapElementType @default(Marker)
2864
-
2865
- createdAt DateTime @default(now())
2866
- updatedAt DateTime @updatedAt
2867
- deletedAt DateTime?
2868
-
2869
- updatedBy User? @relation(fields: [updatedById], references: [id])
2870
- updatedById String?
2871
-
2872
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2873
- networkElementId String
2874
-
2875
- projects Project[]
2876
-
2877
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2878
- clusterId String?
2879
- qrCodeTemplate qrCodeTemplate[]
2880
- MapElement MapElement[]
2881
- }
2882
-
2883
- model MapElement {
2884
- id String @id @unique @default(uuid())
2885
- no Int @default(autoincrement())
2886
-
2887
- status String @default("active")
2888
- name String?
2889
- photos Json? //Upload files for photos
2890
- texts Json? //Add text attributes to the map element
2891
- files Json? //Upload files for the map element
2892
- zone Json? //Color code for zone
2893
- geometry Json? //Icon for the map element
2894
- coordinates Json?
2895
- autoincrement Boolean @default(true)
2896
- namePrefix String?
2897
- templateIndex Int?
2898
-
2899
- mapElementType MapElementType @default(Marker)
2900
-
2901
- createdAt DateTime @default(now())
2902
- updatedAt DateTime @updatedAt
2903
- deletedAt DateTime?
2904
-
2905
- updatedBy User? @relation(fields: [updatedById], references: [id])
2906
- updatedById String?
2907
-
2908
- networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
2909
- networkElementId String
2910
-
2911
- template MapElementTemplate? @relation(fields: [templateId], references: [id])
2912
- templateId String?
2913
-
2914
- project Project? @relation(fields: [projectId], references: [id])
2915
- projectId String?
2916
-
2917
- cluster Cluster? @relation(fields: [clusterId], references: [id])
2918
- clusterId String?
2919
-
2920
- node ElementNode? @relation(fields: [nodeId], references: [id])
2921
- nodeId String?
2922
-
2923
- qrCodeTag qrCodeTag[]
2924
- }
2925
-
2926
- model NetworkElementInstallation {
2927
- id String @id @unique @default(uuid())
2928
- no Int @default(autoincrement())
2929
-
2930
- createdAt DateTime @default(now())
2931
- updatedAt DateTime @updatedAt
2932
-
2933
- networkElementId String?
2934
- previousType String?
2935
- previousName String?
2936
- previousId String?
2937
- nextType String?
2938
- nextName String?
2939
- nextId String?
2940
- Cable Cable[]
2941
- PboFat PboFat[]
2942
- SpliceClosure SpliceClosure[]
2943
- ZoneNro ZoneNro[]
2944
- Pole Pole[]
2945
- Manhole Manhole[]
2946
- Loop Loop[]
2947
- FDTSRO FDTSRO[]
2948
- SFU SFU[]
2949
- Building Building[]
2950
- Conduit Conduit[]
2951
- }
2952
-
2953
- model CentralOffice {
2954
- id String @id @unique @default(uuid())
2955
- no Int @default(autoincrement())
2956
- name String
2957
-
2958
- createdAt DateTime @default(now())
2959
- updatedAt DateTime @updatedAt
2960
- deletedAt DateTime?
2961
-
2962
- project Project? @relation(fields: [projectId], references: [id])
2963
- projectId String?
2964
-
2965
- users User[]
2966
- Cluster Cluster[]
2967
- CentralOfficeTeam CentralOfficeTeam[]
2968
- }
2969
-
2970
- model Cluster {
2971
- id String @id @unique @default(uuid())
2972
- no Int @default(autoincrement())
2973
- name String
2974
- coordinates Json?
2975
- color String?
2976
-
2977
- createdAt DateTime @default(now())
2978
- updatedAt DateTime @updatedAt
2979
- deletedAt DateTime?
2980
-
2981
- projectPhase ClusterProjectPhase @default(Survey)
2982
- surveyProjectStatus String @default("Pending")
2983
- designProjectStatus String @default("Pending")
2984
- constructionProjectStatus String @default("Pending")
2985
- gisProjectStatus String @default("Pending")
2986
- dispatchProjectStatus String @default("Pending")
2987
- namingConvention Json?
2988
- installationStatus Int? @default(0) //percentage of installation completed
2989
-
2990
- centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
2991
- centralOfficeId String?
2992
-
2993
- users User[]
2994
- ZoneNro ZoneNro[]
2995
- Pole Pole[]
2996
- Manhole Manhole[]
2997
- Loop Loop[]
2998
- FDTSRO FDTSRO[]
2999
- SFU SFU[]
3000
- Building Building[]
3001
- Cable Cable[]
3002
- PboFat PboFat[]
3003
- SpliceClosure SpliceClosure[]
3004
- CableTemplate CableTemplate[]
3005
- PboFatTemplate PboFatTemplate[]
3006
- SpliceClosureTemplate SpliceClosureTemplate[]
3007
- ZoneNroTemplate ZoneNroTemplate[]
3008
- PoleTemplate PoleTemplate[]
3009
- ManholeTemplate ManholeTemplate[]
3010
- LoopTemplate LoopTemplate[]
3011
- FDTSROTemplate FDTSROTemplate[]
3012
- SFUTemplate SFUTemplate[]
3013
- BuildingTemplate BuildingTemplate[]
3014
- usersOnline integrationProjectUserStatus[]
3015
- qrCodeTemplate qrCodeTemplate[]
3016
- integrationUserLocation integrationUserLocation[]
3017
- MapElementTemplate MapElementTemplate[]
3018
- MapElement MapElement[]
3019
- ClusterComments ClusterComments[]
3020
- Revision Revision[]
3021
- ElementRelation ElementRelation[]
3022
- ClusterNotes ClusterNotes[]
3023
- Conduit Conduit[]
3024
- ConduitTemplate ConduitTemplate[]
3025
- }
3026
-
3027
- model ClusterComments {
3028
- id String @id @unique @default(uuid())
3029
- no Int @default(autoincrement())
3030
-
3031
- comment String
3032
- type String @default("General")
3033
- createdAt DateTime @default(now())
3034
- updatedAt DateTime @updatedAt
3035
- deletedAt DateTime?
3036
-
3037
- user User @relation(fields: [userId], references: [id])
3038
- userId String
3039
-
3040
- cluster Cluster @relation(fields: [clusterId], references: [id])
3041
- clusterId String
3042
- }
3043
-
3044
- model ClusterNotes {
3045
- id String @id @unique @default(uuid())
3046
- no Int @default(autoincrement())
3047
-
3048
- comment String
3049
- hasPicture Boolean @default(false)
3050
- coordinates Json?
3051
- picture String?
3052
-
3053
- createdAt DateTime @default(now())
3054
- updatedAt DateTime @updatedAt
3055
-
3056
- createdBy User @relation(fields: [createdById], references: [id])
3057
- createdById String
3058
-
3059
- cluster Cluster @relation(fields: [clusterId], references: [id])
3060
- clusterId String
3061
- }
3062
-
3063
- model CentralOfficeTeam {
3064
- id String @id @unique @default(uuid())
3065
- no Int @default(autoincrement())
3066
- name String
3067
-
3068
- createdAt DateTime @default(now())
3069
- updatedAt DateTime @updatedAt
3070
- deletedAt DateTime?
3071
-
3072
- centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
3073
- centralOfficeId String?
3074
- users CentralOfficeUser[]
3075
- }
3076
-
3077
- model CentralOfficeUser {
3078
- id String @id @unique @default(uuid())
3079
- no Int @default(autoincrement())
3080
- role CentralOfficeTeamPosition @default(Technician)
3081
-
3082
- createdAt DateTime @default(now())
3083
- updatedAt DateTime @updatedAt
3084
- deletedAt DateTime?
3085
-
3086
- centralOfficeTeam CentralOfficeTeam? @relation(fields: [centralOfficeTeamId], references: [id])
3087
- centralOfficeTeamId String?
3088
-
3089
- user User @relation(fields: [userId], references: [id])
3090
- userId String
3091
- }
3092
-
3093
- model qrCodeTemplate {
3094
- id String @id @unique @default(uuid())
3095
- no Int @default(autoincrement())
3096
- name String
3097
- prefix String
3098
- index Int //number of qr code generated
3099
- scanned Int @default(0)
3100
- link String? @unique //where the qr code will redirect to
3101
- tagDetails Json?
3102
- status String @default("active")
3103
-
3104
- createdAt DateTime @default(now())
3105
- updatedAt DateTime @updatedAt
3106
- deletedAt DateTime?
3107
-
3108
- project Project? @relation(fields: [projectId], references: [id])
3109
- projectId String?
3110
-
3111
- cluster Cluster? @relation(fields: [clusterId], references: [id])
3112
- clusterId String?
3113
-
3114
- // one to many relation with network element
3115
- networkElement NetworkElement? @relation(fields: [networkElementTypeId], references: [id])
3116
- networkElementTypeId String?
3117
-
3118
- networkElementId String?
3119
- templateId String?
3120
-
3121
- pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])
3122
- pboFatTemplateId String?
3123
-
3124
- cableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])
3125
- cableTemplateId String?
3126
-
3127
- spliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])
3128
- spliceClosureTemplateId String?
3129
-
3130
- zoneNroTemplate ZoneNroTemplate? @relation(fields: [zoneNroTemplateId], references: [id])
3131
- zoneNroTemplateId String?
3132
-
3133
- poleTemplate PoleTemplate? @relation(fields: [poleTemplateId], references: [id])
3134
- poleTemplateId String?
3135
-
3136
- manholeTemplate ManholeTemplate? @relation(fields: [manholeTemplateId], references: [id])
3137
- manholeTemplateId String?
3138
-
3139
- loopTemplate LoopTemplate? @relation(fields: [loopTemplateId], references: [id])
3140
- loopTemplateId String?
3141
-
3142
- fdtsroTemplate FDTSROTemplate? @relation(fields: [fdtsroTemplateId], references: [id])
3143
- fdtsroTemplateId String?
3144
-
3145
- sfuTemplate SFUTemplate? @relation(fields: [sfuTemplateId], references: [id])
3146
- sfuTemplateId String?
3147
-
3148
- buildingTemplate BuildingTemplate? @relation(fields: [buildingTemplateId], references: [id])
3149
- buildingTemplateId String?
3150
-
3151
- // cable Cable? @relation(fields: [networkElementId], references: [id])
3152
- // pboFat PboFat? @relation(fields: [networkElementId], references: [id])
3153
- qrCodeTag qrCodeTag[]
3154
- MapElementTemplate MapElementTemplate? @relation(fields: [mapElementTemplateId], references: [id])
3155
- mapElementTemplateId String?
3156
-
3157
- conduitTemplate ConduitTemplate? @relation(fields: [conduitTemplateId], references: [id])
3158
- conduitTemplateId String?
3159
- }
3160
-
3161
- model qrCodeTag {
3162
- id String @id @unique @default(uuid())
3163
- no Int @default(autoincrement())
3164
-
3165
- image String? @db.Text //Upload file for logo
3166
- link String? @unique //where the qr code will redirect to
3167
- scanned Boolean @default(false)
3168
-
3169
- createdAt DateTime @default(now())
3170
- updatedAt DateTime @updatedAt
3171
- deletedAt DateTime?
3172
-
3173
- templateId String?
3174
- networkElementId String?
3175
-
3176
- qrCode qrCodeTemplate @relation(fields: [qrCodeTemplateId], references: [id])
3177
- qrCodeTemplateId String
3178
-
3179
- cable Cable? @relation(fields: [cableId], references: [id])
3180
- cableId String?
3181
-
3182
- pboFat PboFat? @relation(fields: [pboFatId], references: [id])
3183
- pboFatId String?
3184
-
3185
- spliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])
3186
- spliceClosureId String?
3187
-
3188
- zoneNro ZoneNro? @relation(fields: [zoneNroId], references: [id])
3189
- zoneNroId String?
3190
-
3191
- pole Pole? @relation(fields: [poleId], references: [id])
3192
- poleId String?
3193
-
3194
- manhole Manhole? @relation(fields: [manholeId], references: [id])
3195
- manholeId String?
3196
-
3197
- loop Loop? @relation(fields: [loopId], references: [id])
3198
- loopId String?
3199
-
3200
- fdtsro FDTSRO? @relation(fields: [fdtsroId], references: [id])
3201
- fdtsroId String?
3202
-
3203
- sfu SFU? @relation(fields: [sfuId], references: [id])
3204
- sfuId String?
3205
-
3206
- building Building? @relation(fields: [buildingId], references: [id])
3207
- buildingId String?
3208
- MapElement MapElement? @relation(fields: [mapElementId], references: [id])
3209
- mapElementId String?
3210
-
3211
- conduit Conduit? @relation(fields: [conduitId], references: [id])
3212
- conduitId String?
3213
- }
3214
-
3215
- model installationSequence {
3216
- id String @id @unique @default(uuid())
3217
- no Int @default(autoincrement())
3218
- installationId String?
3219
- sequenceOrder Int
3220
- elementChildType NetworkElementChildType
3221
- elementChildId String
3222
- previousInstallationSeqId String?
3223
-
3224
- createdAt DateTime @default(now())
3225
- updatedAt DateTime @updatedAt
3226
-
3227
- parent installationSequence? @relation("ChildToParent", fields: [previousInstallationSeqId], references: [id])
3228
- children installationSequence[] @relation("ChildToParent")
3229
- }
3230
-
3231
- model PreviousEquipment {
3232
- id String @id @unique @default(uuid())
3233
- no Int @default(autoincrement())
3234
- fromTable EquipmentType
3235
- fromId String
3236
- toTable EquipmentType
3237
- toId String
3238
- PboFat PboFat? @relation(fields: [pboFatId], references: [id])
3239
- pboFatId String?
3240
- SpliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])
3241
- spliceClosureId String?
3242
- FDTSRO FDTSRO? @relation(fields: [fdtsroId], references: [id])
3243
- fdtsroId String?
3244
-
3245
- @@unique([fromTable, fromId, toTable, toId])
3246
- }
3247
-
3248
- model integrationUserLocation {
3249
- id String @id @unique @default(uuid())
3250
- no Int @default(autoincrement())
3251
-
3252
- User User @relation(fields: [userId], references: [id])
3253
- userId String
3254
-
3255
- coordinates Json
3256
-
3257
- cluster Cluster? @relation(fields: [clusterId], references: [id])
3258
- clusterId String?
3259
-
3260
- isActive Boolean @default(true)
3261
-
3262
- createdAt DateTime @default(now())
3263
- updatedAt DateTime @updatedAt
3264
- deletedAt DateTime?
3265
- }
3266
-
3267
- model IntegrationReportTemplate {
3268
- id String @id @unique @default(uuid())
3269
- no Int @default(autoincrement())
3270
- name String
3271
-
3272
- createdAt DateTime @default(now())
3273
- updatedAt DateTime @updatedAt
3274
- deletedAt DateTime?
3275
-
3276
- createdBy User? @relation(fields: [createdById], references: [id])
3277
- createdById String?
3278
-
3279
- metrics ReportMetric[]
3280
- visualizations ReportVisualization[]
3281
- ReportTable ReportTable[]
3282
- }
3283
-
3284
- model ReportMetric {
3285
- id String @id @unique @default(uuid())
3286
-
3287
- reportTemplate IntegrationReportTemplate @relation(fields: [reportTemplateId], references: [id])
3288
- reportTemplateId String
3289
-
3290
- elementType NetworkElementChildType?
3291
- attributeName String //Name of the attribute to be reported
3292
-
3293
- metricType MetricType?
3294
-
3295
- // Aggregation across records
3296
- formula AggregationOperation?
3297
- groupByLevel ProjectLevel?
3298
-
3299
- // Formula configuration
3300
- formulaConfig ReportFormulaConfig?
3301
-
3302
- // Usage Classification
3303
- usage ReportUsage[] @default([TABLE])
3304
-
3305
- ReportTable ReportTable[]
3306
- }
3307
-
3308
- model ReportFormulaConfig {
3309
- metricId String @id
3310
- metric ReportMetric @relation(fields: [metricId], references: [id])
3311
-
3312
- resultName String //Name of the result to be reported
3313
- numberOfVariables Int //Number of variables in the formula
3314
- variableAttributes Json //e.g {"variable1": "Client Name", "variable2": "Fat Available Capacity"}
3315
- operations ArithmeticOperation[] //e.g {"operation1": "sum", "operation2": "average"}
3316
- resultFormat ValueFormat @default(NUMBER)
3317
- }
3318
-
3319
- model ReportVisualization {
3320
- id String @id @unique @default(uuid())
3321
-
3322
- template IntegrationReportTemplate @relation(fields: [templateId], references: [id])
3323
- templateId String
3324
-
3325
- metricIds String[] //List of ReportMetric IDs to be visualized
3326
-
3327
- chartType ChartType
3328
- xAxisField String? //e.g "Client Name"
3329
- yAxisField String? //e.g "Fat Available Capacity"
3330
-
3331
- useCustomColors Boolean @default(false)
3332
- customColors Json? //e.g {"red": "#FF0000", "blue": "#0000FF"}
3333
- }
3334
-
3335
- model ReportTable {
3336
- id String @id @unique @default(uuid())
3337
-
3338
- templateId String
3339
- template IntegrationReportTemplate @relation(fields: [templateId], references: [id])
3340
-
3341
- metricId String
3342
- metric ReportMetric @relation(fields: [metricId], references: [id])
3343
-
3344
- columns String[] //e.g ["Client Name", "Fat Available Capacity"]
3345
- includeHeader Boolean @default(true)
3346
- sortBy Json? //e.g {"column": "Client Name", "order": "asc"} for sorting the table by a specific column
3347
- }