efiber-prisma-schema 1.11.6 → 1.12.0

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.11.6",
3
+ "version": "1.12.0",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,5 @@
1
+ -- CreateEnum
2
+ CREATE TYPE "NetworkElementClassification" AS ENUM ('NetworkElement', 'InfrastructureElement', 'MapElement');
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "NetworkElement" ADD COLUMN "classification" "NetworkElementClassification" NOT NULL DEFAULT 'NetworkElement';
@@ -7,6 +7,12 @@ datasource db {
7
7
  url = env("DATABASE_URL")
8
8
  }
9
9
 
10
+ enum NetworkElementClassification {
11
+ NetworkElement
12
+ InfrastructureElement
13
+ MapElement
14
+ }
15
+
10
16
  enum ProjectLevel {
11
17
  Subsidiary
12
18
  Client
@@ -1281,6 +1287,7 @@ model NetworkElement {
1281
1287
  createdAt DateTime @default(now())
1282
1288
  updatedAt DateTime @updatedAt
1283
1289
  deletedAt DateTime?
1290
+ classification NetworkElementClassification @default(NetworkElement)
1284
1291
 
1285
1292
  PboFat PboFat[]
1286
1293
  pboFatTemplate PboFatTemplate[]
@@ -1346,7 +1353,7 @@ model Cable {
1346
1353
  cableAttributes CableAtttributes[]
1347
1354
  PboFatAttributes PboFatAttributes[]
1348
1355
  qrCodeTag qrCodeTag[]
1349
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1356
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1350
1357
  clusterId String?
1351
1358
  }
1352
1359
 
@@ -1380,7 +1387,7 @@ model CableTemplate {
1380
1387
  cableAttributes CableAtttributes[]
1381
1388
  qrCodeTemplate qrCodeTemplate[]
1382
1389
  Cable Cable[]
1383
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1390
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1384
1391
  clusterId String?
1385
1392
  }
1386
1393
 
@@ -1451,7 +1458,7 @@ model PboFatTemplate {
1451
1458
  //TODO: Add the fields for input/output cable, previous/next equipment, CO and project phase
1452
1459
  qrCodeTemplate qrCodeTemplate[]
1453
1460
  PboFat PboFat[]
1454
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1461
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1455
1462
  clusterId String?
1456
1463
  }
1457
1464
 
@@ -1500,7 +1507,7 @@ model PboFat {
1500
1507
  pboFatAttributes PboFatAttributes[]
1501
1508
  // qrCode qrCode[]
1502
1509
  qrCodeTag qrCodeTag[]
1503
- Cluster Cluster? @relation(fields: [clusterId], references: [id])
1510
+ cluster Cluster? @relation(fields: [clusterId], references: [id])
1504
1511
  clusterId String?
1505
1512
 
1506
1513
  dependencies PreviousEquipment[]