efiber-prisma-schema 1.12.9 → 1.12.10
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.
|
Binary file
|
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[];
|
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[]
|
|
@@ -1260,13 +1266,14 @@ model problemCategorization {
|
|
|
1260
1266
|
}
|
|
1261
1267
|
|
|
1262
1268
|
model Notifications {
|
|
1263
|
-
id String
|
|
1264
|
-
no Int
|
|
1269
|
+
id String @id @unique @default(uuid())
|
|
1270
|
+
no Int @default(autoincrement())
|
|
1265
1271
|
title String
|
|
1266
1272
|
description String
|
|
1267
|
-
status String
|
|
1268
|
-
|
|
1269
|
-
|
|
1273
|
+
status String @default("unread")
|
|
1274
|
+
platform NotificationPlatform @default(Mobile)
|
|
1275
|
+
createdAt DateTime @default(now())
|
|
1276
|
+
updatedAt DateTime @updatedAt
|
|
1270
1277
|
deletedAt DateTime?
|
|
1271
1278
|
|
|
1272
1279
|
user User @relation(fields: [userId], references: [id])
|
|
@@ -1350,11 +1357,11 @@ model Cable {
|
|
|
1350
1357
|
templateIndex Int?
|
|
1351
1358
|
|
|
1352
1359
|
asBuiltCoordinates Json? //As built coordinates
|
|
1353
|
-
isInstalled
|
|
1354
|
-
installationDate
|
|
1360
|
+
isInstalled Boolean @default(false)
|
|
1361
|
+
installationDate DateTime?
|
|
1355
1362
|
|
|
1356
1363
|
// Reporting mirrors
|
|
1357
|
-
cableLength
|
|
1364
|
+
cableLength Float? //Length of the cable in meters
|
|
1358
1365
|
actualCableLength Float? //Actual length of the cable in meters
|
|
1359
1366
|
|
|
1360
1367
|
createdAt DateTime @default(now())
|
|
@@ -1511,8 +1518,8 @@ model PboFat {
|
|
|
1511
1518
|
templateIndex Int?
|
|
1512
1519
|
|
|
1513
1520
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1514
|
-
isInstalled
|
|
1515
|
-
installationDate
|
|
1521
|
+
isInstalled Boolean @default(false)
|
|
1522
|
+
installationDate DateTime?
|
|
1516
1523
|
|
|
1517
1524
|
// Reporting mirrors
|
|
1518
1525
|
fatMaxCapacity Int? //Maximum capacity of the PBO FAT
|
|
@@ -1597,8 +1604,8 @@ model SpliceClosure {
|
|
|
1597
1604
|
templateIndex Int?
|
|
1598
1605
|
|
|
1599
1606
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1600
|
-
isInstalled
|
|
1601
|
-
installationDate
|
|
1607
|
+
isInstalled Boolean @default(false)
|
|
1608
|
+
installationDate DateTime?
|
|
1602
1609
|
|
|
1603
1610
|
// Reporting mirrors
|
|
1604
1611
|
spliceClosureMaxCapacity Int? //Maximum capacity of the Splice Closure
|
|
@@ -1792,8 +1799,8 @@ model Pole {
|
|
|
1792
1799
|
templateIndex Int?
|
|
1793
1800
|
|
|
1794
1801
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1795
|
-
isInstalled
|
|
1796
|
-
installationDate
|
|
1802
|
+
isInstalled Boolean @default(false)
|
|
1803
|
+
installationDate DateTime?
|
|
1797
1804
|
|
|
1798
1805
|
createdAt DateTime @default(now())
|
|
1799
1806
|
updatedAt DateTime @updatedAt
|
|
@@ -1873,8 +1880,8 @@ model Manhole {
|
|
|
1873
1880
|
templateIndex Int?
|
|
1874
1881
|
|
|
1875
1882
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1876
|
-
isInstalled
|
|
1877
|
-
installationDate
|
|
1883
|
+
isInstalled Boolean @default(false)
|
|
1884
|
+
installationDate DateTime?
|
|
1878
1885
|
|
|
1879
1886
|
createdAt DateTime @default(now())
|
|
1880
1887
|
updatedAt DateTime @updatedAt
|
|
@@ -1954,8 +1961,8 @@ model Loop {
|
|
|
1954
1961
|
templateIndex Int?
|
|
1955
1962
|
|
|
1956
1963
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
1957
|
-
isInstalled
|
|
1958
|
-
installationDate
|
|
1964
|
+
isInstalled Boolean @default(false)
|
|
1965
|
+
installationDate DateTime?
|
|
1959
1966
|
|
|
1960
1967
|
createdAt DateTime @default(now())
|
|
1961
1968
|
updatedAt DateTime @updatedAt
|
|
@@ -2035,8 +2042,8 @@ model FDTSRO {
|
|
|
2035
2042
|
templateIndex Int?
|
|
2036
2043
|
|
|
2037
2044
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
2038
|
-
isInstalled
|
|
2039
|
-
installationDate
|
|
2045
|
+
isInstalled Boolean @default(false)
|
|
2046
|
+
installationDate DateTime?
|
|
2040
2047
|
|
|
2041
2048
|
// Reporting mirrors
|
|
2042
2049
|
fdtsroMaxCapacity Int? //Maximum capacity of the FDTSRO
|
|
@@ -2120,8 +2127,8 @@ model SFU {
|
|
|
2120
2127
|
templateIndex Int?
|
|
2121
2128
|
|
|
2122
2129
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
2123
|
-
isInstalled
|
|
2124
|
-
installationDate
|
|
2130
|
+
isInstalled Boolean @default(false)
|
|
2131
|
+
installationDate DateTime?
|
|
2125
2132
|
|
|
2126
2133
|
createdAt DateTime @default(now())
|
|
2127
2134
|
updatedAt DateTime @updatedAt
|
|
@@ -2202,8 +2209,8 @@ model Building {
|
|
|
2202
2209
|
templateIndex Int?
|
|
2203
2210
|
|
|
2204
2211
|
asBuiltCoordinates Json? //Coordinates when installed
|
|
2205
|
-
isInstalled
|
|
2206
|
-
installationDate
|
|
2212
|
+
isInstalled Boolean @default(false)
|
|
2213
|
+
installationDate DateTime?
|
|
2207
2214
|
|
|
2208
2215
|
// Reporting mirrors
|
|
2209
2216
|
totalFlats Int? //Total number of flats in the building
|
|
@@ -2396,9 +2403,9 @@ model Cluster {
|
|
|
2396
2403
|
updatedAt DateTime @updatedAt
|
|
2397
2404
|
deletedAt DateTime?
|
|
2398
2405
|
|
|
2399
|
-
projectPhase
|
|
2400
|
-
namingConvention
|
|
2401
|
-
installationStatus Int?
|
|
2406
|
+
projectPhase String? @default("In-Progress")
|
|
2407
|
+
namingConvention Json?
|
|
2408
|
+
installationStatus Int? @default(0) //percentage of installation completed
|
|
2402
2409
|
|
|
2403
2410
|
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2404
2411
|
centralOfficeId String?
|
|
@@ -2440,9 +2447,9 @@ model CentralOfficeTeam {
|
|
|
2440
2447
|
updatedAt DateTime @updatedAt
|
|
2441
2448
|
deletedAt DateTime?
|
|
2442
2449
|
|
|
2443
|
-
centralOffice
|
|
2444
|
-
centralOfficeId
|
|
2445
|
-
users
|
|
2450
|
+
centralOffice CentralOffice? @relation(fields: [centralOfficeId], references: [id])
|
|
2451
|
+
centralOfficeId String?
|
|
2452
|
+
users CentralOfficeUser[]
|
|
2446
2453
|
}
|
|
2447
2454
|
|
|
2448
2455
|
model CentralOfficeUser {
|