efiber-prisma-schema 1.10.8 → 1.10.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efiber-prisma-schema",
3
- "version": "1.10.8",
3
+ "version": "1.10.10",
4
4
  "description": "Database schema for eFiber",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "homepage": "https://github.com/ubuniworks-projects/efiber-prisma-schema#readme",
20
20
  "devDependencies": {
21
- "@prisma/client": "^6.3.1",
22
- "prisma": "^6.3.1"
21
+ "@prisma/client": "^6.5.0",
22
+ "prisma": "^6.5.0"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "@prisma/client": ">=5"
@@ -0,0 +1,8 @@
1
+ -- DropIndex
2
+ DROP INDEX "CentralOffice_name_key";
3
+
4
+ -- DropIndex
5
+ DROP INDEX "Cluster_name_key";
6
+
7
+ -- DropIndex
8
+ DROP INDEX "qrCodeTemplate_prefix_key";
@@ -0,0 +1,18 @@
1
+ -- CreateTable
2
+ CREATE TABLE "WorkOrderPauses" (
3
+ "id" TEXT NOT NULL,
4
+ "no" SERIAL NOT NULL,
5
+ "pauseStartAt" TIMESTAMP(3) NOT NULL,
6
+ "pauseEndAt" TIMESTAMP(3) NOT NULL,
7
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
8
+ "updatedAt" TIMESTAMP(3) NOT NULL,
9
+ "workOrderId" TEXT NOT NULL,
10
+
11
+ CONSTRAINT "WorkOrderPauses_pkey" PRIMARY KEY ("id")
12
+ );
13
+
14
+ -- CreateIndex
15
+ CREATE UNIQUE INDEX "WorkOrderPauses_id_key" ON "WorkOrderPauses"("id");
16
+
17
+ -- AddForeignKey
18
+ ALTER TABLE "WorkOrderPauses" ADD CONSTRAINT "WorkOrderPauses_workOrderId_fkey" FOREIGN KEY ("workOrderId") REFERENCES "WorkOrder"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -767,6 +767,7 @@ model WorkOrder {
767
767
  sFUId String?
768
768
  Building Building? @relation(fields: [buildingId], references: [id])
769
769
  buildingId String?
770
+ WorkOrderPauses WorkOrderPauses[]
770
771
  }
771
772
 
772
773
  model WorkOrderChannel {
@@ -871,6 +872,20 @@ model WorkOrderTaskData {
871
872
  // workOrderTaskId String
872
873
  }
873
874
 
875
+ model WorkOrderPauses {
876
+ id String @id @unique @default(uuid())
877
+ no Int @default(autoincrement())
878
+
879
+ pauseStartAt DateTime
880
+ pauseEndAt DateTime
881
+
882
+ createdAt DateTime @default(now())
883
+ updatedAt DateTime @updatedAt
884
+
885
+ workOrder WorkOrder @relation(fields: [workOrderId], references: [id])
886
+ workOrderId String
887
+ }
888
+
874
889
  // Houses the materials of a project
875
890
  model BillOfMaterial {
876
891
  id String @id @unique @default(uuid())
@@ -2105,7 +2120,7 @@ model NetworkElementInstallation {
2105
2120
  model CentralOffice {
2106
2121
  id String @id @unique @default(uuid())
2107
2122
  no Int @default(autoincrement())
2108
- name String @unique
2123
+ name String
2109
2124
 
2110
2125
  createdAt DateTime @default(now())
2111
2126
  updatedAt DateTime @updatedAt
@@ -2121,7 +2136,7 @@ model CentralOffice {
2121
2136
  model Cluster {
2122
2137
  id String @id @unique @default(uuid())
2123
2138
  no Int @default(autoincrement())
2124
- name String @unique
2139
+ name String
2125
2140
  coordinates Json?
2126
2141
  color String?
2127
2142
 
@@ -2165,7 +2180,7 @@ model qrCodeTemplate {
2165
2180
  id String @id @unique @default(uuid())
2166
2181
  no Int @default(autoincrement())
2167
2182
  name String
2168
- prefix String @unique
2183
+ prefix String
2169
2184
  index Int //number of qr code generated
2170
2185
  scanned Int @default(0)
2171
2186
  link String? @unique //where the qr code will redirect to