efiber-prisma-schema 1.12.10 → 1.12.12
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,22 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "ClusterComments" (
|
|
3
|
+
"id" TEXT NOT NULL,
|
|
4
|
+
"no" SERIAL NOT NULL,
|
|
5
|
+
"comment" TEXT NOT NULL,
|
|
6
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
7
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
8
|
+
"deletedAt" TIMESTAMP(3),
|
|
9
|
+
"userId" TEXT NOT NULL,
|
|
10
|
+
"clusterId" TEXT NOT NULL,
|
|
11
|
+
|
|
12
|
+
CONSTRAINT "ClusterComments_pkey" PRIMARY KEY ("id")
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
-- CreateIndex
|
|
16
|
+
CREATE UNIQUE INDEX "ClusterComments_id_key" ON "ClusterComments"("id");
|
|
17
|
+
|
|
18
|
+
-- AddForeignKey
|
|
19
|
+
ALTER TABLE "ClusterComments" ADD CONSTRAINT "ClusterComments_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
20
|
+
|
|
21
|
+
-- AddForeignKey
|
|
22
|
+
ALTER TABLE "ClusterComments" ADD CONSTRAINT "ClusterComments_clusterId_fkey" FOREIGN KEY ("clusterId") REFERENCES "Cluster"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- The `projectPhase` column on the `Cluster` table would be dropped and recreated. This will lead to data loss if there is data in the column.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- CreateEnum
|
|
8
|
+
CREATE TYPE "ClusterProjectPhase" AS ENUM ('Survey', 'Design', 'Construction', 'GIS', 'Dispatch');
|
|
9
|
+
|
|
10
|
+
-- AlterTable
|
|
11
|
+
ALTER TABLE "Cluster" ADD COLUMN "constructionProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
|
|
12
|
+
ADD COLUMN "designProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
|
|
13
|
+
ADD COLUMN "dispatchProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
|
|
14
|
+
ADD COLUMN "gisProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
|
|
15
|
+
ADD COLUMN "surveyProjectStatus" TEXT NOT NULL DEFAULT 'Pending',
|
|
16
|
+
DROP COLUMN "projectPhase",
|
|
17
|
+
ADD COLUMN "projectPhase" "ClusterProjectPhase" NOT NULL DEFAULT 'Survey';
|
package/prisma/schema.prisma
CHANGED
|
@@ -95,6 +95,14 @@ enum NotificationPlatform {
|
|
|
95
95
|
Mobile
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
enum ClusterProjectPhase {
|
|
99
|
+
Survey
|
|
100
|
+
Design
|
|
101
|
+
Construction
|
|
102
|
+
GIS
|
|
103
|
+
Dispatch
|
|
104
|
+
}
|
|
105
|
+
|
|
98
106
|
model Country {
|
|
99
107
|
id String @id @unique @default(uuid())
|
|
100
108
|
no Int @default(autoincrement())
|
|
@@ -483,6 +491,7 @@ model User {
|
|
|
483
491
|
MapElementTemplate MapElementTemplate[]
|
|
484
492
|
MapElement MapElement[]
|
|
485
493
|
CentralOfficeUser CentralOfficeUser[]
|
|
494
|
+
ClusterComments ClusterComments[]
|
|
486
495
|
}
|
|
487
496
|
|
|
488
497
|
model MainProject {
|
|
@@ -2403,9 +2412,14 @@ model Cluster {
|
|
|
2403
2412
|
updatedAt DateTime @updatedAt
|
|
2404
2413
|
deletedAt DateTime?
|
|
2405
2414
|
|
|
2406
|
-
projectPhase
|
|
2407
|
-
|
|
2408
|
-
|
|
2415
|
+
projectPhase ClusterProjectPhase @default(Survey)
|
|
2416
|
+
surveyProjectStatus String @default("Pending")
|
|
2417
|
+
designProjectStatus String @default("Pending")
|
|
2418
|
+
constructionProjectStatus String @default("Pending")
|
|
2419
|
+
gisProjectStatus String @default("Pending")
|
|
2420
|
+
dispatchProjectStatus String @default("Pending")
|
|
2421
|
+
namingConvention Json?
|
|
2422
|
+
installationStatus Int? @default(0) //percentage of installation completed
|
|
2409
2423
|
|
|
2410
2424
|
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2411
2425
|
centralOfficeId String?
|
|
@@ -2436,6 +2450,23 @@ model Cluster {
|
|
|
2436
2450
|
integrationUserLocation integrationUserLocation[]
|
|
2437
2451
|
MapElementTemplate MapElementTemplate[]
|
|
2438
2452
|
MapElement MapElement[]
|
|
2453
|
+
ClusterComments ClusterComments[]
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2456
|
+
model ClusterComments {
|
|
2457
|
+
id String @id @unique @default(uuid())
|
|
2458
|
+
no Int @default(autoincrement())
|
|
2459
|
+
|
|
2460
|
+
comment String
|
|
2461
|
+
createdAt DateTime @default(now())
|
|
2462
|
+
updatedAt DateTime @updatedAt
|
|
2463
|
+
deletedAt DateTime?
|
|
2464
|
+
|
|
2465
|
+
user User @relation(fields: [userId], references: [id])
|
|
2466
|
+
userId String
|
|
2467
|
+
|
|
2468
|
+
cluster Cluster @relation(fields: [clusterId], references: [id])
|
|
2469
|
+
clusterId String
|
|
2439
2470
|
}
|
|
2440
2471
|
|
|
2441
2472
|
model CentralOfficeTeam {
|
|
Binary file
|