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