efiber-prisma-schema 1.10.6 → 1.10.8
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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
-- AlterEnum
|
|
2
|
+
ALTER TYPE "EquipmentType" ADD VALUE 'FDTSRO';
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "Building" ADD COLUMN "coordinates" JSONB;
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "FDTSRO" ADD COLUMN "coordinates" JSONB;
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "Loop" ADD COLUMN "coordinates" JSONB;
|
|
12
|
+
|
|
13
|
+
-- AlterTable
|
|
14
|
+
ALTER TABLE "Manhole" ADD COLUMN "coordinates" JSONB;
|
|
15
|
+
|
|
16
|
+
-- AlterTable
|
|
17
|
+
ALTER TABLE "PboFat" ADD COLUMN "coordinates" JSONB;
|
|
18
|
+
|
|
19
|
+
-- AlterTable
|
|
20
|
+
ALTER TABLE "Pole" ADD COLUMN "coordinates" JSONB;
|
|
21
|
+
|
|
22
|
+
-- AlterTable
|
|
23
|
+
ALTER TABLE "PreviousEquipment" ADD COLUMN "fdtsroId" TEXT;
|
|
24
|
+
|
|
25
|
+
-- AlterTable
|
|
26
|
+
ALTER TABLE "SFU" ADD COLUMN "coordinates" JSONB;
|
|
27
|
+
|
|
28
|
+
-- AlterTable
|
|
29
|
+
ALTER TABLE "SpliceClosure" ADD COLUMN "coordinates" JSONB;
|
|
30
|
+
|
|
31
|
+
-- AddForeignKey
|
|
32
|
+
ALTER TABLE "PreviousEquipment" ADD CONSTRAINT "PreviousEquipment_fdtsroId_fkey" FOREIGN KEY ("fdtsroId") REFERENCES "FDTSRO"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "integrationUserLocation" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"no" SERIAL NOT NULL,
|
|
5
|
+
"userId" TEXT NOT NULL,
|
|
6
|
+
"coordinates" JSONB NOT NULL,
|
|
7
|
+
"clusterId" TEXT,
|
|
8
|
+
"isActive" BOOLEAN NOT NULL DEFAULT true,
|
|
9
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
10
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
11
|
+
"deletedAt" TIMESTAMP(3),
|
|
12
|
+
|
|
13
|
+
CONSTRAINT "integrationUserLocation_pkey" PRIMARY KEY ("id")
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
-- CreateIndex
|
|
17
|
+
CREATE UNIQUE INDEX "integrationUserLocation_id_key" ON "integrationUserLocation"("id");
|
|
18
|
+
|
|
19
|
+
-- AddForeignKey
|
|
20
|
+
ALTER TABLE "integrationUserLocation" ADD CONSTRAINT "integrationUserLocation_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
21
|
+
|
|
22
|
+
-- AddForeignKey
|
|
23
|
+
ALTER TABLE "integrationUserLocation" ADD CONSTRAINT "integrationUserLocation_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -405,6 +405,7 @@ model User {
|
|
|
405
405
|
SFUTemplate SFUTemplate[]
|
|
406
406
|
BuildingTemplate BuildingTemplate[]
|
|
407
407
|
integrationProjectUserStatus integrationProjectUserStatus[]
|
|
408
|
+
integrationUserLocation integrationUserLocation[]
|
|
408
409
|
}
|
|
409
410
|
|
|
410
411
|
model MainProject {
|
|
@@ -1393,6 +1394,7 @@ model PboFat {
|
|
|
1393
1394
|
zone Json? //Color code for zone
|
|
1394
1395
|
geometry Json? //Icon for the PBO FAT
|
|
1395
1396
|
attributes Json? //Attributes for the PBO FAT
|
|
1397
|
+
coordinates Json?
|
|
1396
1398
|
autoincrement Boolean @default(true)
|
|
1397
1399
|
namePrefix String?
|
|
1398
1400
|
templateIndex Int?
|
|
@@ -1466,6 +1468,7 @@ model SpliceClosure {
|
|
|
1466
1468
|
zone Json? //Color code for zone
|
|
1467
1469
|
geometry Json? //Icon for the PBO FAT
|
|
1468
1470
|
attributes Json? //Attributes for the PBO FAT
|
|
1471
|
+
coordinates Json?
|
|
1469
1472
|
description String?
|
|
1470
1473
|
autoincrement Boolean @default(true)
|
|
1471
1474
|
namePrefix String?
|
|
@@ -1643,6 +1646,7 @@ model Pole {
|
|
|
1643
1646
|
zone Json?
|
|
1644
1647
|
geometry Json?
|
|
1645
1648
|
attributes Json?
|
|
1649
|
+
coordinates Json?
|
|
1646
1650
|
autoincrement Boolean @default(true)
|
|
1647
1651
|
namePrefix String?
|
|
1648
1652
|
templateIndex Int?
|
|
@@ -1715,6 +1719,7 @@ model Manhole {
|
|
|
1715
1719
|
zone Json?
|
|
1716
1720
|
geometry Json?
|
|
1717
1721
|
attributes Json?
|
|
1722
|
+
coordinates Json?
|
|
1718
1723
|
autoincrement Boolean @default(true)
|
|
1719
1724
|
namePrefix String?
|
|
1720
1725
|
templateIndex Int?
|
|
@@ -1787,6 +1792,7 @@ model Loop {
|
|
|
1787
1792
|
zone Json?
|
|
1788
1793
|
geometry Json?
|
|
1789
1794
|
attributes Json?
|
|
1795
|
+
coordinates Json?
|
|
1790
1796
|
autoincrement Boolean @default(true)
|
|
1791
1797
|
namePrefix String?
|
|
1792
1798
|
templateIndex Int?
|
|
@@ -1859,6 +1865,7 @@ model FDTSRO {
|
|
|
1859
1865
|
zone Json?
|
|
1860
1866
|
geometry Json?
|
|
1861
1867
|
attributes Json?
|
|
1868
|
+
coordinates Json?
|
|
1862
1869
|
autoincrement Boolean @default(true)
|
|
1863
1870
|
namePrefix String?
|
|
1864
1871
|
templateIndex Int?
|
|
@@ -1932,6 +1939,7 @@ model SFU {
|
|
|
1932
1939
|
zone Json?
|
|
1933
1940
|
geometry Json?
|
|
1934
1941
|
attributes Json?
|
|
1942
|
+
coordinates Json?
|
|
1935
1943
|
autoincrement Boolean @default(true)
|
|
1936
1944
|
namePrefix String?
|
|
1937
1945
|
templateIndex Int?
|
|
@@ -2005,6 +2013,7 @@ model Building {
|
|
|
2005
2013
|
zone Json?
|
|
2006
2014
|
geometry Json?
|
|
2007
2015
|
attributes Json?
|
|
2016
|
+
coordinates Json?
|
|
2008
2017
|
autoincrement Boolean @default(true)
|
|
2009
2018
|
namePrefix String?
|
|
2010
2019
|
templateIndex Int?
|
|
@@ -2126,29 +2135,30 @@ model Cluster {
|
|
|
2126
2135
|
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2127
2136
|
centralOfficeId String?
|
|
2128
2137
|
|
|
2129
|
-
users
|
|
2130
|
-
ZoneNro
|
|
2131
|
-
Pole
|
|
2132
|
-
Manhole
|
|
2133
|
-
Loop
|
|
2134
|
-
FDTSRO
|
|
2135
|
-
SFU
|
|
2136
|
-
Building
|
|
2137
|
-
Cable
|
|
2138
|
-
PboFat
|
|
2139
|
-
SpliceClosure
|
|
2140
|
-
CableTemplate
|
|
2141
|
-
PboFatTemplate
|
|
2142
|
-
SpliceClosureTemplate
|
|
2143
|
-
ZoneNroTemplate
|
|
2144
|
-
PoleTemplate
|
|
2145
|
-
ManholeTemplate
|
|
2146
|
-
LoopTemplate
|
|
2147
|
-
FDTSROTemplate
|
|
2148
|
-
SFUTemplate
|
|
2149
|
-
BuildingTemplate
|
|
2150
|
-
usersOnline
|
|
2151
|
-
qrCodeTemplate
|
|
2138
|
+
users User[]
|
|
2139
|
+
ZoneNro ZoneNro[]
|
|
2140
|
+
Pole Pole[]
|
|
2141
|
+
Manhole Manhole[]
|
|
2142
|
+
Loop Loop[]
|
|
2143
|
+
FDTSRO FDTSRO[]
|
|
2144
|
+
SFU SFU[]
|
|
2145
|
+
Building Building[]
|
|
2146
|
+
Cable Cable[]
|
|
2147
|
+
PboFat PboFat[]
|
|
2148
|
+
SpliceClosure SpliceClosure[]
|
|
2149
|
+
CableTemplate CableTemplate[]
|
|
2150
|
+
PboFatTemplate PboFatTemplate[]
|
|
2151
|
+
SpliceClosureTemplate SpliceClosureTemplate[]
|
|
2152
|
+
ZoneNroTemplate ZoneNroTemplate[]
|
|
2153
|
+
PoleTemplate PoleTemplate[]
|
|
2154
|
+
ManholeTemplate ManholeTemplate[]
|
|
2155
|
+
LoopTemplate LoopTemplate[]
|
|
2156
|
+
FDTSROTemplate FDTSROTemplate[]
|
|
2157
|
+
SFUTemplate SFUTemplate[]
|
|
2158
|
+
BuildingTemplate BuildingTemplate[]
|
|
2159
|
+
usersOnline integrationProjectUserStatus[]
|
|
2160
|
+
qrCodeTemplate qrCodeTemplate[]
|
|
2161
|
+
integrationUserLocation integrationUserLocation[]
|
|
2152
2162
|
}
|
|
2153
2163
|
|
|
2154
2164
|
model qrCodeTemplate {
|
|
@@ -2295,3 +2305,22 @@ model PreviousEquipment {
|
|
|
2295
2305
|
|
|
2296
2306
|
@@unique([fromTable, fromId, toTable, toId])
|
|
2297
2307
|
}
|
|
2308
|
+
|
|
2309
|
+
model integrationUserLocation {
|
|
2310
|
+
id String @id @unique @default(uuid())
|
|
2311
|
+
no Int @default(autoincrement())
|
|
2312
|
+
|
|
2313
|
+
User User @relation(fields: [userId], references: [id])
|
|
2314
|
+
userId String
|
|
2315
|
+
|
|
2316
|
+
coordinates Json
|
|
2317
|
+
|
|
2318
|
+
cluster Cluster? @relation(fields: [clusterId], references: [id])
|
|
2319
|
+
clusterId String?
|
|
2320
|
+
|
|
2321
|
+
isActive Boolean @default(true)
|
|
2322
|
+
|
|
2323
|
+
createdAt DateTime @default(now())
|
|
2324
|
+
updatedAt DateTime @updatedAt
|
|
2325
|
+
deletedAt DateTime?
|
|
2326
|
+
}
|