efiber-prisma-schema 1.2.7 → 1.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efiber-prisma-schema",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -361,6 +361,7 @@ model User {
361
361
  pboFat PboFat[]
362
362
  cable Cable[]
363
363
  SpliceClosure SpliceClosure[]
364
+ CableTemplate CableTemplate[]
364
365
  }
365
366
 
366
367
  model MainProject {
@@ -412,6 +413,8 @@ model Project {
412
413
  pboFat PboFat[]
413
414
  cableAttributes CableAtttributes[]
414
415
  spliceClosureAttributes SpliceClosureAttributes[]
416
+ Cable Cable[]
417
+ CableTemplate CableTemplate[]
415
418
  }
416
419
 
417
420
  model Audit {
@@ -1103,35 +1106,63 @@ model NetworkElement {
1103
1106
  pboFatTemplate PboFatTemplate[]
1104
1107
  Cable Cable[]
1105
1108
  SpliceClosure SpliceClosure[]
1109
+ CableTemplate CableTemplate[]
1106
1110
  }
1107
1111
 
1108
1112
  model Cable {
1109
- id String @id @unique @default(uuid())
1110
- no Int @default(autoincrement())
1111
- name String
1112
- type String //aerial/underground
1113
- capacity Int
1114
- fibersActive Int
1115
- fibersReserved Int
1116
- fibersDark Int
1117
- fibersDedicated Int
1118
- length Int?
1119
- brand String?
1120
- description String?
1113
+ id String @id @unique @default(uuid())
1114
+ no Int @default(autoincrement())
1121
1115
 
1122
- createdAt DateTime @default(now())
1123
- updatedAt DateTime @updatedAt
1124
- updatedBy User? @relation(fields: [updatedById], references: [id])
1116
+ status String @default("active")
1117
+ name String?
1118
+ photos Json? //Upload files for photos
1119
+ zone Json? //Color code for zone
1120
+ geometry Json? //Icon for the cable
1121
+ attributes Json? //Attributes for the cable
1122
+
1123
+ createdAt DateTime @default(now())
1124
+ updatedAt DateTime @updatedAt
1125
+ deletedAt DateTime?
1126
+
1127
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1125
1128
  updatedById String?
1126
- deletedAt DateTime?
1127
1129
 
1128
1130
  networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1129
1131
  networkElementId String
1130
1132
 
1131
- cableAttributes CableAtttributes[]
1133
+ project Project? @relation(fields: [projectId], references: [id])
1134
+ projectId String?
1132
1135
 
1133
- pboFatAttributes PboFatAttributes[]
1134
- spliceClosureAttributes SpliceClosureAttributes[]
1136
+ cableAttributes CableAtttributes[]
1137
+ PboFatAttributes PboFatAttributes[]
1138
+ SpliceClosureAttributes SpliceClosureAttributes[]
1139
+ }
1140
+
1141
+ model CableTemplate {
1142
+ id String @id @unique @default(uuid())
1143
+ no Int @default(autoincrement())
1144
+
1145
+ status String @default("active")
1146
+ name String?
1147
+ photos Json? //Upload files for photos
1148
+ zone Json? //Color code for zone
1149
+ geometry Json? //Icon for the cable
1150
+ attributes Json? //Attributes for the cable
1151
+
1152
+ createdAt DateTime @default(now())
1153
+ updatedAt DateTime @updatedAt
1154
+ deletedAt DateTime?
1155
+
1156
+ updatedBy User? @relation(fields: [updatedById], references: [id])
1157
+ updatedById String?
1158
+
1159
+ networkElement NetworkElement @relation(fields: [networkElementId], references: [id])
1160
+ networkElementId String
1161
+
1162
+ project Project? @relation(fields: [projectId], references: [id])
1163
+ projectId String?
1164
+
1165
+ cableAttributes CableAtttributes[]
1135
1166
  }
1136
1167
 
1137
1168
  model CableAtttributes {
@@ -1151,8 +1182,10 @@ model CableAtttributes {
1151
1182
  project Project? @relation(fields: [projectId], references: [id])
1152
1183
  projectId String?
1153
1184
 
1154
- material Material? @relation(fields: [materialId], references: [id])
1155
- materialId String?
1185
+ material Material? @relation(fields: [materialId], references: [id])
1186
+ materialId String?
1187
+ CableTemplate CableTemplate? @relation(fields: [cableTemplateId], references: [id])
1188
+ cableTemplateId String?
1156
1189
  }
1157
1190
 
1158
1191
  model Splitter {
@@ -1224,11 +1257,12 @@ model PboFat {
1224
1257
  }
1225
1258
 
1226
1259
  model PboFatAttributes {
1227
- id String @id @unique @default(uuid())
1228
- no Int @default(autoincrement())
1229
- name String
1230
- description String?
1231
- value String?
1260
+ id String @id @unique @default(uuid())
1261
+ no Int @default(autoincrement())
1262
+ name String
1263
+ description String?
1264
+ value String?
1265
+ visibleOnMobile Boolean @default(false)
1232
1266
 
1233
1267
  createdAt DateTime @default(now())
1234
1268
  updatedAt DateTime @updatedAt