efiber-prisma-schema 1.10.7 → 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 {
|
|
@@ -2134,29 +2135,30 @@ model Cluster {
|
|
|
2134
2135
|
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2135
2136
|
centralOfficeId String?
|
|
2136
2137
|
|
|
2137
|
-
users
|
|
2138
|
-
ZoneNro
|
|
2139
|
-
Pole
|
|
2140
|
-
Manhole
|
|
2141
|
-
Loop
|
|
2142
|
-
FDTSRO
|
|
2143
|
-
SFU
|
|
2144
|
-
Building
|
|
2145
|
-
Cable
|
|
2146
|
-
PboFat
|
|
2147
|
-
SpliceClosure
|
|
2148
|
-
CableTemplate
|
|
2149
|
-
PboFatTemplate
|
|
2150
|
-
SpliceClosureTemplate
|
|
2151
|
-
ZoneNroTemplate
|
|
2152
|
-
PoleTemplate
|
|
2153
|
-
ManholeTemplate
|
|
2154
|
-
LoopTemplate
|
|
2155
|
-
FDTSROTemplate
|
|
2156
|
-
SFUTemplate
|
|
2157
|
-
BuildingTemplate
|
|
2158
|
-
usersOnline
|
|
2159
|
-
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[]
|
|
2160
2162
|
}
|
|
2161
2163
|
|
|
2162
2164
|
model qrCodeTemplate {
|
|
@@ -2303,3 +2305,22 @@ model PreviousEquipment {
|
|
|
2303
2305
|
|
|
2304
2306
|
@@unique([fromTable, fromId, toTable, toId])
|
|
2305
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
|
+
}
|