efiber-prisma-schema 1.13.3 → 1.13.5
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.13.
|
|
3
|
+
"version": "1.13.5",
|
|
4
4
|
"description": "Database schema for eFiber",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"homepage": "https://github.com/ubuniworks-projects/efiber-prisma-schema#readme",
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@prisma/client": "^6.
|
|
22
|
-
"prisma": "^6.
|
|
21
|
+
"@prisma/client": "^6.18.0",
|
|
22
|
+
"prisma": "^6.18.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@prisma/client": ">=5"
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- You are about to drop the column `ductId` on the `Cable` table. All the data in the column will be lost.
|
|
5
|
+
- You are about to drop the column `pboFatId` on the `Cable` table. All the data in the column will be lost.
|
|
6
|
+
- You are about to drop the column `fdtsroMaxCapacity` on the `FDTSRO` table. All the data in the column will be lost.
|
|
7
|
+
- You are about to drop the column `spliceClosureMaxCapacity` on the `SpliceClosure` table. All the data in the column will be lost.
|
|
8
|
+
|
|
9
|
+
*/
|
|
10
|
+
-- DropForeignKey
|
|
11
|
+
ALTER TABLE "public"."Cable" DROP CONSTRAINT "Cable_ductId_fkey";
|
|
12
|
+
|
|
13
|
+
-- DropForeignKey
|
|
14
|
+
ALTER TABLE "public"."Cable" DROP CONSTRAINT "Cable_pboFatId_fkey";
|
|
15
|
+
|
|
16
|
+
-- AlterTable
|
|
17
|
+
ALTER TABLE "Building" ADD COLUMN "buildingName" TEXT,
|
|
18
|
+
ADD COLUMN "managerName" TEXT,
|
|
19
|
+
ADD COLUMN "managerPhone" TEXT;
|
|
20
|
+
|
|
21
|
+
-- AlterTable
|
|
22
|
+
ALTER TABLE "Cable" DROP COLUMN "ductId",
|
|
23
|
+
DROP COLUMN "pboFatId";
|
|
24
|
+
|
|
25
|
+
-- AlterTable
|
|
26
|
+
ALTER TABLE "Conduit" ADD COLUMN "address" TEXT,
|
|
27
|
+
ADD COLUMN "backfillMaterial" TEXT,
|
|
28
|
+
ADD COLUMN "brand" TEXT,
|
|
29
|
+
ADD COLUMN "brandDescription" TEXT,
|
|
30
|
+
ADD COLUMN "conduitLength" DOUBLE PRECISION,
|
|
31
|
+
ADD COLUMN "enclosureDestinationId" TEXT,
|
|
32
|
+
ADD COLUMN "enclosureDestinationType" TEXT,
|
|
33
|
+
ADD COLUMN "enclosureOriginId" TEXT,
|
|
34
|
+
ADD COLUMN "enclosureOriginType" TEXT,
|
|
35
|
+
ADD COLUMN "materialListReference" TEXT,
|
|
36
|
+
ADD COLUMN "reinforcementMaterial" TEXT,
|
|
37
|
+
ADD COLUMN "specialCharacteristics" TEXT,
|
|
38
|
+
ADD COLUMN "trenchConfiguration" TEXT,
|
|
39
|
+
ADD COLUMN "trenchDepth" DOUBLE PRECISION;
|
|
40
|
+
|
|
41
|
+
-- AlterTable
|
|
42
|
+
ALTER TABLE "FDTSRO" DROP COLUMN "fdtsroMaxCapacity",
|
|
43
|
+
ADD COLUMN "address" TEXT,
|
|
44
|
+
ADD COLUMN "brand" TEXT,
|
|
45
|
+
ADD COLUMN "brandDescription" TEXT,
|
|
46
|
+
ADD COLUMN "materialListReference" TEXT,
|
|
47
|
+
ADD COLUMN "maximumCapacity" INTEGER,
|
|
48
|
+
ADD COLUMN "nextEquipmentId" TEXT,
|
|
49
|
+
ADD COLUMN "nextEquipmentType" TEXT,
|
|
50
|
+
ADD COLUMN "placeOfInstallation" TEXT,
|
|
51
|
+
ADD COLUMN "previousEquipmentId" TEXT,
|
|
52
|
+
ADD COLUMN "previousEquipmentType" TEXT,
|
|
53
|
+
ADD COLUMN "typeOfEnclosure" TEXT;
|
|
54
|
+
|
|
55
|
+
-- AlterTable
|
|
56
|
+
ALTER TABLE "Loop" ADD COLUMN "brand" TEXT,
|
|
57
|
+
ADD COLUMN "brandDescription" TEXT,
|
|
58
|
+
ADD COLUMN "cableId" TEXT,
|
|
59
|
+
ADD COLUMN "length" DOUBLE PRECISION,
|
|
60
|
+
ADD COLUMN "materialListReference" TEXT;
|
|
61
|
+
|
|
62
|
+
-- AlterTable
|
|
63
|
+
ALTER TABLE "Manhole" ADD COLUMN "address" TEXT,
|
|
64
|
+
ADD COLUMN "brand" TEXT,
|
|
65
|
+
ADD COLUMN "brandDescription" TEXT,
|
|
66
|
+
ADD COLUMN "coverType" TEXT,
|
|
67
|
+
ADD COLUMN "dimension" TEXT,
|
|
68
|
+
ADD COLUMN "material" TEXT,
|
|
69
|
+
ADD COLUMN "materialListReference" TEXT;
|
|
70
|
+
|
|
71
|
+
-- AlterTable
|
|
72
|
+
ALTER TABLE "Pole" ADD COLUMN "address" TEXT,
|
|
73
|
+
ADD COLUMN "bottomDiameter" DOUBLE PRECISION,
|
|
74
|
+
ADD COLUMN "brand" TEXT,
|
|
75
|
+
ADD COLUMN "brandDescription" TEXT,
|
|
76
|
+
ADD COLUMN "downGuy" BOOLEAN NOT NULL DEFAULT false,
|
|
77
|
+
ADD COLUMN "height" DOUBLE PRECISION,
|
|
78
|
+
ADD COLUMN "material" TEXT,
|
|
79
|
+
ADD COLUMN "materialListReference" TEXT,
|
|
80
|
+
ADD COLUMN "topDiameter" DOUBLE PRECISION;
|
|
81
|
+
|
|
82
|
+
-- AlterTable
|
|
83
|
+
ALTER TABLE "SpliceClosure" DROP COLUMN "spliceClosureMaxCapacity",
|
|
84
|
+
ADD COLUMN "address" TEXT,
|
|
85
|
+
ADD COLUMN "brand" TEXT,
|
|
86
|
+
ADD COLUMN "brandDescription" TEXT,
|
|
87
|
+
ADD COLUMN "materialListReference" TEXT,
|
|
88
|
+
ADD COLUMN "nextEquipmentId" TEXT,
|
|
89
|
+
ADD COLUMN "nextEquipmentType" TEXT,
|
|
90
|
+
ADD COLUMN "placeOfInstallation" TEXT,
|
|
91
|
+
ADD COLUMN "previousEquipmentId" TEXT,
|
|
92
|
+
ADD COLUMN "previousEquipmentType" TEXT,
|
|
93
|
+
ADD COLUMN "spliceClosureMaximumCapacity" INTEGER;
|
|
94
|
+
|
|
95
|
+
-- CreateTable
|
|
96
|
+
CREATE TABLE "_CableToSpliceClosure" (
|
|
97
|
+
"A" TEXT NOT NULL,
|
|
98
|
+
"B" TEXT NOT NULL,
|
|
99
|
+
|
|
100
|
+
CONSTRAINT "_CableToSpliceClosure_AB_pkey" PRIMARY KEY ("A","B")
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
-- CreateTable
|
|
104
|
+
CREATE TABLE "_CableToDuct" (
|
|
105
|
+
"A" TEXT NOT NULL,
|
|
106
|
+
"B" TEXT NOT NULL,
|
|
107
|
+
|
|
108
|
+
CONSTRAINT "_CableToDuct_AB_pkey" PRIMARY KEY ("A","B")
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
-- CreateTable
|
|
112
|
+
CREATE TABLE "_CableToPboFat" (
|
|
113
|
+
"A" TEXT NOT NULL,
|
|
114
|
+
"B" TEXT NOT NULL,
|
|
115
|
+
|
|
116
|
+
CONSTRAINT "_CableToPboFat_AB_pkey" PRIMARY KEY ("A","B")
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
-- CreateTable
|
|
120
|
+
CREATE TABLE "_CableToFDTSRO" (
|
|
121
|
+
"A" TEXT NOT NULL,
|
|
122
|
+
"B" TEXT NOT NULL,
|
|
123
|
+
|
|
124
|
+
CONSTRAINT "_CableToFDTSRO_AB_pkey" PRIMARY KEY ("A","B")
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
-- CreateIndex
|
|
128
|
+
CREATE INDEX "_CableToSpliceClosure_B_index" ON "_CableToSpliceClosure"("B");
|
|
129
|
+
|
|
130
|
+
-- CreateIndex
|
|
131
|
+
CREATE INDEX "_CableToDuct_B_index" ON "_CableToDuct"("B");
|
|
132
|
+
|
|
133
|
+
-- CreateIndex
|
|
134
|
+
CREATE INDEX "_CableToPboFat_B_index" ON "_CableToPboFat"("B");
|
|
135
|
+
|
|
136
|
+
-- CreateIndex
|
|
137
|
+
CREATE INDEX "_CableToFDTSRO_B_index" ON "_CableToFDTSRO"("B");
|
|
138
|
+
|
|
139
|
+
-- AddForeignKey
|
|
140
|
+
ALTER TABLE "Loop" ADD CONSTRAINT "Loop_cableId_fkey" FOREIGN KEY ("cableId") REFERENCES "Cable"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
141
|
+
|
|
142
|
+
-- AddForeignKey
|
|
143
|
+
ALTER TABLE "_CableToSpliceClosure" ADD CONSTRAINT "_CableToSpliceClosure_A_fkey" FOREIGN KEY ("A") REFERENCES "Cable"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
144
|
+
|
|
145
|
+
-- AddForeignKey
|
|
146
|
+
ALTER TABLE "_CableToSpliceClosure" ADD CONSTRAINT "_CableToSpliceClosure_B_fkey" FOREIGN KEY ("B") REFERENCES "SpliceClosure"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
147
|
+
|
|
148
|
+
-- AddForeignKey
|
|
149
|
+
ALTER TABLE "_CableToDuct" ADD CONSTRAINT "_CableToDuct_A_fkey" FOREIGN KEY ("A") REFERENCES "Cable"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
150
|
+
|
|
151
|
+
-- AddForeignKey
|
|
152
|
+
ALTER TABLE "_CableToDuct" ADD CONSTRAINT "_CableToDuct_B_fkey" FOREIGN KEY ("B") REFERENCES "Duct"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
153
|
+
|
|
154
|
+
-- AddForeignKey
|
|
155
|
+
ALTER TABLE "_CableToPboFat" ADD CONSTRAINT "_CableToPboFat_A_fkey" FOREIGN KEY ("A") REFERENCES "Cable"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
156
|
+
|
|
157
|
+
-- AddForeignKey
|
|
158
|
+
ALTER TABLE "_CableToPboFat" ADD CONSTRAINT "_CableToPboFat_B_fkey" FOREIGN KEY ("B") REFERENCES "PboFat"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
159
|
+
|
|
160
|
+
-- AddForeignKey
|
|
161
|
+
ALTER TABLE "_CableToFDTSRO" ADD CONSTRAINT "_CableToFDTSRO_A_fkey" FOREIGN KEY ("A") REFERENCES "Cable"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
162
|
+
|
|
163
|
+
-- AddForeignKey
|
|
164
|
+
ALTER TABLE "_CableToFDTSRO" ADD CONSTRAINT "_CableToFDTSRO_B_fkey" FOREIGN KEY ("B") REFERENCES "FDTSRO"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -1543,15 +1543,15 @@ model Cable {
|
|
|
1543
1543
|
cableAttachments CableAttachment[]
|
|
1544
1544
|
cableAttributes CableAttributes[]
|
|
1545
1545
|
PboFatAttributes PboFatAttributes[]
|
|
1546
|
+
spliceClosures SpliceClosure[]
|
|
1546
1547
|
qrCodeTag qrCodeTag[]
|
|
1547
1548
|
cluster Cluster? @relation(fields: [clusterId], references: [id])
|
|
1548
1549
|
clusterId String?
|
|
1549
1550
|
Revision Revision[]
|
|
1550
|
-
Duct
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1551
|
+
ducts Duct[]
|
|
1552
|
+
PboFat PboFat[]
|
|
1553
|
+
Loop Loop[]
|
|
1554
|
+
fdtsro FDTSRO[]
|
|
1555
1555
|
|
|
1556
1556
|
@@index([enclosureOriginType, enclosureOriginId])
|
|
1557
1557
|
@@index([enclosureDestinationType, enclosureDestinationId])
|
|
@@ -1640,6 +1640,21 @@ model Conduit {
|
|
|
1640
1640
|
isInRevision Boolean @default(false)
|
|
1641
1641
|
installationStatus String? @default("pending") //pending, approved, in-revision
|
|
1642
1642
|
|
|
1643
|
+
address String? //Address of the conduit
|
|
1644
|
+
trenchConfiguration String? //Trench configuration for the conduit
|
|
1645
|
+
trenchDepth Float? //Trench depth for the conduit
|
|
1646
|
+
backfillMaterial String? //Backfill material for the conduit
|
|
1647
|
+
reinforcementMaterial String? //Reinforcement material for the conduit
|
|
1648
|
+
specialCharacteristics String? //Special characteristics of the conduit
|
|
1649
|
+
enclosureOriginType String? //Type of the origin enclosure
|
|
1650
|
+
enclosureOriginId String? //ID of the origin enclosure
|
|
1651
|
+
enclosureDestinationType String? //Type of the destination enclosure
|
|
1652
|
+
enclosureDestinationId String? //ID of the destination enclosure
|
|
1653
|
+
conduitLength Float? //Length of the conduit in meters
|
|
1654
|
+
brand String? //Brand of the conduit
|
|
1655
|
+
brandDescription String? //Description of the brand
|
|
1656
|
+
materialListReference String? //Reference to the material list
|
|
1657
|
+
|
|
1643
1658
|
comments String?
|
|
1644
1659
|
|
|
1645
1660
|
updatedBy User? @relation(fields: [updatedById], references: [id])
|
|
@@ -1836,7 +1851,7 @@ model PboFat {
|
|
|
1836
1851
|
installationStatus String? @default("pending") //pending, approved, in-revision
|
|
1837
1852
|
|
|
1838
1853
|
// Reporting mirrors
|
|
1839
|
-
fatMaximumCapacity
|
|
1854
|
+
fatMaximumCapacity Int? //Maximum capacity of the PBO FAT
|
|
1840
1855
|
fatExistingSubscribers Int? //Existing subscribers in the PBO FAT
|
|
1841
1856
|
fatAvailableCapacity Int? //Available capacity in the PBO FAT
|
|
1842
1857
|
placeOfInstallation String? //ID to an Infrastructure element
|
|
@@ -1952,7 +1967,16 @@ model SpliceClosure {
|
|
|
1952
1967
|
comments String?
|
|
1953
1968
|
|
|
1954
1969
|
// Reporting mirrors
|
|
1955
|
-
|
|
1970
|
+
spliceClosureMaximumCapacity Int? //Maximum capacity of the Splice Closure
|
|
1971
|
+
placeOfInstallation String? //ID to an Infrastructure element
|
|
1972
|
+
address String? //Address of the Splice Closure
|
|
1973
|
+
previousEquipmentType String? //Type of the previous equipment
|
|
1974
|
+
previousEquipmentId String? //ID of the previous equipment
|
|
1975
|
+
nextEquipmentType String? //Type of the next equipment
|
|
1976
|
+
nextEquipmentId String? //ID of the next equipment
|
|
1977
|
+
brand String?
|
|
1978
|
+
brandDescription String?
|
|
1979
|
+
materialListReference String? //Reference to the material list
|
|
1956
1980
|
|
|
1957
1981
|
createdAt DateTime @default(now())
|
|
1958
1982
|
updatedAt DateTime @updatedAt
|
|
@@ -1983,6 +2007,7 @@ model SpliceClosure {
|
|
|
1983
2007
|
|
|
1984
2008
|
dependencies PreviousEquipment[]
|
|
1985
2009
|
Revision Revision[]
|
|
2010
|
+
cables Cable[]
|
|
1986
2011
|
}
|
|
1987
2012
|
|
|
1988
2013
|
model SpliceClosureTemplate {
|
|
@@ -2153,6 +2178,16 @@ model Pole {
|
|
|
2153
2178
|
isInstalled Boolean @default(false)
|
|
2154
2179
|
installationDate DateTime?
|
|
2155
2180
|
|
|
2181
|
+
address String? //Address of the pole
|
|
2182
|
+
material String? //Material of the pole
|
|
2183
|
+
height Float? //Height of the pole in meters
|
|
2184
|
+
topDiameter Float? //Top diameter of the pole in meters
|
|
2185
|
+
bottomDiameter Float? //Bottom diameter of the pole in meters
|
|
2186
|
+
downGuy Boolean @default(false) //Does the pole have a down guy?
|
|
2187
|
+
brand String? //Brand of the pole
|
|
2188
|
+
brandDescription String? //Description of the brand
|
|
2189
|
+
materialListReference String? //Reference to the material list
|
|
2190
|
+
|
|
2156
2191
|
comments String?
|
|
2157
2192
|
|
|
2158
2193
|
isInRevision Boolean @default(false)
|
|
@@ -2243,6 +2278,14 @@ model Manhole {
|
|
|
2243
2278
|
isInstalled Boolean @default(false)
|
|
2244
2279
|
installationDate DateTime?
|
|
2245
2280
|
|
|
2281
|
+
address String? //Address of the manhole
|
|
2282
|
+
material String? //Material of the manhole
|
|
2283
|
+
dimension String? //Dimension of the manhole
|
|
2284
|
+
coverType String? //Type of the cover
|
|
2285
|
+
brand String? //Brand of the manhole
|
|
2286
|
+
brandDescription String? //Description of the brand
|
|
2287
|
+
materialListReference String? //Reference to the material list
|
|
2288
|
+
|
|
2246
2289
|
comments String?
|
|
2247
2290
|
|
|
2248
2291
|
isInRevision Boolean @default(false)
|
|
@@ -2333,6 +2376,11 @@ model Loop {
|
|
|
2333
2376
|
isInstalled Boolean @default(false)
|
|
2334
2377
|
installationDate DateTime?
|
|
2335
2378
|
|
|
2379
|
+
length Float? //Length of the loop in meters
|
|
2380
|
+
brand String? //Brand of the loop
|
|
2381
|
+
brandDescription String? //Description of the brand
|
|
2382
|
+
materialListReference String? //Reference to the material list
|
|
2383
|
+
|
|
2336
2384
|
comments String?
|
|
2337
2385
|
|
|
2338
2386
|
isInRevision Boolean @default(false)
|
|
@@ -2363,6 +2411,9 @@ model Loop {
|
|
|
2363
2411
|
installation NetworkElementInstallation? @relation(fields: [installationId], references: [id])
|
|
2364
2412
|
installationId String?
|
|
2365
2413
|
|
|
2414
|
+
cable Cable? @relation(fields: [cableId], references: [id])
|
|
2415
|
+
cableId String?
|
|
2416
|
+
|
|
2366
2417
|
qrCodeTag qrCodeTag[]
|
|
2367
2418
|
Revision Revision[]
|
|
2368
2419
|
}
|
|
@@ -2429,7 +2480,17 @@ model FDTSRO {
|
|
|
2429
2480
|
installationStatus String? @default("pending") //pending, approved, in-revision
|
|
2430
2481
|
|
|
2431
2482
|
// Reporting mirrors
|
|
2432
|
-
|
|
2483
|
+
maximumCapacity Int? //Maximum capacity of the FDTSRO
|
|
2484
|
+
typeOfEnclosure String? //Type of the enclosure
|
|
2485
|
+
placeOfInstallation String? //ID to an Infrastructure element
|
|
2486
|
+
address String? //Address of the FDTSRO
|
|
2487
|
+
previousEquipmentType String? //Type of the previous equipment
|
|
2488
|
+
previousEquipmentId String? //ID of the previous equipment
|
|
2489
|
+
nextEquipmentType String? //Type of the next equipment
|
|
2490
|
+
nextEquipmentId String? //ID of the next equipment
|
|
2491
|
+
brand String?
|
|
2492
|
+
brandDescription String? //Description of the brand
|
|
2493
|
+
materialListReference String? //Reference to the material list
|
|
2433
2494
|
|
|
2434
2495
|
createdAt DateTime @default(now())
|
|
2435
2496
|
updatedAt DateTime @updatedAt
|
|
@@ -2459,6 +2520,7 @@ model FDTSRO {
|
|
|
2459
2520
|
qrCodeTag qrCodeTag[]
|
|
2460
2521
|
PreviousEquipment PreviousEquipment[]
|
|
2461
2522
|
Revision Revision[]
|
|
2523
|
+
cables Cable[]
|
|
2462
2524
|
}
|
|
2463
2525
|
|
|
2464
2526
|
model FDTSROTemplate {
|
|
@@ -2614,9 +2676,12 @@ model Building {
|
|
|
2614
2676
|
installationStatus String? @default("pending") //pending, approved, in-revision
|
|
2615
2677
|
|
|
2616
2678
|
// Reporting mirrors
|
|
2679
|
+
buildingName String? //Name of the building
|
|
2617
2680
|
totalFlats Int? //Total number of flats in the building
|
|
2618
2681
|
floorCount Int? //Number of floors in the building
|
|
2619
2682
|
flatsPerFloor Int? //Number of flats per floor
|
|
2683
|
+
managerName String? //Name of the building manager
|
|
2684
|
+
managerPhone String? //Phone number of the building manager
|
|
2620
2685
|
|
|
2621
2686
|
createdAt DateTime @default(now())
|
|
2622
2687
|
updatedAt DateTime @updatedAt
|
|
@@ -2709,6 +2774,8 @@ model Revision {
|
|
|
2709
2774
|
updatedAt DateTime @updatedAt
|
|
2710
2775
|
resolvedAt DateTime?
|
|
2711
2776
|
|
|
2777
|
+
clientRevisionId String? // ID of the revision from the client side
|
|
2778
|
+
|
|
2712
2779
|
resolutionNotes String?
|
|
2713
2780
|
|
|
2714
2781
|
pboFat PboFat? @relation(fields: [pboFatId], references: [id])
|