efiber-prisma-schema 1.12.9 → 1.12.11
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,8 @@
|
|
|
1
|
+
-- CreateEnum
|
|
2
|
+
CREATE TYPE "NotificationPlatform" AS ENUM ('Web', 'Mobile');
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "Notifications" ADD COLUMN "platform" "NotificationPlatform" NOT NULL DEFAULT 'Mobile';
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "User" ADD COLUMN "webNotificationTokens" TEXT[] DEFAULT ARRAY[]::TEXT[];
|
|
@@ -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;
|
package/prisma/schema.prisma
CHANGED
|
@@ -90,6 +90,11 @@ enum CentralOfficeTeamPosition {
|
|
|
90
90
|
Technician
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
enum NotificationPlatform {
|
|
94
|
+
Web
|
|
95
|
+
Mobile
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
model Country {
|
|
94
99
|
id String @id @unique @default(uuid())
|
|
95
100
|
no Int @default(autoincrement())
|
|
@@ -392,23 +397,24 @@ model TeamPlatform {
|
|
|
392
397
|
}
|
|
393
398
|
|
|
394
399
|
model User {
|
|
395
|
-
id
|
|
396
|
-
no
|
|
397
|
-
name
|
|
398
|
-
surname
|
|
399
|
-
email
|
|
400
|
-
mobile
|
|
401
|
-
password
|
|
402
|
-
otp
|
|
403
|
-
passport
|
|
404
|
-
passportFile
|
|
405
|
-
status
|
|
406
|
-
countries
|
|
407
|
-
platforms
|
|
408
|
-
staffId
|
|
409
|
-
deviceId1
|
|
410
|
-
deviceId2
|
|
411
|
-
notificationTokens
|
|
400
|
+
id String @id @unique @default(uuid())
|
|
401
|
+
no Int @default(autoincrement())
|
|
402
|
+
name String
|
|
403
|
+
surname String
|
|
404
|
+
email String @unique
|
|
405
|
+
mobile String
|
|
406
|
+
password String
|
|
407
|
+
otp String?
|
|
408
|
+
passport String? //National Id/ Passport No.
|
|
409
|
+
passportFile String? @db.Text //Upload file for passport
|
|
410
|
+
status String @default("active")
|
|
411
|
+
countries Json? //Manage countrie
|
|
412
|
+
platforms Json? //Platform Access
|
|
413
|
+
staffId String? //Staff ID
|
|
414
|
+
deviceId1 String? //Build ID to limit number of devices
|
|
415
|
+
deviceId2 String? //Build ID to limit number of devices
|
|
416
|
+
notificationTokens String[] @default([])
|
|
417
|
+
webNotificationTokens String[] @default([])
|
|
412
418
|
|
|
413
419
|
platforms_list Platform[]
|
|
414
420
|
managing_countries CamusatCountry[]
|
|
@@ -477,6 +483,7 @@ model User {
|
|
|
477
483
|
MapElementTemplate MapElementTemplate[]
|
|
478
484
|
MapElement MapElement[]
|
|
479
485
|
CentralOfficeUser CentralOfficeUser[]
|
|
486
|
+
ClusterComments ClusterComments[]
|
|
480
487
|
}
|
|
481
488
|
|
|
482
489
|
model MainProject {
|
|
@@ -1260,13 +1267,14 @@ model problemCategorization {
|
|
|
1260
1267
|
}
|
|
1261
1268
|
|
|
1262
1269
|
model Notifications {
|
|
1263
|
-
id String
|
|
1264
|
-
no Int
|
|
1270
|
+
id String @id @unique @default(uuid())
|
|
1271
|
+
no Int @default(autoincrement())
|
|
1265
1272
|
title String
|
|
1266
1273
|
description String
|
|
1267
|
-
status String
|
|
1268
|
-
|
|
1269
|
-
|
|
1274
|
+
status String @default("unread")
|
|
1275
|
+
platform NotificationPlatform @default(Mobile)
|
|
1276
|
+
createdAt DateTime @default(now())
|
|
1277
|
+
updatedAt DateTime @updatedAt
|
|
1270
1278
|
deletedAt DateTime?
|
|
1271
1279
|
|
|
1272
1280
|
user User @relation(fields: [userId], references: [id])
|
|
@@ -1350,11 +1358,11 @@ model Cable {
|
|
|
1350
1358
|
templateIndex Int?
|
|
1351
1359
|
|
|
1352
1360
|
asBuiltCoordinates Json? //As built coordinates
|
|
1353
|
-
isInstalled
|
|
1354
|
-
installationDate
|
|
1361
|
+
isInstalled Boolean @default(false)
|
|
1362
|
+
installationDate DateTime?
|
|
1355
1363
|
|
|
1356
1364
|
// Reporting mirrors
|
|
1357
|
-
cableLength
|
|
1365
|
+
cableLength Float? //Length of the cable in meters
|
|
1358
1366
|
actualCableLength Float? //Actual length of the cable in meters
|
|
1359
1367
|
|
|
1360
1368
|
createdAt DateTime @default(now())
|
|
@@ -1511,8 +1519,8 @@ model PboFat {
|
|
|
1511
1519
|
templateIndex Int?
|
|
1512
1520
|
|
|
1513
1521
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1514
|
-
isInstalled
|
|
1515
|
-
installationDate
|
|
1522
|
+
isInstalled Boolean @default(false)
|
|
1523
|
+
installationDate DateTime?
|
|
1516
1524
|
|
|
1517
1525
|
// Reporting mirrors
|
|
1518
1526
|
fatMaxCapacity Int? //Maximum capacity of the PBO FAT
|
|
@@ -1597,8 +1605,8 @@ model SpliceClosure {
|
|
|
1597
1605
|
templateIndex Int?
|
|
1598
1606
|
|
|
1599
1607
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1600
|
-
isInstalled
|
|
1601
|
-
installationDate
|
|
1608
|
+
isInstalled Boolean @default(false)
|
|
1609
|
+
installationDate DateTime?
|
|
1602
1610
|
|
|
1603
1611
|
// Reporting mirrors
|
|
1604
1612
|
spliceClosureMaxCapacity Int? //Maximum capacity of the Splice Closure
|
|
@@ -1792,8 +1800,8 @@ model Pole {
|
|
|
1792
1800
|
templateIndex Int?
|
|
1793
1801
|
|
|
1794
1802
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1795
|
-
isInstalled
|
|
1796
|
-
installationDate
|
|
1803
|
+
isInstalled Boolean @default(false)
|
|
1804
|
+
installationDate DateTime?
|
|
1797
1805
|
|
|
1798
1806
|
createdAt DateTime @default(now())
|
|
1799
1807
|
updatedAt DateTime @updatedAt
|
|
@@ -1873,8 +1881,8 @@ model Manhole {
|
|
|
1873
1881
|
templateIndex Int?
|
|
1874
1882
|
|
|
1875
1883
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1876
|
-
isInstalled
|
|
1877
|
-
installationDate
|
|
1884
|
+
isInstalled Boolean @default(false)
|
|
1885
|
+
installationDate DateTime?
|
|
1878
1886
|
|
|
1879
1887
|
createdAt DateTime @default(now())
|
|
1880
1888
|
updatedAt DateTime @updatedAt
|
|
@@ -1954,8 +1962,8 @@ model Loop {
|
|
|
1954
1962
|
templateIndex Int?
|
|
1955
1963
|
|
|
1956
1964
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1957
|
-
isInstalled
|
|
1958
|
-
installationDate
|
|
1965
|
+
isInstalled Boolean @default(false)
|
|
1966
|
+
installationDate DateTime?
|
|
1959
1967
|
|
|
1960
1968
|
createdAt DateTime @default(now())
|
|
1961
1969
|
updatedAt DateTime @updatedAt
|
|
@@ -2035,8 +2043,8 @@ model FDTSRO {
|
|
|
2035
2043
|
templateIndex Int?
|
|
2036
2044
|
|
|
2037
2045
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
2038
|
-
isInstalled
|
|
2039
|
-
installationDate
|
|
2046
|
+
isInstalled Boolean @default(false)
|
|
2047
|
+
installationDate DateTime?
|
|
2040
2048
|
|
|
2041
2049
|
// Reporting mirrors
|
|
2042
2050
|
fdtsroMaxCapacity Int? //Maximum capacity of the FDTSRO
|
|
@@ -2120,8 +2128,8 @@ model SFU {
|
|
|
2120
2128
|
templateIndex Int?
|
|
2121
2129
|
|
|
2122
2130
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
2123
|
-
isInstalled
|
|
2124
|
-
installationDate
|
|
2131
|
+
isInstalled Boolean @default(false)
|
|
2132
|
+
installationDate DateTime?
|
|
2125
2133
|
|
|
2126
2134
|
createdAt DateTime @default(now())
|
|
2127
2135
|
updatedAt DateTime @updatedAt
|
|
@@ -2202,8 +2210,8 @@ model Building {
|
|
|
2202
2210
|
templateIndex Int?
|
|
2203
2211
|
|
|
2204
2212
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
2205
|
-
isInstalled
|
|
2206
|
-
installationDate
|
|
2213
|
+
isInstalled Boolean @default(false)
|
|
2214
|
+
installationDate DateTime?
|
|
2207
2215
|
|
|
2208
2216
|
// Reporting mirrors
|
|
2209
2217
|
totalFlats Int? //Total number of flats in the building
|
|
@@ -2396,9 +2404,9 @@ model Cluster {
|
|
|
2396
2404
|
updatedAt DateTime @updatedAt
|
|
2397
2405
|
deletedAt DateTime?
|
|
2398
2406
|
|
|
2399
|
-
projectPhase
|
|
2400
|
-
namingConvention
|
|
2401
|
-
installationStatus Int?
|
|
2407
|
+
projectPhase String? @default("In-Progress")
|
|
2408
|
+
namingConvention Json?
|
|
2409
|
+
installationStatus Int? @default(0) //percentage of installation completed
|
|
2402
2410
|
|
|
2403
2411
|
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2404
2412
|
centralOfficeId String?
|
|
@@ -2429,6 +2437,23 @@ model Cluster {
|
|
|
2429
2437
|
integrationUserLocation integrationUserLocation[]
|
|
2430
2438
|
MapElementTemplate MapElementTemplate[]
|
|
2431
2439
|
MapElement MapElement[]
|
|
2440
|
+
ClusterComments ClusterComments[]
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
model ClusterComments {
|
|
2444
|
+
id String @id @unique @default(uuid())
|
|
2445
|
+
no Int @default(autoincrement())
|
|
2446
|
+
|
|
2447
|
+
comment String
|
|
2448
|
+
createdAt DateTime @default(now())
|
|
2449
|
+
updatedAt DateTime @updatedAt
|
|
2450
|
+
deletedAt DateTime?
|
|
2451
|
+
|
|
2452
|
+
user User @relation(fields: [userId], references: [id])
|
|
2453
|
+
userId String
|
|
2454
|
+
|
|
2455
|
+
cluster Cluster @relation(fields: [clusterId], references: [id])
|
|
2456
|
+
clusterId String
|
|
2432
2457
|
}
|
|
2433
2458
|
|
|
2434
2459
|
model CentralOfficeTeam {
|
|
@@ -2440,9 +2465,9 @@ model CentralOfficeTeam {
|
|
|
2440
2465
|
updatedAt DateTime @updatedAt
|
|
2441
2466
|
deletedAt DateTime?
|
|
2442
2467
|
|
|
2443
|
-
centralOffice
|
|
2444
|
-
centralOfficeId
|
|
2445
|
-
users
|
|
2468
|
+
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2469
|
+
centralOfficeId String?
|
|
2470
|
+
users CentralOfficeUser[]
|
|
2446
2471
|
}
|
|
2447
2472
|
|
|
2448
2473
|
model CentralOfficeUser {
|