efiber-prisma-schema 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prisma/{edge.js → generated/generated/edge.js} +6 -2
- package/dist/prisma/{index.js → generated/generated/index.js} +10 -2
- package/dist/prisma/generated/generated/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
- package/dist/prisma/{package.json → generated/generated/package.json} +1 -1
- package/{prisma → dist/prisma/generated/generated}/schema.prisma +3 -2
- package/dist/prisma/{wasm.js → generated/generated/wasm.js} +6 -2
- package/package.json +3 -4
- package/dist/prisma/schema.prisma +0 -3346
- /package/dist/prisma/{client.d.ts → generated/generated/client.d.ts} +0 -0
- /package/dist/prisma/{client.js → generated/generated/client.js} +0 -0
- /package/dist/prisma/{default.d.ts → generated/generated/default.d.ts} +0 -0
- /package/dist/prisma/{default.js → generated/generated/default.js} +0 -0
- /package/dist/prisma/{edge.d.ts → generated/generated/edge.d.ts} +0 -0
- /package/dist/prisma/{index-browser.js → generated/generated/index-browser.js} +0 -0
- /package/dist/prisma/{index.d.ts → generated/generated/index.d.ts} +0 -0
- /package/dist/prisma/{libquery_engine-darwin-arm64.dylib.node → generated/generated/libquery_engine-darwin-arm64.dylib.node} +0 -0
- /package/dist/prisma/{query_engine_bg.js → generated/generated/query_engine_bg.js} +0 -0
- /package/dist/prisma/{query_engine_bg.wasm → generated/generated/query_engine_bg.wasm} +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/edge-esm.js +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/edge.js +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/index-browser.d.ts +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/index-browser.js +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/library.d.ts +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/library.js +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/react-native.js +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/wasm-compiler-edge.js +0 -0
- /package/dist/prisma/{runtime → generated/generated/runtime}/wasm-engine-edge.js +0 -0
- /package/dist/prisma/{wasm-edge-light-loader.mjs → generated/generated/wasm-edge-light-loader.mjs} +0 -0
- /package/dist/prisma/{wasm-worker-loader.mjs → generated/generated/wasm-worker-loader.mjs} +0 -0
- /package/dist/prisma/{wasm.d.ts → generated/generated/wasm.d.ts} +0 -0
|
@@ -2412,6 +2412,10 @@ const config = {
|
|
|
2412
2412
|
"fromEnvVar": null,
|
|
2413
2413
|
"value": "darwin-arm64",
|
|
2414
2414
|
"native": true
|
|
2415
|
+
},
|
|
2416
|
+
{
|
|
2417
|
+
"fromEnvVar": null,
|
|
2418
|
+
"value": "debian-openssl-3.0.x"
|
|
2415
2419
|
}
|
|
2416
2420
|
],
|
|
2417
2421
|
"previewFeatures": [],
|
|
@@ -2437,8 +2441,8 @@ const config = {
|
|
|
2437
2441
|
}
|
|
2438
2442
|
}
|
|
2439
2443
|
},
|
|
2440
|
-
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./generated\"\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nenum NetworkElementClassification {\n NetworkElement\n InfrastructureElement\n MapElement\n}\n\nenum ProjectLevel {\n Subsidiary\n Client\n MainProject\n Project\n CentralOffice\n Cluster\n}\n\nenum NetworkElementChildType {\n PboFat\n Cable\n SpliceClosure\n Zone\n SFU\n Loop\n FDTSRO\n Manhole\n Building\n Pole\n}\n\nenum EquipmentType {\n PboFat\n SpliceClosure\n FDTSRO\n}\n\nenum AggregationOperation {\n LIST\n SUM\n COUNT\n AVERAGE\n}\n\nenum ArithmeticOperation {\n ADD\n SUBTRACT\n MULTIPLY\n DIVIDE\n}\n\nenum ReportUsage {\n TABLE\n VISUALIZATION\n}\n\nenum ValueFormat {\n PERCENTAGE\n NUMBER\n}\n\nenum ChartType {\n BAR\n LINE\n PIE\n}\n\nenum MetricType {\n ProjectInfo\n NetworkElement\n NetworkElementAttributes\n FormulaResult\n}\n\nenum MapElementType {\n Marker\n Polyline\n Polygon\n}\n\nenum CentralOfficeTeamPosition {\n Supervisor\n Designer\n Technician\n}\n\nenum NotificationPlatform {\n Web\n Mobile\n}\n\nenum ClusterProjectPhase {\n Survey\n Design\n Construction\n GIS\n Dispatch\n}\n\nenum RevisionStatus {\n IN_PROGRESS\n SUBMITTED\n APPROVED\n REJECTED\n}\n\nenum RelationType {\n INSTALLED_ON\n CONNECTED_TO\n ENCLOSURE_ORIGIN\n ENCLOSURE_DESTINATION\n}\n\nenum AttributeType {\n TEXT\n NUMBER\n BOOLEAN\n DROPDOWN\n OPTIONS\n DATE\n JSON\n}\n\nenum CableAttachmentRole {\n DESTINATION\n ORIGIN\n}\n\nmodel Country {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n official_name String\n code String\n capital String\n region String\n subregion String\n population String\n timezones String\n flag String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n CamusatCountry CamusatCountry[]\n User User[]\n}\n\nmodel CamusatCountry {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String @unique\n original String?\n description String?\n status String @default(\"active\")\n type String @default(\"subsidiary\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n CamusatClient CamusatClient[]\n mainProjects MainProject[]\n\n Country Country @relation(fields: [countryId], references: [id])\n countryId String\n\n user User[]\n\n dispatchProject DispatchProject[]\n SubsidiaryMaterial SubsidiaryMaterial[]\n}\n\nmodel CamusatClient {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n logo String? @db.Text //Upload file for logo\n type String @default(\"client\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n Country CamusatCountry @relation(fields: [countryId], references: [id])\n countryId String\n\n mainProject MainProject[]\n clientMaterial clientMaterial[]\n users User[]\n}\n\nmodel Platform {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n url String?\n directory String?\n status String @default(\"active\")\n countries Json?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n User User[]\n Project Project[]\n}\n\nmodel Position {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n User User[]\n}\n\nmodel Role {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n login Boolean @default(false)\n access_web Boolean @default(false)\n access_mobile Boolean @default(false)\n add_users Boolean @default(false)\n view_users Boolean @default(false)\n delete_users Boolean @default(false)\n view_requests Boolean @default(false)\n manage_requests Boolean @default(false) //Either approve or rejects\n add_main_projects Boolean @default(false)\n view_main_projects Boolean @default(false)\n edit_main_projects Boolean @default(false)\n delete_main_projects Boolean @default(false)\n view_settings Boolean @default(false)\n view_audit Boolean @default(false)\n full_projects Boolean @default(false)\n add_projects Boolean @default(false)\n edit_projects Boolean @default(false)\n view_projects Boolean @default(false)\n delete_projects Boolean @default(false)\n add_sub_projects Boolean @default(false)\n manage_work_orders Boolean @default(false)\n full_teams Boolean @default(false)\n add_team Boolean @default(false)\n view_team Boolean @default(false)\n quality Boolean @default(false)\n dispatch_web_access Boolean @default(false)\n dispatch_mobile Boolean @default(false)\n dispatch_add_workorders Boolean @default(false)\n dispatch_view_workorders Boolean @default(false)\n dispatch_edit_workorders Boolean @default(false)\n dispatch_view_schedule Boolean @default(false)\n dispatch_add_teams Boolean @default(false)\n dispatch_view_teams Boolean @default(false)\n dispatch_edit_teams Boolean @default(false)\n dispatch_delete_teams Boolean @default(false)\n dispatch_view_projects Boolean @default(false)\n dispatch_edit_projects Boolean @default(false)\n dispatch_edit_materials Boolean @default(false)\n dispatch_view_materials Boolean @default(false)\n dispatch_add_materials Boolean @default(false)\n dispatch_delete_materials Boolean @default(false)\n dispatch_view_reports Boolean @default(false)\n dispatch_view_kpi Boolean @default(false)\n integration_web_access Boolean @default(false)\n integration_mobile Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n User User[]\n}\n\nmodel Template {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String @unique\n statusColor String?\n buttonName String\n workflowType String @default(\"template\")\n\n createdAt DateTime @default(now())\n\n features Feature[]\n templateComponents TemplateComponent[]\n projectWorkFlow ProjectWorkFlow[]\n}\n\nmodel Feature {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n functionality String? // Describes the feature type\n description String // Placeholder in the mobile app\n classification String\n KPI String\n options Json?\n linkToScheduler Boolean @default(false) // For Date and Time, will reschedule the work order\n value String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n featureType FeatureType @relation(fields: [featureTypeId], references: [id])\n featureTypeId String\n\n template Template @relation(fields: [templateId], references: [id])\n templateId String\n}\n\nmodel FeatureType {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n type String\n functionality String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n Feature Feature[]\n}\n\nmodel TemplateComponent {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n type String\n createdAt DateTime @default(now())\n\n template Template? @relation(fields: [templateId], references: [id])\n templateId String?\n\n bomComponent BillOfMaterial? @relation(fields: [bomComponentId], references: [id])\n bomComponentId String?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n index Int? //order of the component\n\n workOrderTasks WorkOrderTask[]\n\n // TODO: Figure out how to tie this to a dispatch Project\n}\n\nmodel ProjectWorkFlow {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n index Int? //order of the workflow\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n template Template? @relation(fields: [templateId], references: [id])\n templateId String?\n\n billofMaterial BillOfMaterial? @relation(fields: [billofMaterialId], references: [id])\n billofMaterialId String?\n}\n\nmodel TeamType {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n Team Team[]\n User User[]\n}\n\nmodel Team {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n teamType TeamType @relation(fields: [teamTypeId], references: [id])\n teamTypeId String\n TeamPlatform TeamPlatform[]\n User User[]\n DispatchTeam DispatchTeam[]\n}\n\nmodel TeamPlatform {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n priority String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n staffs Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n team Team @relation(fields: [teamId], references: [id])\n teamId String\n User User? @relation(fields: [userId], references: [id])\n userId String?\n}\n\nmodel User {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n surname String\n email String @unique\n mobile String\n password String\n otp String?\n passport String? //National Id/ Passport No.\n passportFile String? @db.Text //Upload file for passport\n status String @default(\"active\")\n countries Json? //Manage countrie\n platforms Json? //Platform Access\n staffId String? //Staff ID\n deviceId1 String? //Build ID to limit number of devices\n deviceId2 String? //Build ID to limit number of devices\n notificationTokens String[] @default([])\n webNotificationTokens String[] @default([])\n\n platforms_list Platform[]\n managing_countries CamusatCountry[]\n\n refreshToken String? @unique\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n\n position Position? @relation(fields: [positionId], references: [id])\n teamType TeamType? @relation(fields: [teamTypeId], references: [id])\n team Team? @relation(fields: [teamId], references: [id])\n country Country? @relation(fields: [countryId], references: [id])\n role Role? @relation(fields: [roleId], references: [id])\n\n positionId String?\n teamTypeId String?\n teamId String?\n countryId String?\n roleId String?\n\n TeamPlatform TeamPlatform[]\n project Project[]\n audit Audit[]\n\n leadTechnician DispatchTeam[] @relation(\"LeadTechnician\")\n firstTechnician DispatchTeam[] @relation(\"FirstTechnician\")\n secondTechnician DispatchTeam[] @relation(\"SecondTechnician\")\n otherTechnician DispatchTeam[] @relation(\"OtherTechnician\")\n DispatchProject DispatchProject[]\n WorkOrder WorkOrder[]\n WorkOrderTasks WorkOrderTask[]\n workOrderActivityLogs WorkOrderActivityLog[]\n workOrderEditLogs WorkOrderEditLog[]\n Notifications Notifications[]\n\n pboFatTemplates PboFatTemplate[]\n pboFat PboFat[]\n cable Cable[]\n SpliceClosure SpliceClosure[]\n CableTemplate CableTemplate[]\n CentralOffices CentralOffice[]\n Clusters Cluster[]\n projectPhaseLog projectPhaseLog[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n integrationProjectUserStatus integrationProjectUserStatus[]\n integrationUserLocation integrationUserLocation[]\n CamusatClient CamusatClient[]\n IntegrationReportTemplate IntegrationReportTemplate[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n CentralOfficeUser CentralOfficeUser[]\n ClusterComments ClusterComments[]\n CreatedRevisions Revision[] @relation(\"revisionCreatedBy\")\n ResolvedRevisions Revision[] @relation(\"revisionResolvedBy\")\n ClusterNotes ClusterNotes[]\n Conduit Conduit[]\n ConduitTemplate ConduitTemplate[]\n WorkOrderComments WorkOrderComments[]\n}\n\nmodel MainProject {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n CamusatCountry CamusatCountry @relation(fields: [camusatCountryId], references: [id])\n camusatCountryId String\n\n CamusatClient CamusatClient? @relation(fields: [camusatClientId], references: [id])\n camusatClientId String?\n name String\n projects Project[]\n}\n\nmodel Project {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n logo String? @db.Text //Upload file for logo\n status String @default(\"Pending\")\n countries Json? //Manage countries\n auditMatrices Json? //Audit Matrices\n projectPhase String? @default(\"In-Progress\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n\n types ProjectType[]\n\n mainProject MainProject @relation(fields: [mainProjectId], references: [id])\n mainProjectId String\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n\n DispatchProject DispatchProject[]\n projectWorkflow ProjectWorkFlow[]\n BillOfMaterial BillOfMaterial[]\n WorkOrder WorkOrder[]\n EmailConfigurations EmailConfigurations[]\n WorkOrderChannel WorkOrderChannel[]\n problemCategorization problemCategorization[]\n EmailTemplates EmailTemplates[]\n ReportFormats ReportFormats[]\n platforms Platform[]\n\n pboFatTemplates PboFatTemplate[]\n pboFat PboFat[]\n cableAttributes CableAttributes[]\n spliceClosureAttributes SpliceClosureAttributes[]\n Cable Cable[]\n CableTemplate CableTemplate[]\n CentralOffice CentralOffice[]\n qrCodeTemplate qrCodeTemplate[]\n projectPhaseLog projectPhaseLog[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n SpliceClosure SpliceClosure[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n usersOnline integrationProjectUserStatus[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n ConduitTemplate ConduitTemplate? @relation(fields: [conduitTemplateId], references: [id])\n conduitTemplateId String?\n}\n\nmodel integrationProjectUserStatus {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n isOnline Boolean @default(false)\n connectedAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n\n Project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n Cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n}\n\nmodel projectPhaseLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n phase String\n action String\n comment String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n}\n\nmodel Audit {\n id Int @id @default(autoincrement())\n no Int @default(autoincrement())\n module String\n moduleId Int?\n activity String\n detail String? @db.Text\n device String? @db.Text\n deviceIp String?\n platform String?\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n User User? @relation(fields: [userId], references: [id])\n userId String?\n}\n\nmodel DispatchTeam {\n id String @id @unique @default(uuid())\n name String? //Team name\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n type String @default(\"team\")\n\n LeadTechnician User @relation(\"LeadTechnician\", fields: [leadTechnicianId], references: [id])\n FirstTechnician User? @relation(\"FirstTechnician\", fields: [firstTechnicianId], references: [id])\n SecondTechnician User? @relation(\"SecondTechnician\", fields: [secondTechnicianId], references: [id])\n OtherTechnician User? @relation(\"OtherTechnician\", fields: [otherTechnicianId], references: [id])\n leadTechnicianId String\n firstTechnicianId String?\n secondTechnicianId String?\n otherTechnicianId String?\n\n contractorTeam Team? @relation(fields: [contractorTeamId], references: [id])\n contractorTeamId String?\n\n TeamMaterial TeamMaterial[]\n WorkOrders WorkOrder[]\n dispatchProjects DispatchProject[]\n workOrderActivityLogs WorkOrderActivityLog[]\n}\n\nmodel DispatchProject {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String //sub project name\n type String\n teams DispatchTeam[] //Prject Teams\n logo String? @db.Text //Upload file for logo\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n userId String?\n projectId String?\n Project Project? @relation(fields: [projectId], references: [id])\n User User? @relation(fields: [userId], references: [id])\n subsidiary CamusatCountry? @relation(fields: [subsidiaryId], references: [id])\n subsidiaryId String?\n DispatchMaterial DispatchMaterial[]\n SubsidiaryMaterial SubsidiaryMaterial[]\n clientMaterial clientMaterial[]\n teamMaterial TeamMaterial[]\n workOrderMaterial WorkOrderMaterial[]\n templateComponent TemplateComponent[]\n clientMaterialMovementLog clientMaterialMovementLog[]\n teamMaterialMovementLog TeamMaterialMovementLog[]\n subsidiaryMaterialMovementLog SubsidiaryMaterialMovementLog[]\n}\n\nmodel ProjectType {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n projects Project[]\n}\n\nmodel EmailConfigurations {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String?\n email String?\n password String?\n typeserver String? @default(\"IMAP\")\n server String?\n serverportincoming String?\n serverportoutgoing String?\n authincoming String?\n authoutgoing String?\n sslincoming Boolean? @default(true)\n ssloutgoing Boolean? @default(true)\n infodelimiter String? @default(\":\")\n otherdelimiter String?\n subject String?\n status String @default(\"active\")\n channel String @default(\"EMAIL\")\n mainId String?\n column1title String?\n column1key String?\n column2title String?\n column2key String?\n typeKey String?\n types Json?\n data Json?\n sampleData String? @db.Text\n emailcount Int? @default(0)\n emailsamplenumber Int?\n emailuid String?\n emailfirstpull Int?\n emailfirstcount Int?\n excelrownumber Int?\n isCustomSla Boolean @default(false)\n slaFieldKey String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n EmailsIncoming EmailsIncoming[]\n EmailsOutGoing EmailsOutgoing[]\n WorkOrder WorkOrder[]\n Project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n EmailsIncomingSample EmailsIncomingSample[]\n}\n\nmodel EmailsIncomingSample {\n id String @id @unique @default(uuid())\n messageId String?\n subject String?\n rawbody String?\n attachment String?\n headers Json?\n body Json?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n emailConfigurationsId String\n EmailConfigurations EmailConfigurations @relation(fields: [emailConfigurationsId], references: [id])\n}\n\nmodel EmailsIncoming {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n messageId String\n sender String\n receiver String\n datereceived String\n datesent String?\n subject String?\n body String?\n attachment String?\n seen Boolean @default(false)\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n emailConfigurationsId String?\n EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])\n\n WorkOrder WorkOrder[]\n}\n\nmodel EmailsOutgoing {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n receiver String\n subject String?\n body String?\n attachment String?\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n emailConfigurationsId String?\n EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])\n}\n\nmodel EmailTemplates {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n subject String?\n body String?\n signature String? //Signature of the email\n attachments Json?\n workOrderInfo Json?\n mailingList Json?\n carbonCopyList Json?\n templateInfo Json?\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n}\n\nmodel WorkOrder {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n mainId String\n column1 String?\n column2 String?\n type String?\n channel String? @default(\"EMAIL\")\n data Json?\n rawData Json?\n status String @default(\"new\")\n statusColour String @default(\"#ffffff\")\n workOrderTeamStatus String?\n scheduledStartAt DateTime?\n scheduledEndAt DateTime?\n actionDate DateTime? //Date the work order was completed\n auditMatrices Json?\n slaStartAt DateTime? //SLA Start Time\n sla String?\n isPaused Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n team DispatchTeam? @relation(fields: [teamId], references: [id])\n teamId String?\n\n projectId String\n Project Project @relation(fields: [projectId], references: [id])\n\n EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])\n emailConfigurationsId String?\n\n EmailsIncoming EmailsIncoming? @relation(fields: [emailsIncomingId], references: [id])\n emailsIncomingId String?\n\n manager User? @relation(fields: [managerId], references: [id])\n managerId String?\n\n workOrderTasks WorkOrderTask[]\n workOrderActivityLogs WorkOrderActivityLog[]\n workOrderEditLogs WorkOrderEditLog[]\n pboFatAttributes PboFatAttributes[]\n PboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n SFU SFU? @relation(fields: [sFUId], references: [id])\n sFUId String?\n Building Building? @relation(fields: [buildingId], references: [id])\n buildingId String?\n WorkOrderPauses WorkOrderPauses[]\n WorkOrderComments WorkOrderComments[]\n}\n\nmodel WorkOrderChannel {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n Project Project @relation(fields: [projectId], references: [id])\n projectId String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel WorkOrderTask {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n buttonName String\n isSpecialFeature Boolean @default(false)\n statusColor String?\n featureName String?\n status String @default(\"pending\")\n features Json?\n comments String?\n scheduledStartAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n technician User? @relation(fields: [technicianId], references: [id])\n technicianId String?\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n templateComponent TemplateComponent? @relation(fields: [templateComponentId], references: [id])\n templateComponentId String\n\n // workOrderTaskData WorkOrderTaskData[]\n}\n\nmodel WorkOrderActivityLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n type String //Type of activity\n activity String\n detail Json?\n reason String?\n comment String?\n statusUpdate String?\n\n actionDate DateTime? //Date the work order was completed\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n\n team DispatchTeam? @relation(fields: [teamId], references: [id])\n teamId String?\n}\n\nmodel WorkOrderEditLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n action String @default(\"Edit\")\n description String @default(\"Edit Ticket\")\n newValues Json?\n oldValues Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n}\n\n// Have data as JSON for now\nmodel WorkOrderTaskData {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n description String\n value String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n // workOrderTask WorkOrderTask @relation(fields: [workOrderTaskId], references: [id])\n // workOrderTaskId String\n}\n\nmodel WorkOrderPauses {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n pauseStartAt DateTime\n pauseEndAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n}\n\nmodel WorkOrderComments {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n comment String\n hasAttachment Boolean @default(false)\n attachment String? @db.Text //Upload file for attachment\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n createdBy User? @relation(fields: [createdById], references: [id])\n createdById String?\n}\n\n// Houses the materials of a project\nmodel BillOfMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n workflowType String @default(\"bom\")\n\n materials MaterialBillOfMaterial[]\n projectWorkFlow ProjectWorkFlow[]\n templateComponent TemplateComponent[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel Material {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n code String\n description String?\n unit String\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n billOfMaterial MaterialBillOfMaterial[]\n\n pboFatAttributes PboFatAttributes[]\n cableAttributes CableAttributes[]\n spliceClosureAttributes SpliceClosureAttributes[]\n}\n\nmodel MaterialBillOfMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n material Material @relation(fields: [materialId], references: [id])\n materialId String\n billOfMaterial BillOfMaterial @relation(fields: [billOfMaterialId], references: [id])\n billOfMaterialId String\n\n dispatchMaterial DispatchMaterial[]\n}\n\nmodel DispatchMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n materialBillOfMaterial MaterialBillOfMaterial? @relation(fields: [materialbomId], references: [id])\n materialbomId String?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n materialCode String?\n materialName String?\n description String?\n unit String?\n status String @default(\"active\")\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n stockMovement StockMovement[]\n clientMaterial clientMaterial[]\n teamMaterial TeamMaterial[]\n workOrderMaterial WorkOrderMaterial[]\n subsidiaryMaterial SubsidiaryMaterial[]\n MaterialChangeLog MaterialChangeLog[]\n}\n\nmodel StockMovement {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial[]\n movementType String\n to String?\n toId String?\n from String?\n fromId String?\n quantity String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel clientMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n client CamusatClient @relation(fields: [clientId], references: [id])\n clientId String\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n type String @default(\"client\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n clientMaterialMovementLog clientMaterialMovementLog[]\n dispatchProject DispatchProject[]\n}\n\nmodel clientMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material clientMaterial[]\n movementType String\n movementFrom String?\n movementFromName String?\n movementFromId String?\n movementTo String?\n movementToName String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel SubsidiaryMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n\n subsidiary CamusatCountry @relation(fields: [subsidiaryId], references: [id])\n subsidiaryId String\n dispatchProject DispatchProject[]\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n type String @default(\"subsidiary\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n subsidiaryMaterialMovementLog SubsidiaryMaterialMovementLog[]\n}\n\nmodel SubsidiaryMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material SubsidiaryMaterial[]\n movementType String\n movementFrom String?\n movementFromName String?\n movementFromId String?\n movementTo String?\n movementToName String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel TeamMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n team DispatchTeam @relation(fields: [teamId], references: [id])\n teamId String\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n type String @default(\"team\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n teamMaterialMovementLog TeamMaterialMovementLog[]\n dispatchProject DispatchProject[]\n}\n\nmodel TeamMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material TeamMaterial[]\n movementType String\n movementFrom String?\n movementFromName String?\n movementFromId String?\n movementTo String?\n movementToName String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel WorkOrderMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n\n quantityAdded String? @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n ticketMaterialMovementLog ticketMaterialMovementLog[]\n dispatchProject DispatchProject[]\n}\n\nmodel ticketMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material WorkOrderMaterial[]\n movementType String\n movementFrom String?\n movementFromId String?\n movementTo String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel MaterialChangeLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n\n action String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel problemCategorization {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n reason String\n problemType String\n platformName String\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel Notifications {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n title String\n description String\n status String @default(\"unread\")\n platform NotificationPlatform @default(Mobile)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n user User @relation(fields: [userId], references: [id])\n userId String\n}\n\nmodel ReportFormats {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n header1 String?\n header2 String?\n header3 String?\n mainInfo Json? //Ticket Main info\n ticketDetails Json? //More ticket details\n materialInfo Json? //Material Info\n teamInfo Json? //Team Info\n interventionResults Json? //Work Order Results\n attachments Json? //Attachments\n\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n}\n\nmodel NetworkElement {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n type String @unique\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n classification NetworkElementClassification @default(NetworkElement)\n\n PboFat PboFat[]\n pboFatTemplate PboFatTemplate[]\n Cable Cable[]\n SpliceClosure SpliceClosure[]\n CableTemplate CableTemplate[]\n qrCodeTemplate qrCodeTemplate[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n ElementNode ElementNode[]\n Conduit Conduit[]\n ConduitTemplate ConduitTemplate[]\n}\n\nmodel ElementNode {\n id String @id @unique @default(uuid())\n typeId String\n type NetworkElement @relation(fields: [typeId], references: [id])\n name String\n lat Float?\n lng Float?\n geometry Json?\n\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n relationsFrom ElementRelation[] @relation(\"relationsFrom\")\n relationsTo ElementRelation[] @relation(\"relationsTo\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n AttributeValues AttributeValue[]\n PboFat PboFat[]\n Cable Cable[]\n SpliceClosure SpliceClosure[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n MapElement MapElement[]\n Conduit Conduit[]\n}\n\nmodel ElementRelation {\n id String @id @unique @default(uuid())\n fromId String\n toId String\n relationType RelationType\n metadata Json?\n from ElementNode @relation(\"relationsFrom\", fields: [fromId], references: [id])\n to ElementNode @relation(\"relationsTo\", fields: [toId], references: [id])\n\n clusterId String?\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n\n @@index([fromId])\n @@index([toId])\n @@index([relationType])\n}\n\nmodel AttributeDefinition {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n key String @unique\n label String\n type AttributeType\n\n required Boolean @default(false)\n visibleOnWeb Boolean @default(true)\n visibleOnMobile Boolean @default(true)\n visibleOnDispatchMobile Boolean @default(true)\n AttributeValue AttributeValue[]\n}\n\nmodel OptionSource {\n id String @id @unique @default(uuid())\n sourceType String\n staticOptions Json?\n dynamicOptions Json?\n foreignTable String?\n}\n\nmodel AttributeValue {\n id String @id @unique @default(uuid())\n attributeDefId String\n attributeDef AttributeDefinition @relation(fields: [attributeDefId], references: [id])\n value String //Always store as string, convert to other types in the application layer\n\n node ElementNode @relation(fields: [nodeId], references: [id])\n nodeId String\n\n @@index([nodeId])\n @@index([attributeDefId])\n}\n\nmodel Cable {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the cable\n files Json? //Upload files for the cable\n zone Json? //Color code for zone\n geometry Json? //Icon for the cable\n attributes Json? //Attributes for the cable\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //As built coordinates\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n comments String?\n\n // Reporting mirrors\n enclosureOriginType String? //Type of the origin enclosure\n enclosureOriginId String? //ID of the origin enclosure\n enclosureDestinationType String? //Type of the destination enclosure\n enclosureDestinationId String? //ID of the destination enclosure\n cableLength Float? //Length of the cable in meters\n actualCableLength Float? //Actual length of the cable in meters\n type String? //Type of cable (e.g., aerial, underground)\n capacity String? //Capacity of cable(12FO, 24FO, 48FO)\n fibersActive Int? //Number of active fibers\n fibersReserved Int? //Number of reserved fibers\n fibersDark Int? //Number of dark fibers\n fibersDedicated Int? //Number of dedicated fibers\n brand String? //Brand of the cable\n brandDescription String? //Description of the brand\n centralOffice String? //Central office associated with the cable\n mainProject String? //Main project associated with the cable\n projectPhase String? //Project phase (e.g., planning, execution)\n client String? //Client associated with the cable\n subsidiary String? //Subsidiary or branch\n\n // parent/subcable implementation\n isSubcable Boolean @default(false)\n\n parentCable Cable? @relation(\"CableToSubcables\", fields: [parentCableId], references: [id])\n parentCableId String?\n parentCableName String?\n\n subcables Cable[] @relation(\"CableToSubcables\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template CableTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n cableAttachments CableAttachment[]\n cableAttributes CableAttributes[]\n PboFatAttributes PboFatAttributes[]\n spliceClosures SpliceClosure[]\n qrCodeTag qrCodeTag[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n Revision Revision[]\n ducts Duct[]\n PboFat PboFat[]\n Loop Loop[]\n fdtsro FDTSRO[]\n\n @@index([enclosureOriginType, enclosureOriginId])\n @@index([enclosureDestinationType, enclosureDestinationId])\n}\n\nmodel CableAttachment {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n cable Cable @relation(fields: [cableId], references: [id])\n cableId String\n\n targetType String\n targetId String\n\n role CableAttachmentRole\n metadata Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([cableId, targetType, targetId, role])\n @@index([targetType, targetId])\n @@index([cableId, role])\n}\n\nmodel CableTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n files Json? //Upload files for the cable\n texts Json? //Add text attributes to the cable\n zone Json? //Color code for zone\n geometry Json? //Icon for the cable\n attributes Json? //Attributes for the cable\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cableAttributes CableAttributes[]\n qrCodeTemplate qrCodeTemplate[]\n Cable Cable[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n}\n\nmodel Conduit {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the conduit\n files Json? //Upload files for the conduit\n zone Json? //Color code for zone\n geometry Json? //Icon for the conduit\n attributes Json? //Attributes for the conduit\n coordinates Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n namePrefix String?\n\n asBuiltCoordinates Json? //As built coordinates\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n address String? //Address of the conduit\n deploymentPhase String? //Deployment phase of the conduit\n trenchConfiguration String? //Trench configuration for the conduit\n trenchDepth Float? //Trench depth for the conduit\n backfillMaterial String? //Backfill material for the conduit\n reinforcementMaterial String? //Reinforcement material for the conduit\n specialCharacteristics String? //Special characteristics of the conduit\n enclosureOriginType String? //Type of the origin enclosure\n enclosureOriginId String? //ID of the origin enclosure\n enclosureDestinationType String? //Type of the destination enclosure\n enclosureDestinationId String? //ID of the destination enclosure\n conduitLength Float? //Length of the conduit in meters\n brand String? //Brand of the conduit\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n template ConduitTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTag qrCodeTag[]\n ducts Duct[]\n}\n\nmodel Duct {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n type String\n material String\n dimension Float\n typeOptions String[]\n materialOptions String[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n conduit Conduit @relation(fields: [conduitId], references: [id])\n conduitId String\n\n cables Cable[]\n}\n\nmodel ductTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n type String\n material String\n dimension Float\n\n typeOptions String[]\n materialOptions String[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n conduit ConduitTemplate @relation(fields: [conduitTemplateId], references: [id])\n conduitTemplateId String\n}\n\nmodel ConduitTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the conduit\n files Json? //Upload files for the conduit\n zone Json? //Color code for zone\n geometry Json? //Icon for the conduit\n attributes Json? //Attributes for the conduit\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n Conduit Conduit[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n ductTemplates ductTemplate[]\n}\n\nmodel CableAttributes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n value String?\n visibleOnMobile Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n material Material? @relation(fields: [materialId], references: [id])\n materialId String?\n CableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])\n cableTemplateId String?\n}\n\nmodel Splitter {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n noOfPorts Int\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n PboFatAttributes PboFatAttributes[]\n}\n\nmodel PboFatTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n pboFatAttributes PboFatAttributes[]\n\n //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase\n qrCodeTemplate qrCodeTemplate[]\n PboFat PboFat[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n}\n\nmodel PboFat {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n // Reporting mirrors\n fatMaximumCapacity Int? //Maximum capacity of the PBO FAT\n fatExistingSubscribers Int? //Existing subscribers in the PBO FAT\n fatAvailableCapacity Int? //Available capacity in the PBO FAT\n placeOfInstallation String? //ID to an Infrastructure element\n address String? //Address of the PBO FAT \n splitter1 String? //1:2, 1:4, 1:8 etc\n splitter2 String?\n previousEquipmentType String? //Type of the previous equipment\n previousEquipmentId String? //ID of the previous equipment\n nextEquipmentType String? //Type of the next equipment\n nextEquipmentId String? //ID of the next equipment\n brand String?\n brandDescription String?\n materialListReference String? //Reference to the material list\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template PboFatTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n workOrders WorkOrder[]\n\n pboFatAttributes PboFatAttributes[]\n // qrCode qrCode[]\n qrCodeTag qrCodeTag[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n // cluster relationship but static fields for centraloffice,project, main project etc\n centralOffice String?\n projectPhase String?\n mainProject String?\n client String?\n subsidiary String?\n cables Cable[]\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n dependencies PreviousEquipment[]\n Revision Revision[]\n SFU SFU[]\n Building Building[]\n\n @@index([nodeId])\n @@index([clusterId])\n}\n\nmodel PboFatAttributes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n value String?\n visibleOnMobile Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n material Material? @relation(fields: [materialId], references: [id])\n materialId String?\n\n pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])\n pboFatTemplateId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n splitter Splitter[]\n workOrder WorkOrder[]\n}\n\nmodel SpliceClosure {\n // TODO: Add the fields for previous/next equipment, CO and project phase\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String?\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n coordinates Json?\n description String?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n comments String?\n\n // Reporting mirrors\n spliceClosureMaximumCapacity String? //Maximum capacity of the Splice Closure\n placeOfInstallation String? //ID to an Infrastructure element\n address String? //Address of the Splice Closure\n previousEquipmentType String? //Type of the previous equipment\n previousEquipmentId String? //ID of the previous equipment\n nextEquipmentType String? //Type of the next equipment\n nextEquipmentId String? //ID of the next equipment\n brand String?\n brandDescription String?\n materialListReference String? //Reference to the material list\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n deletedAt DateTime?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n template SpliceClosureTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n spliceClosureAttributes SpliceClosureAttributes[]\n qrCodeTag qrCodeTag[]\n\n dependencies PreviousEquipment[]\n Revision Revision[]\n cables Cable[]\n}\n\nmodel SpliceClosureTemplate {\n // TODO: Add the fields for previous/next equipment, CO and project phase\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String?\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n description String?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n deletedAt DateTime?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n spliceClosureAttributes SpliceClosureAttributes[]\n qrCodeTemplate qrCodeTemplate[]\n SpliceClosure SpliceClosure[]\n}\n\nmodel SpliceClosureAttributes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n value String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n // cable Cable? @relation(fields: [cableId], references: [id])\n // cableId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n material Material? @relation(fields: [materialId], references: [id])\n materialId String?\n\n spliceClosure SpliceClosure @relation(fields: [spliceClosureId], references: [id])\n spliceClosureId String\n SpliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])\n spliceClosureTemplateId String?\n}\n\nmodel ZoneNro {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the zone\n files Json? //Upload files for the zone\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n // Reporting mirrors\n zoneHouseCount Int? //Number of houses in the zone\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template ZoneNroTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n}\n\nmodel ZoneNroTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the zone\n files Json? //Upload files for the zone\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n ZoneNro ZoneNro[]\n}\n\nmodel Pole {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the pole\n files Json? //Upload files for the pole\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n address String? //Address of the pole\n material String? //Material of the pole\n height Float? //Height of the pole in meters\n topDiameter Float? //Top diameter of the pole in meters\n bottomDiameter Float? //Bottom diameter of the pole in meters\n downGuy Boolean @default(false) //Does the pole have a down guy?\n brand String? //Brand of the pole\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template PoleTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n Revision Revision[]\n}\n\nmodel PoleTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the pole\n files Json? //Upload files for the pole\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Pole Pole[]\n}\n\nmodel Manhole {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the manhole\n files Json? //Upload files for the manhole\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n address String? //Address of the manhole\n material String? //Material of the manhole\n dimension String? //Dimension of the manhole\n coverType String? //Type of the cover\n brand String? //Brand of the manhole\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template ManholeTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n Revision Revision[]\n}\n\nmodel ManholeTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the manhole\n files Json? //Upload files for the manhole\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Manhole Manhole[]\n}\n\nmodel Loop {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the loop\n files Json? //Upload files for the loop\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n length Float? //Length of the loop in meters\n brand String? //Brand of the loop\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template LoopTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n qrCodeTag qrCodeTag[]\n Revision Revision[]\n}\n\nmodel LoopTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the loop\n files Json? //Upload files for the loop\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Loop Loop[]\n}\n\nmodel FDTSRO {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the FDTSRO\n files Json? //Upload files for the FDTSRO\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n // Reporting mirrors\n maximumCapacity Int? //Maximum capacity of the FDTSRO\n typeOfEnclosure String? //Type of the enclosure\n placeOfInstallation String? //ID to an Infrastructure element\n address String? //Address of the FDTSRO\n previousEquipmentType String? //Type of the previous equipment\n previousEquipmentId String? //ID of the previous equipment\n nextEquipmentType String? //Type of the next equipment\n nextEquipmentId String? //ID of the next equipment\n splitter1 String? //1:2, 1:4, 1:8 etc\n brand String?\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template FDTSROTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n PreviousEquipment PreviousEquipment[]\n Revision Revision[]\n cables Cable[]\n}\n\nmodel FDTSROTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the FDTSRO\n files Json? //Upload files for the FDTSRO\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n FDTSRO FDTSRO[]\n}\n\nmodel SFU {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the SFU\n files Json? //Upload files for the SFU\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n address String? //Address of the SFU\n linkToDispatch String? //Link to the dispatch system\n macAddress String? //MAC address of the Router in the SFU\n gponAddress String? //GPON address of the SFU\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n comments String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template SFUTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n qrCodeTag qrCodeTag[]\n workOrders WorkOrder[]\n Revision Revision[]\n Building Building? @relation(fields: [buildingId], references: [id])\n buildingId String?\n}\n\nmodel SFUTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the SFU\n files Json? //Upload files for the SFU\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n SFU SFU[]\n}\n\nmodel Building {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the building\n files Json? //Upload files for the building\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n // Reporting mirrors\n address String? //Address of the building\n buildingName String? //Name of the building\n totalFlats Int? //Total number of flats in the building\n floorCount Int? //Number of floors in the building\n flatsPerFloor Int? //Number of flats per floor\n managerName String? //Name of the building manager\n managerPhone String? //Phone number of the building manager\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template BuildingTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n sfu SFU[]\n qrCodeTag qrCodeTag[]\n workOrders WorkOrder[]\n Revision Revision[]\n}\n\nmodel BuildingTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the building\n files Json? //Upload files for the building\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Building Building[]\n}\n\nmodel Revision {\n id String @id @unique @default(uuid())\n\n pboFatId String?\n spliceClosureId String?\n manholeId String?\n loopId String?\n fdtsroId String?\n sfuId String?\n buildingId String?\n cableId String?\n poleId String?\n\n title String\n comment String\n status RevisionStatus @default(IN_PROGRESS)\n priority Int @default(1)\n\n createdById String?\n resolvedById String?\n\n clusterId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n resolvedAt DateTime?\n\n clientRevisionId String? // ID of the revision from the client side\n\n resolutionNotes String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n spliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])\n manhole Manhole? @relation(fields: [manholeId], references: [id])\n loop Loop? @relation(fields: [loopId], references: [id])\n fdtsro FDTSRO? @relation(fields: [fdtsroId], references: [id])\n sfu SFU? @relation(fields: [sfuId], references: [id])\n building Building? @relation(fields: [buildingId], references: [id])\n cable Cable? @relation(fields: [cableId], references: [id])\n pole Pole? @relation(fields: [poleId], references: [id])\n\n createdBy User? @relation(\"revisionCreatedBy\", fields: [createdById], references: [id])\n resolvedBy User? @relation(\"revisionResolvedBy\", fields: [resolvedById], references: [id])\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n}\n\nmodel MapElementTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the map element\n files Json? //Upload files for the map element\n zone Json? //Color code for zone\n geometry Json? //Icon for the map element\n\n mapElementType MapElementType @default(Marker)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n MapElement MapElement[]\n}\n\nmodel MapElement {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the map element\n files Json? //Upload files for the map element\n zone Json? //Color code for zone\n geometry Json? //Icon for the map element\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n mapElementType MapElementType @default(Marker)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template MapElementTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n qrCodeTag qrCodeTag[]\n}\n\nmodel NetworkElementInstallation {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n networkElementId String?\n previousType String?\n previousName String?\n previousId String?\n nextType String?\n nextName String?\n nextId String?\n Cable Cable[]\n PboFat PboFat[]\n SpliceClosure SpliceClosure[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n Conduit Conduit[]\n}\n\nmodel CentralOffice {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n users User[]\n Cluster Cluster[]\n CentralOfficeTeam CentralOfficeTeam[]\n}\n\nmodel Cluster {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n coordinates Json?\n color String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n projectPhase ClusterProjectPhase @default(Survey)\n surveyProjectStatus String @default(\"Pending\")\n designProjectStatus String @default(\"Pending\")\n constructionProjectStatus String @default(\"Pending\")\n gisProjectStatus String @default(\"Pending\")\n dispatchProjectStatus String @default(\"Pending\")\n namingConvention Json?\n installationStatus Int? @default(0) //percentage of installation completed\n\n centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])\n centralOfficeId String?\n\n users User[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n Cable Cable[]\n PboFat PboFat[]\n SpliceClosure SpliceClosure[]\n CableTemplate CableTemplate[]\n PboFatTemplate PboFatTemplate[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n usersOnline integrationProjectUserStatus[]\n qrCodeTemplate qrCodeTemplate[]\n integrationUserLocation integrationUserLocation[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n ClusterComments ClusterComments[]\n Revision Revision[]\n ElementRelation ElementRelation[]\n ClusterNotes ClusterNotes[]\n Conduit Conduit[]\n ConduitTemplate ConduitTemplate[]\n}\n\nmodel ClusterComments {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n comment String\n type String @default(\"General\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n user User @relation(fields: [userId], references: [id])\n userId String\n\n cluster Cluster @relation(fields: [clusterId], references: [id])\n clusterId String\n}\n\nmodel ClusterNotes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n comment String\n hasPicture Boolean @default(false)\n coordinates Json?\n picture String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n createdBy User @relation(fields: [createdById], references: [id])\n createdById String\n\n cluster Cluster @relation(fields: [clusterId], references: [id])\n clusterId String\n}\n\nmodel CentralOfficeTeam {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])\n centralOfficeId String?\n users CentralOfficeUser[]\n}\n\nmodel CentralOfficeUser {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n role CentralOfficeTeamPosition @default(Technician)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n centralOfficeTeam CentralOfficeTeam? @relation(fields: [centralOfficeTeamId], references: [id])\n centralOfficeTeamId String?\n\n user User @relation(fields: [userId], references: [id])\n userId String\n}\n\nmodel qrCodeTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n prefix String\n index Int //number of qr code generated\n scanned Int @default(0)\n link String? @unique //where the qr code will redirect to\n tagDetails Json?\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n // one to many relation with network element\n networkElement NetworkElement? @relation(fields: [networkElementTypeId], references: [id])\n networkElementTypeId String?\n\n networkElementId String?\n templateId String?\n\n pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])\n pboFatTemplateId String?\n\n cableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])\n cableTemplateId String?\n\n spliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])\n spliceClosureTemplateId String?\n\n zoneNroTemplate ZoneNroTemplate? @relation(fields: [zoneNroTemplateId], references: [id])\n zoneNroTemplateId String?\n\n poleTemplate PoleTemplate? @relation(fields: [poleTemplateId], references: [id])\n poleTemplateId String?\n\n manholeTemplate ManholeTemplate? @relation(fields: [manholeTemplateId], references: [id])\n manholeTemplateId String?\n\n loopTemplate LoopTemplate? @relation(fields: [loopTemplateId], references: [id])\n loopTemplateId String?\n\n fdtsroTemplate FDTSROTemplate? @relation(fields: [fdtsroTemplateId], references: [id])\n fdtsroTemplateId String?\n\n sfuTemplate SFUTemplate? @relation(fields: [sfuTemplateId], references: [id])\n sfuTemplateId String?\n\n buildingTemplate BuildingTemplate? @relation(fields: [buildingTemplateId], references: [id])\n buildingTemplateId String?\n\n // cable Cable? @relation(fields: [networkElementId], references: [id])\n // pboFat PboFat? @relation(fields: [networkElementId], references: [id])\n qrCodeTag qrCodeTag[]\n MapElementTemplate MapElementTemplate? @relation(fields: [mapElementTemplateId], references: [id])\n mapElementTemplateId String?\n\n conduitTemplate ConduitTemplate? @relation(fields: [conduitTemplateId], references: [id])\n conduitTemplateId String?\n}\n\nmodel qrCodeTag {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n image String? @db.Text //Upload file for logo\n link String? @unique //where the qr code will redirect to\n scanned Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n templateId String?\n networkElementId String?\n\n qrCode qrCodeTemplate @relation(fields: [qrCodeTemplateId], references: [id])\n qrCodeTemplateId String\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n spliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])\n spliceClosureId String?\n\n zoneNro ZoneNro? @relation(fields: [zoneNroId], references: [id])\n zoneNroId String?\n\n pole Pole? @relation(fields: [poleId], references: [id])\n poleId String?\n\n manhole Manhole? @relation(fields: [manholeId], references: [id])\n manholeId String?\n\n loop Loop? @relation(fields: [loopId], references: [id])\n loopId String?\n\n fdtsro FDTSRO? @relation(fields: [fdtsroId], references: [id])\n fdtsroId String?\n\n sfu SFU? @relation(fields: [sfuId], references: [id])\n sfuId String?\n\n building Building? @relation(fields: [buildingId], references: [id])\n buildingId String?\n MapElement MapElement? @relation(fields: [mapElementId], references: [id])\n mapElementId String?\n\n conduit Conduit? @relation(fields: [conduitId], references: [id])\n conduitId String?\n}\n\nmodel installationSequence {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n installationId String?\n sequenceOrder Int\n elementChildType NetworkElementChildType\n elementChildId String\n previousInstallationSeqId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n parent installationSequence? @relation(\"ChildToParent\", fields: [previousInstallationSeqId], references: [id])\n children installationSequence[] @relation(\"ChildToParent\")\n}\n\nmodel PreviousEquipment {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n fromTable EquipmentType\n fromId String\n toTable EquipmentType\n toId String\n PboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n SpliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])\n spliceClosureId String?\n FDTSRO FDTSRO? @relation(fields: [fdtsroId], references: [id])\n fdtsroId String?\n\n @@unique([fromTable, fromId, toTable, toId])\n}\n\nmodel integrationUserLocation {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n User User @relation(fields: [userId], references: [id])\n userId String\n\n coordinates Json\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n isActive Boolean @default(true)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel IntegrationReportTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n createdBy User? @relation(fields: [createdById], references: [id])\n createdById String?\n\n metrics ReportMetric[]\n visualizations ReportVisualization[]\n ReportTable ReportTable[]\n}\n\nmodel ReportMetric {\n id String @id @unique @default(uuid())\n\n reportTemplate IntegrationReportTemplate @relation(fields: [reportTemplateId], references: [id])\n reportTemplateId String\n\n elementType NetworkElementChildType?\n attributeName String //Name of the attribute to be reported\n\n metricType MetricType?\n\n // Aggregation across records\n formula AggregationOperation?\n groupByLevel ProjectLevel?\n\n // Formula configuration\n formulaConfig ReportFormulaConfig?\n\n // Usage Classification\n usage ReportUsage[] @default([TABLE])\n\n ReportTable ReportTable[]\n}\n\nmodel ReportFormulaConfig {\n metricId String @id\n metric ReportMetric @relation(fields: [metricId], references: [id])\n\n resultName String //Name of the result to be reported\n numberOfVariables Int //Number of variables in the formula\n variableAttributes Json //e.g {\"variable1\": \"Client Name\", \"variable2\": \"Fat Available Capacity\"}\n operations ArithmeticOperation[] //e.g {\"operation1\": \"sum\", \"operation2\": \"average\"}\n resultFormat ValueFormat @default(NUMBER)\n}\n\nmodel ReportVisualization {\n id String @id @unique @default(uuid())\n\n template IntegrationReportTemplate @relation(fields: [templateId], references: [id])\n templateId String\n\n metricIds String[] //List of ReportMetric IDs to be visualized\n\n chartType ChartType\n xAxisField String? //e.g \"Client Name\"\n yAxisField String? //e.g \"Fat Available Capacity\"\n\n useCustomColors Boolean @default(false)\n customColors Json? //e.g {\"red\": \"#FF0000\", \"blue\": \"#0000FF\"}\n}\n\nmodel ReportTable {\n id String @id @unique @default(uuid())\n\n templateId String\n template IntegrationReportTemplate @relation(fields: [templateId], references: [id])\n\n metricId String\n metric ReportMetric @relation(fields: [metricId], references: [id])\n\n columns String[] //e.g [\"Client Name\", \"Fat Available Capacity\"]\n includeHeader Boolean @default(true)\n sortBy Json? //e.g {\"column\": \"Client Name\", \"order\": \"asc\"} for sorting the table by a specific column\n}\n",
|
|
2441
|
-
"inlineSchemaHash": "
|
|
2444
|
+
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./generated\"\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nenum NetworkElementClassification {\n NetworkElement\n InfrastructureElement\n MapElement\n}\n\nenum ProjectLevel {\n Subsidiary\n Client\n MainProject\n Project\n CentralOffice\n Cluster\n}\n\nenum NetworkElementChildType {\n PboFat\n Cable\n SpliceClosure\n Zone\n SFU\n Loop\n FDTSRO\n Manhole\n Building\n Pole\n}\n\nenum EquipmentType {\n PboFat\n SpliceClosure\n FDTSRO\n}\n\nenum AggregationOperation {\n LIST\n SUM\n COUNT\n AVERAGE\n}\n\nenum ArithmeticOperation {\n ADD\n SUBTRACT\n MULTIPLY\n DIVIDE\n}\n\nenum ReportUsage {\n TABLE\n VISUALIZATION\n}\n\nenum ValueFormat {\n PERCENTAGE\n NUMBER\n}\n\nenum ChartType {\n BAR\n LINE\n PIE\n}\n\nenum MetricType {\n ProjectInfo\n NetworkElement\n NetworkElementAttributes\n FormulaResult\n}\n\nenum MapElementType {\n Marker\n Polyline\n Polygon\n}\n\nenum CentralOfficeTeamPosition {\n Supervisor\n Designer\n Technician\n}\n\nenum NotificationPlatform {\n Web\n Mobile\n}\n\nenum ClusterProjectPhase {\n Survey\n Design\n Construction\n GIS\n Dispatch\n}\n\nenum RevisionStatus {\n IN_PROGRESS\n SUBMITTED\n APPROVED\n REJECTED\n}\n\nenum RelationType {\n INSTALLED_ON\n CONNECTED_TO\n ENCLOSURE_ORIGIN\n ENCLOSURE_DESTINATION\n}\n\nenum AttributeType {\n TEXT\n NUMBER\n BOOLEAN\n DROPDOWN\n OPTIONS\n DATE\n JSON\n}\n\nenum CableAttachmentRole {\n DESTINATION\n ORIGIN\n}\n\nmodel Country {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n official_name String\n code String\n capital String\n region String\n subregion String\n population String\n timezones String\n flag String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n CamusatCountry CamusatCountry[]\n User User[]\n}\n\nmodel CamusatCountry {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String @unique\n original String?\n description String?\n status String @default(\"active\")\n type String @default(\"subsidiary\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n CamusatClient CamusatClient[]\n mainProjects MainProject[]\n\n Country Country @relation(fields: [countryId], references: [id])\n countryId String\n\n user User[]\n\n dispatchProject DispatchProject[]\n SubsidiaryMaterial SubsidiaryMaterial[]\n}\n\nmodel CamusatClient {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n logo String? @db.Text //Upload file for logo\n type String @default(\"client\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n Country CamusatCountry @relation(fields: [countryId], references: [id])\n countryId String\n\n mainProject MainProject[]\n clientMaterial clientMaterial[]\n users User[]\n}\n\nmodel Platform {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n url String?\n directory String?\n status String @default(\"active\")\n countries Json?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n User User[]\n Project Project[]\n}\n\nmodel Position {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n User User[]\n}\n\nmodel Role {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n login Boolean @default(false)\n access_web Boolean @default(false)\n access_mobile Boolean @default(false)\n add_users Boolean @default(false)\n view_users Boolean @default(false)\n delete_users Boolean @default(false)\n view_requests Boolean @default(false)\n manage_requests Boolean @default(false) //Either approve or rejects\n add_main_projects Boolean @default(false)\n view_main_projects Boolean @default(false)\n edit_main_projects Boolean @default(false)\n delete_main_projects Boolean @default(false)\n view_settings Boolean @default(false)\n view_audit Boolean @default(false)\n full_projects Boolean @default(false)\n add_projects Boolean @default(false)\n edit_projects Boolean @default(false)\n view_projects Boolean @default(false)\n delete_projects Boolean @default(false)\n add_sub_projects Boolean @default(false)\n manage_work_orders Boolean @default(false)\n full_teams Boolean @default(false)\n add_team Boolean @default(false)\n view_team Boolean @default(false)\n quality Boolean @default(false)\n dispatch_web_access Boolean @default(false)\n dispatch_mobile Boolean @default(false)\n dispatch_add_workorders Boolean @default(false)\n dispatch_view_workorders Boolean @default(false)\n dispatch_edit_workorders Boolean @default(false)\n dispatch_view_schedule Boolean @default(false)\n dispatch_add_teams Boolean @default(false)\n dispatch_view_teams Boolean @default(false)\n dispatch_edit_teams Boolean @default(false)\n dispatch_delete_teams Boolean @default(false)\n dispatch_view_projects Boolean @default(false)\n dispatch_edit_projects Boolean @default(false)\n dispatch_edit_materials Boolean @default(false)\n dispatch_view_materials Boolean @default(false)\n dispatch_add_materials Boolean @default(false)\n dispatch_delete_materials Boolean @default(false)\n dispatch_view_reports Boolean @default(false)\n dispatch_view_kpi Boolean @default(false)\n integration_web_access Boolean @default(false)\n integration_mobile Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n User User[]\n}\n\nmodel Template {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String @unique\n statusColor String?\n buttonName String\n workflowType String @default(\"template\")\n\n createdAt DateTime @default(now())\n\n features Feature[]\n templateComponents TemplateComponent[]\n projectWorkFlow ProjectWorkFlow[]\n}\n\nmodel Feature {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n functionality String? // Describes the feature type\n description String // Placeholder in the mobile app\n classification String\n KPI String\n options Json?\n linkToScheduler Boolean @default(false) // For Date and Time, will reschedule the work order\n value String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n featureType FeatureType @relation(fields: [featureTypeId], references: [id])\n featureTypeId String\n\n template Template @relation(fields: [templateId], references: [id])\n templateId String\n}\n\nmodel FeatureType {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n type String\n functionality String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n Feature Feature[]\n}\n\nmodel TemplateComponent {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n type String\n createdAt DateTime @default(now())\n\n template Template? @relation(fields: [templateId], references: [id])\n templateId String?\n\n bomComponent BillOfMaterial? @relation(fields: [bomComponentId], references: [id])\n bomComponentId String?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n index Int? //order of the component\n\n workOrderTasks WorkOrderTask[]\n\n // TODO: Figure out how to tie this to a dispatch Project\n}\n\nmodel ProjectWorkFlow {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n index Int? //order of the workflow\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n template Template? @relation(fields: [templateId], references: [id])\n templateId String?\n\n billofMaterial BillOfMaterial? @relation(fields: [billofMaterialId], references: [id])\n billofMaterialId String?\n}\n\nmodel TeamType {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n Team Team[]\n User User[]\n}\n\nmodel Team {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n teamType TeamType @relation(fields: [teamTypeId], references: [id])\n teamTypeId String\n TeamPlatform TeamPlatform[]\n User User[]\n DispatchTeam DispatchTeam[]\n}\n\nmodel TeamPlatform {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n priority String?\n status String @default(\"active\")\n countries Json?\n platforms Json?\n staffs Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n team Team @relation(fields: [teamId], references: [id])\n teamId String\n User User? @relation(fields: [userId], references: [id])\n userId String?\n}\n\nmodel User {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n surname String\n email String @unique\n mobile String\n password String\n otp String?\n passport String? //National Id/ Passport No.\n passportFile String? @db.Text //Upload file for passport\n status String @default(\"active\")\n countries Json? //Manage countrie\n platforms Json? //Platform Access\n staffId String? //Staff ID\n deviceId1 String? //Build ID to limit number of devices\n deviceId2 String? //Build ID to limit number of devices\n notificationTokens String[] @default([])\n webNotificationTokens String[] @default([])\n\n platforms_list Platform[]\n managing_countries CamusatCountry[]\n\n refreshToken String? @unique\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n\n position Position? @relation(fields: [positionId], references: [id])\n teamType TeamType? @relation(fields: [teamTypeId], references: [id])\n team Team? @relation(fields: [teamId], references: [id])\n country Country? @relation(fields: [countryId], references: [id])\n role Role? @relation(fields: [roleId], references: [id])\n\n positionId String?\n teamTypeId String?\n teamId String?\n countryId String?\n roleId String?\n\n TeamPlatform TeamPlatform[]\n project Project[]\n audit Audit[]\n\n leadTechnician DispatchTeam[] @relation(\"LeadTechnician\")\n firstTechnician DispatchTeam[] @relation(\"FirstTechnician\")\n secondTechnician DispatchTeam[] @relation(\"SecondTechnician\")\n otherTechnician DispatchTeam[] @relation(\"OtherTechnician\")\n DispatchProject DispatchProject[]\n WorkOrder WorkOrder[]\n WorkOrderTasks WorkOrderTask[]\n workOrderActivityLogs WorkOrderActivityLog[]\n workOrderEditLogs WorkOrderEditLog[]\n Notifications Notifications[]\n\n pboFatTemplates PboFatTemplate[]\n pboFat PboFat[]\n cable Cable[]\n SpliceClosure SpliceClosure[]\n CableTemplate CableTemplate[]\n CentralOffices CentralOffice[]\n Clusters Cluster[]\n projectPhaseLog projectPhaseLog[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n integrationProjectUserStatus integrationProjectUserStatus[]\n integrationUserLocation integrationUserLocation[]\n CamusatClient CamusatClient[]\n IntegrationReportTemplate IntegrationReportTemplate[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n CentralOfficeUser CentralOfficeUser[]\n ClusterComments ClusterComments[]\n CreatedRevisions Revision[] @relation(\"revisionCreatedBy\")\n ResolvedRevisions Revision[] @relation(\"revisionResolvedBy\")\n ClusterNotes ClusterNotes[]\n Conduit Conduit[]\n ConduitTemplate ConduitTemplate[]\n WorkOrderComments WorkOrderComments[]\n}\n\nmodel MainProject {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n CamusatCountry CamusatCountry @relation(fields: [camusatCountryId], references: [id])\n camusatCountryId String\n\n CamusatClient CamusatClient? @relation(fields: [camusatClientId], references: [id])\n camusatClientId String?\n name String\n projects Project[]\n}\n\nmodel Project {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n logo String? @db.Text //Upload file for logo\n status String @default(\"Pending\")\n countries Json? //Manage countries\n auditMatrices Json? //Audit Matrices\n projectPhase String? @default(\"In-Progress\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n\n types ProjectType[]\n\n mainProject MainProject @relation(fields: [mainProjectId], references: [id])\n mainProjectId String\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n\n DispatchProject DispatchProject[]\n projectWorkflow ProjectWorkFlow[]\n BillOfMaterial BillOfMaterial[]\n WorkOrder WorkOrder[]\n EmailConfigurations EmailConfigurations[]\n WorkOrderChannel WorkOrderChannel[]\n problemCategorization problemCategorization[]\n EmailTemplates EmailTemplates[]\n ReportFormats ReportFormats[]\n platforms Platform[]\n\n pboFatTemplates PboFatTemplate[]\n pboFat PboFat[]\n cableAttributes CableAttributes[]\n spliceClosureAttributes SpliceClosureAttributes[]\n Cable Cable[]\n CableTemplate CableTemplate[]\n CentralOffice CentralOffice[]\n qrCodeTemplate qrCodeTemplate[]\n projectPhaseLog projectPhaseLog[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n SpliceClosure SpliceClosure[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n usersOnline integrationProjectUserStatus[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n ConduitTemplate ConduitTemplate? @relation(fields: [conduitTemplateId], references: [id])\n conduitTemplateId String?\n}\n\nmodel integrationProjectUserStatus {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n isOnline Boolean @default(false)\n connectedAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n\n Project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n Cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n}\n\nmodel projectPhaseLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n phase String\n action String\n comment String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n}\n\nmodel Audit {\n id Int @id @default(autoincrement())\n no Int @default(autoincrement())\n module String\n moduleId Int?\n activity String\n detail String? @db.Text\n device String? @db.Text\n deviceIp String?\n platform String?\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n User User? @relation(fields: [userId], references: [id])\n userId String?\n}\n\nmodel DispatchTeam {\n id String @id @unique @default(uuid())\n name String? //Team name\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n type String @default(\"team\")\n\n LeadTechnician User @relation(\"LeadTechnician\", fields: [leadTechnicianId], references: [id])\n FirstTechnician User? @relation(\"FirstTechnician\", fields: [firstTechnicianId], references: [id])\n SecondTechnician User? @relation(\"SecondTechnician\", fields: [secondTechnicianId], references: [id])\n OtherTechnician User? @relation(\"OtherTechnician\", fields: [otherTechnicianId], references: [id])\n leadTechnicianId String\n firstTechnicianId String?\n secondTechnicianId String?\n otherTechnicianId String?\n\n contractorTeam Team? @relation(fields: [contractorTeamId], references: [id])\n contractorTeamId String?\n\n TeamMaterial TeamMaterial[]\n WorkOrders WorkOrder[]\n dispatchProjects DispatchProject[]\n workOrderActivityLogs WorkOrderActivityLog[]\n}\n\nmodel DispatchProject {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String //sub project name\n type String\n teams DispatchTeam[] //Prject Teams\n logo String? @db.Text //Upload file for logo\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n userId String?\n projectId String?\n Project Project? @relation(fields: [projectId], references: [id])\n User User? @relation(fields: [userId], references: [id])\n subsidiary CamusatCountry? @relation(fields: [subsidiaryId], references: [id])\n subsidiaryId String?\n DispatchMaterial DispatchMaterial[]\n SubsidiaryMaterial SubsidiaryMaterial[]\n clientMaterial clientMaterial[]\n teamMaterial TeamMaterial[]\n workOrderMaterial WorkOrderMaterial[]\n templateComponent TemplateComponent[]\n clientMaterialMovementLog clientMaterialMovementLog[]\n teamMaterialMovementLog TeamMaterialMovementLog[]\n subsidiaryMaterialMovementLog SubsidiaryMaterialMovementLog[]\n}\n\nmodel ProjectType {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n projects Project[]\n}\n\nmodel EmailConfigurations {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String?\n email String?\n password String?\n typeserver String? @default(\"IMAP\")\n server String?\n serverportincoming String?\n serverportoutgoing String?\n authincoming String?\n authoutgoing String?\n sslincoming Boolean? @default(true)\n ssloutgoing Boolean? @default(true)\n infodelimiter String? @default(\":\")\n otherdelimiter String?\n subject String?\n status String @default(\"active\")\n channel String @default(\"EMAIL\")\n mainId String?\n column1title String?\n column1key String?\n column2title String?\n column2key String?\n typeKey String?\n types Json?\n data Json?\n sampleData String? @db.Text\n emailcount Int? @default(0)\n emailsamplenumber Int?\n emailuid String?\n emailfirstpull Int?\n emailfirstcount Int?\n excelrownumber Int?\n isCustomSla Boolean @default(false)\n slaFieldKey String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n EmailsIncoming EmailsIncoming[]\n EmailsOutGoing EmailsOutgoing[]\n WorkOrder WorkOrder[]\n Project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n EmailsIncomingSample EmailsIncomingSample[]\n}\n\nmodel EmailsIncomingSample {\n id String @id @unique @default(uuid())\n messageId String?\n subject String?\n rawbody String?\n attachment String?\n headers Json?\n body Json?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n emailConfigurationsId String\n EmailConfigurations EmailConfigurations @relation(fields: [emailConfigurationsId], references: [id])\n}\n\nmodel EmailsIncoming {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n messageId String\n sender String\n receiver String\n datereceived String\n datesent String?\n subject String?\n body String?\n attachment String?\n seen Boolean @default(false)\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n emailConfigurationsId String?\n EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])\n\n WorkOrder WorkOrder[]\n}\n\nmodel EmailsOutgoing {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n receiver String\n subject String?\n body String?\n attachment String?\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n activatedAt DateTime?\n deletedAt DateTime?\n emailConfigurationsId String?\n EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])\n}\n\nmodel EmailTemplates {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n subject String?\n body String?\n signature String? //Signature of the email\n attachments Json?\n workOrderInfo Json?\n mailingList Json?\n carbonCopyList Json?\n templateInfo Json?\n status String @default(\"active\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n}\n\nmodel WorkOrder {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n mainId String\n column1 String?\n column2 String?\n type String?\n channel String? @default(\"EMAIL\")\n data Json?\n rawData Json?\n status String @default(\"new\")\n statusColour String @default(\"#ffffff\")\n workOrderTeamStatus String?\n scheduledStartAt DateTime?\n scheduledEndAt DateTime?\n actionDate DateTime? //Date the work order was completed\n auditMatrices Json?\n slaStartAt DateTime? //SLA Start Time\n sla String?\n isPaused Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n team DispatchTeam? @relation(fields: [teamId], references: [id])\n teamId String?\n\n projectId String\n Project Project @relation(fields: [projectId], references: [id])\n\n EmailConfigurations EmailConfigurations? @relation(fields: [emailConfigurationsId], references: [id])\n emailConfigurationsId String?\n\n EmailsIncoming EmailsIncoming? @relation(fields: [emailsIncomingId], references: [id])\n emailsIncomingId String?\n\n manager User? @relation(fields: [managerId], references: [id])\n managerId String?\n\n workOrderTasks WorkOrderTask[]\n workOrderActivityLogs WorkOrderActivityLog[]\n workOrderEditLogs WorkOrderEditLog[]\n pboFatAttributes PboFatAttributes[]\n PboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n SFU SFU? @relation(fields: [sFUId], references: [id])\n sFUId String?\n Building Building? @relation(fields: [buildingId], references: [id])\n buildingId String?\n WorkOrderPauses WorkOrderPauses[]\n WorkOrderComments WorkOrderComments[]\n}\n\nmodel WorkOrderChannel {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n Project Project @relation(fields: [projectId], references: [id])\n projectId String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel WorkOrderTask {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n buttonName String\n isSpecialFeature Boolean @default(false)\n statusColor String?\n featureName String?\n status String @default(\"pending\")\n features Json?\n comments String?\n scheduledStartAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n technician User? @relation(fields: [technicianId], references: [id])\n technicianId String?\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n templateComponent TemplateComponent? @relation(fields: [templateComponentId], references: [id])\n templateComponentId String\n\n // workOrderTaskData WorkOrderTaskData[]\n}\n\nmodel WorkOrderActivityLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n type String //Type of activity\n activity String\n detail Json?\n reason String?\n comment String?\n statusUpdate String?\n\n actionDate DateTime? //Date the work order was completed\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n\n team DispatchTeam? @relation(fields: [teamId], references: [id])\n teamId String?\n}\n\nmodel WorkOrderEditLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n action String @default(\"Edit\")\n description String @default(\"Edit Ticket\")\n newValues Json?\n oldValues Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n User User? @relation(fields: [userId], references: [id])\n userId String?\n}\n\n// Have data as JSON for now\nmodel WorkOrderTaskData {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n description String\n value String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n // workOrderTask WorkOrderTask @relation(fields: [workOrderTaskId], references: [id])\n // workOrderTaskId String\n}\n\nmodel WorkOrderPauses {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n pauseStartAt DateTime\n pauseEndAt DateTime?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n}\n\nmodel WorkOrderComments {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n comment String\n hasAttachment Boolean @default(false)\n attachment String? @db.Text //Upload file for attachment\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n workOrder WorkOrder @relation(fields: [workOrderId], references: [id])\n workOrderId String\n\n createdBy User? @relation(fields: [createdById], references: [id])\n createdById String?\n}\n\n// Houses the materials of a project\nmodel BillOfMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n workflowType String @default(\"bom\")\n\n materials MaterialBillOfMaterial[]\n projectWorkFlow ProjectWorkFlow[]\n templateComponent TemplateComponent[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel Material {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n code String\n description String?\n unit String\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n billOfMaterial MaterialBillOfMaterial[]\n\n pboFatAttributes PboFatAttributes[]\n cableAttributes CableAttributes[]\n spliceClosureAttributes SpliceClosureAttributes[]\n}\n\nmodel MaterialBillOfMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n material Material @relation(fields: [materialId], references: [id])\n materialId String\n billOfMaterial BillOfMaterial @relation(fields: [billOfMaterialId], references: [id])\n billOfMaterialId String\n\n dispatchMaterial DispatchMaterial[]\n}\n\nmodel DispatchMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n materialBillOfMaterial MaterialBillOfMaterial? @relation(fields: [materialbomId], references: [id])\n materialbomId String?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n materialCode String?\n materialName String?\n description String?\n unit String?\n status String @default(\"active\")\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n stockMovement StockMovement[]\n clientMaterial clientMaterial[]\n teamMaterial TeamMaterial[]\n workOrderMaterial WorkOrderMaterial[]\n subsidiaryMaterial SubsidiaryMaterial[]\n MaterialChangeLog MaterialChangeLog[]\n}\n\nmodel StockMovement {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial[]\n movementType String\n to String?\n toId String?\n from String?\n fromId String?\n quantity String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel clientMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n client CamusatClient @relation(fields: [clientId], references: [id])\n clientId String\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n type String @default(\"client\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n clientMaterialMovementLog clientMaterialMovementLog[]\n dispatchProject DispatchProject[]\n}\n\nmodel clientMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material clientMaterial[]\n movementType String\n movementFrom String?\n movementFromName String?\n movementFromId String?\n movementTo String?\n movementToName String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel SubsidiaryMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n\n subsidiary CamusatCountry @relation(fields: [subsidiaryId], references: [id])\n subsidiaryId String\n dispatchProject DispatchProject[]\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n type String @default(\"subsidiary\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n subsidiaryMaterialMovementLog SubsidiaryMaterialMovementLog[]\n}\n\nmodel SubsidiaryMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material SubsidiaryMaterial[]\n movementType String\n movementFrom String?\n movementFromName String?\n movementFromId String?\n movementTo String?\n movementToName String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel TeamMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n team DispatchTeam @relation(fields: [teamId], references: [id])\n teamId String\n\n quantityAdded String @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n type String @default(\"team\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n teamMaterialMovementLog TeamMaterialMovementLog[]\n dispatchProject DispatchProject[]\n}\n\nmodel TeamMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material TeamMaterial[]\n movementType String\n movementFrom String?\n movementFromName String?\n movementFromId String?\n movementTo String?\n movementToName String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n dispatchProject DispatchProject? @relation(fields: [dispatchProjectId], references: [id])\n dispatchProjectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel WorkOrderMaterial {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n\n quantityAdded String? @default(\"0\")\n quantityUsed String @default(\"0\")\n quantityRemaining String @default(\"0\")\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n ticketMaterialMovementLog ticketMaterialMovementLog[]\n dispatchProject DispatchProject[]\n}\n\nmodel ticketMaterialMovementLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n material WorkOrderMaterial[]\n movementType String\n movementFrom String?\n movementFromId String?\n movementTo String?\n movementToId String?\n quantity String\n materialMoved Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel MaterialChangeLog {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n material DispatchMaterial @relation(fields: [materialId], references: [id])\n materialId String\n\n action String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel problemCategorization {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n reason String\n problemType String\n platformName String\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel Notifications {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n title String\n description String\n status String @default(\"unread\")\n platform NotificationPlatform @default(Mobile)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n user User @relation(fields: [userId], references: [id])\n userId String\n}\n\nmodel ReportFormats {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n header1 String?\n header2 String?\n header3 String?\n mainInfo Json? //Ticket Main info\n ticketDetails Json? //More ticket details\n materialInfo Json? //Material Info\n teamInfo Json? //Team Info\n interventionResults Json? //Work Order Results\n attachments Json? //Attachments\n\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n project Project @relation(fields: [projectId], references: [id])\n projectId String\n}\n\nmodel NetworkElement {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n type String @unique\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n classification NetworkElementClassification @default(NetworkElement)\n\n PboFat PboFat[]\n pboFatTemplate PboFatTemplate[]\n Cable Cable[]\n SpliceClosure SpliceClosure[]\n CableTemplate CableTemplate[]\n qrCodeTemplate qrCodeTemplate[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n ElementNode ElementNode[]\n Conduit Conduit[]\n ConduitTemplate ConduitTemplate[]\n}\n\nmodel ElementNode {\n id String @id @unique @default(uuid())\n typeId String\n type NetworkElement @relation(fields: [typeId], references: [id])\n name String\n lat Float?\n lng Float?\n geometry Json?\n\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n relationsFrom ElementRelation[] @relation(\"relationsFrom\")\n relationsTo ElementRelation[] @relation(\"relationsTo\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n AttributeValues AttributeValue[]\n PboFat PboFat[]\n Cable Cable[]\n SpliceClosure SpliceClosure[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n MapElement MapElement[]\n Conduit Conduit[]\n}\n\nmodel ElementRelation {\n id String @id @unique @default(uuid())\n fromId String\n toId String\n relationType RelationType\n metadata Json?\n from ElementNode @relation(\"relationsFrom\", fields: [fromId], references: [id])\n to ElementNode @relation(\"relationsTo\", fields: [toId], references: [id])\n\n clusterId String?\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n\n @@index([fromId])\n @@index([toId])\n @@index([relationType])\n}\n\nmodel AttributeDefinition {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n key String @unique\n label String\n type AttributeType\n\n required Boolean @default(false)\n visibleOnWeb Boolean @default(true)\n visibleOnMobile Boolean @default(true)\n visibleOnDispatchMobile Boolean @default(true)\n AttributeValue AttributeValue[]\n}\n\nmodel OptionSource {\n id String @id @unique @default(uuid())\n sourceType String\n staticOptions Json?\n dynamicOptions Json?\n foreignTable String?\n}\n\nmodel AttributeValue {\n id String @id @unique @default(uuid())\n attributeDefId String\n attributeDef AttributeDefinition @relation(fields: [attributeDefId], references: [id])\n value String //Always store as string, convert to other types in the application layer\n\n node ElementNode @relation(fields: [nodeId], references: [id])\n nodeId String\n\n @@index([nodeId])\n @@index([attributeDefId])\n}\n\nmodel Cable {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the cable\n files Json? //Upload files for the cable\n zone Json? //Color code for zone\n geometry Json? //Icon for the cable\n attributes Json? //Attributes for the cable\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //As built coordinates\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n comments String?\n\n // Reporting mirrors\n enclosureOriginType String? //Type of the origin enclosure\n enclosureOriginId String? //ID of the origin enclosure\n enclosureDestinationType String? //Type of the destination enclosure\n enclosureDestinationId String? //ID of the destination enclosure\n cableLength Float? //Length of the cable in meters\n actualCableLength Float? //Actual length of the cable in meters\n type String? //Type of cable (e.g., aerial, underground)\n capacity String? //Capacity of cable(12FO, 24FO, 48FO)\n fibersActive Int? //Number of active fibers\n fibersReserved Int? //Number of reserved fibers\n fibersDark Int? //Number of dark fibers\n fibersDedicated Int? //Number of dedicated fibers\n brand String? //Brand of the cable\n brandDescription String? //Description of the brand\n centralOffice String? //Central office associated with the cable\n mainProject String? //Main project associated with the cable\n projectPhase String? //Project phase (e.g., planning, execution)\n client String? //Client associated with the cable\n subsidiary String? //Subsidiary or branch\n\n // parent/subcable implementation\n isSubcable Boolean @default(false)\n\n parentCable Cable? @relation(\"CableToSubcables\", fields: [parentCableId], references: [id])\n parentCableId String?\n parentCableName String?\n\n subcables Cable[] @relation(\"CableToSubcables\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template CableTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n cableAttachments CableAttachment[]\n cableAttributes CableAttributes[]\n PboFatAttributes PboFatAttributes[]\n spliceClosures SpliceClosure[]\n qrCodeTag qrCodeTag[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n Revision Revision[]\n ducts Duct[]\n PboFat PboFat[]\n Loop Loop[]\n fdtsro FDTSRO[]\n\n @@index([enclosureOriginType, enclosureOriginId])\n @@index([enclosureDestinationType, enclosureDestinationId])\n}\n\nmodel CableAttachment {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n cable Cable @relation(fields: [cableId], references: [id])\n cableId String\n\n targetType String\n targetId String\n\n role CableAttachmentRole\n metadata Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@unique([cableId, targetType, targetId, role])\n @@index([targetType, targetId])\n @@index([cableId, role])\n}\n\nmodel CableTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n files Json? //Upload files for the cable\n texts Json? //Add text attributes to the cable\n zone Json? //Color code for zone\n geometry Json? //Icon for the cable\n attributes Json? //Attributes for the cable\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cableAttributes CableAttributes[]\n qrCodeTemplate qrCodeTemplate[]\n Cable Cable[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n}\n\nmodel Conduit {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the conduit\n files Json? //Upload files for the conduit\n zone Json? //Color code for zone\n geometry Json? //Icon for the conduit\n attributes Json? //Attributes for the conduit\n coordinates Json?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n namePrefix String?\n\n asBuiltCoordinates Json? //As built coordinates\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n address String? //Address of the conduit\n deploymentPhase String? //Deployment phase of the conduit\n trenchConfiguration String? //Trench configuration for the conduit\n trenchDepth Float? //Trench depth for the conduit\n backfillMaterial String? //Backfill material for the conduit\n reinforcementMaterial String? //Reinforcement material for the conduit\n specialCharacteristics String? //Special characteristics of the conduit\n enclosureOriginType String? //Type of the origin enclosure\n enclosureOriginId String? //ID of the origin enclosure\n enclosureDestinationType String? //Type of the destination enclosure\n enclosureDestinationId String? //ID of the destination enclosure\n conduitLength Float? //Length of the conduit in meters\n brand String? //Brand of the conduit\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n template ConduitTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTag qrCodeTag[]\n ducts Duct[]\n}\n\nmodel Duct {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n type String\n material String\n dimension Float\n typeOptions String[]\n materialOptions String[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n conduit Conduit @relation(fields: [conduitId], references: [id])\n conduitId String\n\n cables Cable[]\n}\n\nmodel ductTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n type String\n material String\n dimension Float\n\n typeOptions String[]\n materialOptions String[]\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n conduit ConduitTemplate @relation(fields: [conduitTemplateId], references: [id])\n conduitTemplateId String\n}\n\nmodel ConduitTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the conduit\n files Json? //Upload files for the conduit\n zone Json? //Color code for zone\n geometry Json? //Icon for the conduit\n attributes Json? //Attributes for the conduit\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n Conduit Conduit[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n ductTemplates ductTemplate[]\n}\n\nmodel CableAttributes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n value String?\n visibleOnMobile Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n material Material? @relation(fields: [materialId], references: [id])\n materialId String?\n CableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])\n cableTemplateId String?\n}\n\nmodel Splitter {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n noOfPorts Int\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n PboFatAttributes PboFatAttributes[]\n}\n\nmodel PboFatTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n pboFatAttributes PboFatAttributes[]\n\n //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase\n qrCodeTemplate qrCodeTemplate[]\n PboFat PboFat[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n}\n\nmodel PboFat {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n // Reporting mirrors\n fatMaximumCapacity Int? //Maximum capacity of the PBO FAT\n fatExistingSubscribers Int? //Existing subscribers in the PBO FAT\n fatAvailableCapacity Int? //Available capacity in the PBO FAT\n placeOfInstallation String? //ID to an Infrastructure element\n address String? //Address of the PBO FAT \n splitter1 String? //1:2, 1:4, 1:8 etc\n splitter2 String?\n previousEquipmentType String? //Type of the previous equipment\n previousEquipmentId String? //ID of the previous equipment\n nextEquipmentType String? //Type of the next equipment\n nextEquipmentId String? //ID of the next equipment\n brand String?\n brandDescription String?\n materialListReference String? //Reference to the material list\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template PboFatTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n workOrders WorkOrder[]\n\n pboFatAttributes PboFatAttributes[]\n // qrCode qrCode[]\n qrCodeTag qrCodeTag[]\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n // cluster relationship but static fields for centraloffice,project, main project etc\n centralOffice String?\n projectPhase String?\n mainProject String?\n client String?\n subsidiary String?\n cables Cable[]\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n dependencies PreviousEquipment[]\n Revision Revision[]\n SFU SFU[]\n Building Building[]\n\n @@index([nodeId])\n @@index([clusterId])\n}\n\nmodel PboFatAttributes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n value String?\n visibleOnMobile Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n material Material? @relation(fields: [materialId], references: [id])\n materialId String?\n\n pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])\n pboFatTemplateId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n splitter Splitter[]\n workOrder WorkOrder[]\n}\n\nmodel SpliceClosure {\n // TODO: Add the fields for previous/next equipment, CO and project phase\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String?\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n coordinates Json?\n description String?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n comments String?\n\n // Reporting mirrors\n spliceClosureMaximumCapacity String? //Maximum capacity of the Splice Closure\n placeOfInstallation String? //ID to an Infrastructure element\n address String? //Address of the Splice Closure\n previousEquipmentType String? //Type of the previous equipment\n previousEquipmentId String? //ID of the previous equipment\n nextEquipmentType String? //Type of the next equipment\n nextEquipmentId String? //ID of the next equipment\n brand String?\n brandDescription String?\n materialListReference String? //Reference to the material list\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n deletedAt DateTime?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n template SpliceClosureTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n spliceClosureAttributes SpliceClosureAttributes[]\n qrCodeTag qrCodeTag[]\n\n dependencies PreviousEquipment[]\n Revision Revision[]\n cables Cable[]\n}\n\nmodel SpliceClosureTemplate {\n // TODO: Add the fields for previous/next equipment, CO and project phase\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String?\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the PBO FAT\n files Json? //Upload files for the PBO FAT\n zone Json? //Color code for zone\n geometry Json? //Icon for the PBO FAT\n attributes Json? //Attributes for the PBO FAT\n description String?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n deletedAt DateTime?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n spliceClosureAttributes SpliceClosureAttributes[]\n qrCodeTemplate qrCodeTemplate[]\n SpliceClosure SpliceClosure[]\n}\n\nmodel SpliceClosureAttributes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n description String?\n value String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n // cable Cable? @relation(fields: [cableId], references: [id])\n // cableId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n material Material? @relation(fields: [materialId], references: [id])\n materialId String?\n\n spliceClosure SpliceClosure @relation(fields: [spliceClosureId], references: [id])\n spliceClosureId String\n SpliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])\n spliceClosureTemplateId String?\n}\n\nmodel ZoneNro {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the zone\n files Json? //Upload files for the zone\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n // Reporting mirrors\n zoneHouseCount Int? //Number of houses in the zone\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template ZoneNroTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n}\n\nmodel ZoneNroTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the zone\n files Json? //Upload files for the zone\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n ZoneNro ZoneNro[]\n}\n\nmodel Pole {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the pole\n files Json? //Upload files for the pole\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n address String? //Address of the pole\n material String? //Material of the pole\n height Float? //Height of the pole in meters\n topDiameter Float? //Top diameter of the pole in meters\n bottomDiameter Float? //Bottom diameter of the pole in meters\n downGuy Boolean @default(false) //Does the pole have a down guy?\n brand String? //Brand of the pole\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template PoleTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n Revision Revision[]\n}\n\nmodel PoleTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the pole\n files Json? //Upload files for the pole\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Pole Pole[]\n}\n\nmodel Manhole {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the manhole\n files Json? //Upload files for the manhole\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n address String? //Address of the manhole\n material String? //Material of the manhole\n dimension String? //Dimension of the manhole\n coverType String? //Type of the cover\n brand String? //Brand of the manhole\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template ManholeTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n Revision Revision[]\n}\n\nmodel ManholeTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the manhole\n files Json? //Upload files for the manhole\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Manhole Manhole[]\n}\n\nmodel Loop {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the loop\n files Json? //Upload files for the loop\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n length Float? //Length of the loop in meters\n brand String? //Brand of the loop\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template LoopTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n qrCodeTag qrCodeTag[]\n Revision Revision[]\n}\n\nmodel LoopTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the loop\n files Json? //Upload files for the loop\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Loop Loop[]\n}\n\nmodel FDTSRO {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the FDTSRO\n files Json? //Upload files for the FDTSRO\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n // Reporting mirrors\n maximumCapacity Int? //Maximum capacity of the FDTSRO\n typeOfEnclosure String? //Type of the enclosure\n placeOfInstallation String? //ID to an Infrastructure element\n address String? //Address of the FDTSRO\n previousEquipmentType String? //Type of the previous equipment\n previousEquipmentId String? //ID of the previous equipment\n nextEquipmentType String? //Type of the next equipment\n nextEquipmentId String? //ID of the next equipment\n splitter1 String? //1:2, 1:4, 1:8 etc\n brand String?\n brandDescription String? //Description of the brand\n materialListReference String? //Reference to the material list\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template FDTSROTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n qrCodeTag qrCodeTag[]\n PreviousEquipment PreviousEquipment[]\n Revision Revision[]\n cables Cable[]\n}\n\nmodel FDTSROTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the FDTSRO\n files Json? //Upload files for the FDTSRO\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n FDTSRO FDTSRO[]\n}\n\nmodel SFU {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the SFU\n files Json? //Upload files for the SFU\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n address String? //Address of the SFU\n linkToDispatch String? //Link to the dispatch system\n macAddress String? //MAC address of the Router in the SFU\n gponAddress String? //GPON address of the SFU\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n comments String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template SFUTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n qrCodeTag qrCodeTag[]\n workOrders WorkOrder[]\n Revision Revision[]\n Building Building? @relation(fields: [buildingId], references: [id])\n buildingId String?\n}\n\nmodel SFUTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the SFU\n files Json? //Upload files for the SFU\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n SFU SFU[]\n}\n\nmodel Building {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the building\n files Json? //Upload files for the building\n zone Json?\n geometry Json?\n attributes Json?\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n asBuiltCoordinates Json? //Coordinates when installed\n isInstalled Boolean @default(false)\n installationDate DateTime?\n\n comments String?\n\n isInRevision Boolean @default(false)\n installationStatus String? @default(\"pending\") //pending, approved, in-revision\n\n // Reporting mirrors\n address String? //Address of the building\n buildingName String? //Name of the building\n totalFlats Int? //Total number of flats in the building\n floorCount Int? //Number of floors in the building\n flatsPerFloor Int? //Number of flats per floor\n managerName String? //Name of the building manager\n managerPhone String? //Phone number of the building manager\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template BuildingTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])\n installationId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n sfu SFU[]\n qrCodeTag qrCodeTag[]\n workOrders WorkOrder[]\n Revision Revision[]\n}\n\nmodel BuildingTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n terminalAccess Boolean @default(false)\n name String?\n photos Json?\n texts Json? //Add text attributes to the building\n files Json? //Upload files for the building\n zone Json?\n geometry Json?\n attributes Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n Building Building[]\n}\n\nmodel Revision {\n id String @id @unique @default(uuid())\n\n pboFatId String?\n spliceClosureId String?\n manholeId String?\n loopId String?\n fdtsroId String?\n sfuId String?\n buildingId String?\n cableId String?\n poleId String?\n\n title String\n comment String\n status RevisionStatus @default(IN_PROGRESS)\n priority Int @default(1)\n\n createdById String?\n resolvedById String?\n\n clusterId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n resolvedAt DateTime?\n\n clientRevisionId String? // ID of the revision from the client side\n\n resolutionNotes String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n spliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])\n manhole Manhole? @relation(fields: [manholeId], references: [id])\n loop Loop? @relation(fields: [loopId], references: [id])\n fdtsro FDTSRO? @relation(fields: [fdtsroId], references: [id])\n sfu SFU? @relation(fields: [sfuId], references: [id])\n building Building? @relation(fields: [buildingId], references: [id])\n cable Cable? @relation(fields: [cableId], references: [id])\n pole Pole? @relation(fields: [poleId], references: [id])\n\n createdBy User? @relation(\"revisionCreatedBy\", fields: [createdById], references: [id])\n resolvedBy User? @relation(\"revisionResolvedBy\", fields: [resolvedById], references: [id])\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n}\n\nmodel MapElementTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the map element\n files Json? //Upload files for the map element\n zone Json? //Color code for zone\n geometry Json? //Icon for the map element\n\n mapElementType MapElementType @default(Marker)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n projects Project[]\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n qrCodeTemplate qrCodeTemplate[]\n MapElement MapElement[]\n}\n\nmodel MapElement {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n status String @default(\"active\")\n name String?\n photos Json? //Upload files for photos\n texts Json? //Add text attributes to the map element\n files Json? //Upload files for the map element\n zone Json? //Color code for zone\n geometry Json? //Icon for the map element\n coordinates Json?\n autoincrement Boolean @default(true)\n namePrefix String?\n templateIndex Int?\n\n mapElementType MapElementType @default(Marker)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n updatedBy User? @relation(fields: [updatedById], references: [id])\n updatedById String?\n\n networkElement NetworkElement @relation(fields: [networkElementId], references: [id])\n networkElementId String\n\n template MapElementTemplate? @relation(fields: [templateId], references: [id])\n templateId String?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n node ElementNode? @relation(fields: [nodeId], references: [id])\n nodeId String?\n\n qrCodeTag qrCodeTag[]\n}\n\nmodel NetworkElementInstallation {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n networkElementId String?\n previousType String?\n previousName String?\n previousId String?\n nextType String?\n nextName String?\n nextId String?\n Cable Cable[]\n PboFat PboFat[]\n SpliceClosure SpliceClosure[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n Conduit Conduit[]\n}\n\nmodel CentralOffice {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n users User[]\n Cluster Cluster[]\n CentralOfficeTeam CentralOfficeTeam[]\n}\n\nmodel Cluster {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n coordinates Json?\n color String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n projectPhase ClusterProjectPhase @default(Survey)\n surveyProjectStatus String @default(\"Pending\")\n designProjectStatus String @default(\"Pending\")\n constructionProjectStatus String @default(\"Pending\")\n gisProjectStatus String @default(\"Pending\")\n dispatchProjectStatus String @default(\"Pending\")\n namingConvention Json?\n installationStatus Int? @default(0) //percentage of installation completed\n\n centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])\n centralOfficeId String?\n\n users User[]\n ZoneNro ZoneNro[]\n Pole Pole[]\n Manhole Manhole[]\n Loop Loop[]\n FDTSRO FDTSRO[]\n SFU SFU[]\n Building Building[]\n Cable Cable[]\n PboFat PboFat[]\n SpliceClosure SpliceClosure[]\n CableTemplate CableTemplate[]\n PboFatTemplate PboFatTemplate[]\n SpliceClosureTemplate SpliceClosureTemplate[]\n ZoneNroTemplate ZoneNroTemplate[]\n PoleTemplate PoleTemplate[]\n ManholeTemplate ManholeTemplate[]\n LoopTemplate LoopTemplate[]\n FDTSROTemplate FDTSROTemplate[]\n SFUTemplate SFUTemplate[]\n BuildingTemplate BuildingTemplate[]\n usersOnline integrationProjectUserStatus[]\n qrCodeTemplate qrCodeTemplate[]\n integrationUserLocation integrationUserLocation[]\n MapElementTemplate MapElementTemplate[]\n MapElement MapElement[]\n ClusterComments ClusterComments[]\n Revision Revision[]\n ElementRelation ElementRelation[]\n ClusterNotes ClusterNotes[]\n Conduit Conduit[]\n ConduitTemplate ConduitTemplate[]\n}\n\nmodel ClusterComments {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n comment String\n type String @default(\"General\")\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n user User @relation(fields: [userId], references: [id])\n userId String\n\n cluster Cluster @relation(fields: [clusterId], references: [id])\n clusterId String\n}\n\nmodel ClusterNotes {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n comment String\n hasPicture Boolean @default(false)\n coordinates Json?\n picture String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n createdBy User @relation(fields: [createdById], references: [id])\n createdById String\n\n cluster Cluster @relation(fields: [clusterId], references: [id])\n clusterId String\n}\n\nmodel CentralOfficeTeam {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])\n centralOfficeId String?\n users CentralOfficeUser[]\n}\n\nmodel CentralOfficeUser {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n role CentralOfficeTeamPosition @default(Technician)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n centralOfficeTeam CentralOfficeTeam? @relation(fields: [centralOfficeTeamId], references: [id])\n centralOfficeTeamId String?\n\n user User @relation(fields: [userId], references: [id])\n userId String\n}\n\nmodel qrCodeTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n prefix String\n index Int //number of qr code generated\n scanned Int @default(0)\n link String? @unique //where the qr code will redirect to\n tagDetails Json?\n status String @default(\"active\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n project Project? @relation(fields: [projectId], references: [id])\n projectId String?\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n // one to many relation with network element\n networkElement NetworkElement? @relation(fields: [networkElementTypeId], references: [id])\n networkElementTypeId String?\n\n networkElementId String?\n templateId String?\n\n pboFatTemplate PboFatTemplate? @relation(fields: [pboFatTemplateId], references: [id])\n pboFatTemplateId String?\n\n cableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])\n cableTemplateId String?\n\n spliceClosureTemplate SpliceClosureTemplate? @relation(fields: [spliceClosureTemplateId], references: [id])\n spliceClosureTemplateId String?\n\n zoneNroTemplate ZoneNroTemplate? @relation(fields: [zoneNroTemplateId], references: [id])\n zoneNroTemplateId String?\n\n poleTemplate PoleTemplate? @relation(fields: [poleTemplateId], references: [id])\n poleTemplateId String?\n\n manholeTemplate ManholeTemplate? @relation(fields: [manholeTemplateId], references: [id])\n manholeTemplateId String?\n\n loopTemplate LoopTemplate? @relation(fields: [loopTemplateId], references: [id])\n loopTemplateId String?\n\n fdtsroTemplate FDTSROTemplate? @relation(fields: [fdtsroTemplateId], references: [id])\n fdtsroTemplateId String?\n\n sfuTemplate SFUTemplate? @relation(fields: [sfuTemplateId], references: [id])\n sfuTemplateId String?\n\n buildingTemplate BuildingTemplate? @relation(fields: [buildingTemplateId], references: [id])\n buildingTemplateId String?\n\n // cable Cable? @relation(fields: [networkElementId], references: [id])\n // pboFat PboFat? @relation(fields: [networkElementId], references: [id])\n qrCodeTag qrCodeTag[]\n MapElementTemplate MapElementTemplate? @relation(fields: [mapElementTemplateId], references: [id])\n mapElementTemplateId String?\n\n conduitTemplate ConduitTemplate? @relation(fields: [conduitTemplateId], references: [id])\n conduitTemplateId String?\n}\n\nmodel qrCodeTag {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n image String? @db.Text //Upload file for logo\n link String? @unique //where the qr code will redirect to\n scanned Boolean @default(false)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n templateId String?\n networkElementId String?\n\n qrCode qrCodeTemplate @relation(fields: [qrCodeTemplateId], references: [id])\n qrCodeTemplateId String\n\n cable Cable? @relation(fields: [cableId], references: [id])\n cableId String?\n\n pboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n\n spliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])\n spliceClosureId String?\n\n zoneNro ZoneNro? @relation(fields: [zoneNroId], references: [id])\n zoneNroId String?\n\n pole Pole? @relation(fields: [poleId], references: [id])\n poleId String?\n\n manhole Manhole? @relation(fields: [manholeId], references: [id])\n manholeId String?\n\n loop Loop? @relation(fields: [loopId], references: [id])\n loopId String?\n\n fdtsro FDTSRO? @relation(fields: [fdtsroId], references: [id])\n fdtsroId String?\n\n sfu SFU? @relation(fields: [sfuId], references: [id])\n sfuId String?\n\n building Building? @relation(fields: [buildingId], references: [id])\n buildingId String?\n MapElement MapElement? @relation(fields: [mapElementId], references: [id])\n mapElementId String?\n\n conduit Conduit? @relation(fields: [conduitId], references: [id])\n conduitId String?\n}\n\nmodel installationSequence {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n installationId String?\n sequenceOrder Int\n elementChildType NetworkElementChildType\n elementChildId String\n previousInstallationSeqId String?\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n parent installationSequence? @relation(\"ChildToParent\", fields: [previousInstallationSeqId], references: [id])\n children installationSequence[] @relation(\"ChildToParent\")\n}\n\nmodel PreviousEquipment {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n fromTable EquipmentType\n fromId String\n toTable EquipmentType\n toId String\n PboFat PboFat? @relation(fields: [pboFatId], references: [id])\n pboFatId String?\n SpliceClosure SpliceClosure? @relation(fields: [spliceClosureId], references: [id])\n spliceClosureId String?\n FDTSRO FDTSRO? @relation(fields: [fdtsroId], references: [id])\n fdtsroId String?\n\n @@unique([fromTable, fromId, toTable, toId])\n}\n\nmodel integrationUserLocation {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n\n User User @relation(fields: [userId], references: [id])\n userId String\n\n coordinates Json\n\n cluster Cluster? @relation(fields: [clusterId], references: [id])\n clusterId String?\n\n isActive Boolean @default(true)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n}\n\nmodel IntegrationReportTemplate {\n id String @id @unique @default(uuid())\n no Int @default(autoincrement())\n name String\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n deletedAt DateTime?\n\n createdBy User? @relation(fields: [createdById], references: [id])\n createdById String?\n\n metrics ReportMetric[]\n visualizations ReportVisualization[]\n ReportTable ReportTable[]\n}\n\nmodel ReportMetric {\n id String @id @unique @default(uuid())\n\n reportTemplate IntegrationReportTemplate @relation(fields: [reportTemplateId], references: [id])\n reportTemplateId String\n\n elementType NetworkElementChildType?\n attributeName String //Name of the attribute to be reported\n\n metricType MetricType?\n\n // Aggregation across records\n formula AggregationOperation?\n groupByLevel ProjectLevel?\n\n // Formula configuration\n formulaConfig ReportFormulaConfig?\n\n // Usage Classification\n usage ReportUsage[] @default([TABLE])\n\n ReportTable ReportTable[]\n}\n\nmodel ReportFormulaConfig {\n metricId String @id\n metric ReportMetric @relation(fields: [metricId], references: [id])\n\n resultName String //Name of the result to be reported\n numberOfVariables Int //Number of variables in the formula\n variableAttributes Json //e.g {\"variable1\": \"Client Name\", \"variable2\": \"Fat Available Capacity\"}\n operations ArithmeticOperation[] //e.g {\"operation1\": \"sum\", \"operation2\": \"average\"}\n resultFormat ValueFormat @default(NUMBER)\n}\n\nmodel ReportVisualization {\n id String @id @unique @default(uuid())\n\n template IntegrationReportTemplate @relation(fields: [templateId], references: [id])\n templateId String\n\n metricIds String[] //List of ReportMetric IDs to be visualized\n\n chartType ChartType\n xAxisField String? //e.g \"Client Name\"\n yAxisField String? //e.g \"Fat Available Capacity\"\n\n useCustomColors Boolean @default(false)\n customColors Json? //e.g {\"red\": \"#FF0000\", \"blue\": \"#0000FF\"}\n}\n\nmodel ReportTable {\n id String @id @unique @default(uuid())\n\n templateId String\n template IntegrationReportTemplate @relation(fields: [templateId], references: [id])\n\n metricId String\n metric ReportMetric @relation(fields: [metricId], references: [id])\n\n columns String[] //e.g [\"Client Name\", \"Fat Available Capacity\"]\n includeHeader Boolean @default(true)\n sortBy Json? //e.g {\"column\": \"Client Name\", \"order\": \"asc\"} for sorting the table by a specific column\n}\n",
|
|
2445
|
+
"inlineSchemaHash": "9a0d2c08e46e5bdc3ff62a068b617683ca1383da09c35426427f8efdfd838064",
|
|
2442
2446
|
"copyEngine": true
|
|
2443
2447
|
}
|
|
2444
2448
|
|
|
@@ -2479,6 +2483,10 @@ Object.assign(exports, Prisma)
|
|
|
2479
2483
|
// file annotations for bundling tools to include these files
|
|
2480
2484
|
path.join(__dirname, "libquery_engine-darwin-arm64.dylib.node");
|
|
2481
2485
|
path.join(process.cwd(), "prisma/generated/libquery_engine-darwin-arm64.dylib.node")
|
|
2486
|
+
|
|
2487
|
+
// file annotations for bundling tools to include these files
|
|
2488
|
+
path.join(__dirname, "libquery_engine-debian-openssl-3.0.x.so.node");
|
|
2489
|
+
path.join(process.cwd(), "prisma/generated/libquery_engine-debian-openssl-3.0.x.so.node")
|
|
2482
2490
|
// file annotations for bundling tools to include these files
|
|
2483
2491
|
path.join(__dirname, "schema.prisma");
|
|
2484
2492
|
path.join(process.cwd(), "prisma/generated/schema.prisma")
|
|
Binary file
|