procbay-schema 1.0.53 → 1.0.55
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 +1 -1
- package/prisma/migrations/20251028073534_added_requestor_id_to_send_backs/migration.sql +8 -0
- package/prisma/migrations/20251028100550_added_send_back_status_in_approval_enum/migration.sql +5 -0
- package/prisma/schema.prisma +14 -10
- package/src/prisma/edge.js +6 -4
- package/src/prisma/index-browser.js +3 -1
- package/src/prisma/index.d.ts +823 -165
- package/src/prisma/index.js +6 -4
- package/src/prisma/package.json +1 -1
- package/src/prisma/schema.prisma +14 -10
- package/src/prisma/wasm.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "procbay-schema",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"description": "A set of utilities for managing Prisma database schemas, seeding, and maintenance operations for the Procure-to-Pay system",
|
|
5
5
|
"main": "src/prisma/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- AlterTable
|
|
2
|
+
ALTER TABLE "export_logs" ALTER COLUMN "expires_at" SET DEFAULT NOW() + INTERVAL '7 days';
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "send_backs" ADD COLUMN "send_back_requestor_id" INTEGER;
|
|
6
|
+
|
|
7
|
+
-- AddForeignKey
|
|
8
|
+
ALTER TABLE "send_backs" ADD CONSTRAINT "send_backs_send_back_requestor_id_fkey" FOREIGN KEY ("send_back_requestor_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -99,7 +99,8 @@ model User {
|
|
|
99
99
|
budget_manager Department[] @relation("budget_manager")
|
|
100
100
|
vendor_reference VendorReference[]
|
|
101
101
|
catalogue_cart CatalogueCart[]
|
|
102
|
-
|
|
102
|
+
send_back_approvers SendBack[] @relation("send_back_approver")
|
|
103
|
+
send_back_requestors SendBack[] @relation("send_back_requestor")
|
|
103
104
|
|
|
104
105
|
@@map("users")
|
|
105
106
|
}
|
|
@@ -518,6 +519,7 @@ enum SendBackApproverStatusEnum {
|
|
|
518
519
|
ACCEPTED
|
|
519
520
|
COUNTERED
|
|
520
521
|
REJECTED
|
|
522
|
+
SEND_BACK
|
|
521
523
|
}
|
|
522
524
|
|
|
523
525
|
model PurchaseIntakeItem {
|
|
@@ -551,15 +553,17 @@ model PurchaseIntakeItem {
|
|
|
551
553
|
//---------------------------------- SEND BACK MODEL END ---------------------------------------
|
|
552
554
|
|
|
553
555
|
model SendBack {
|
|
554
|
-
id
|
|
555
|
-
uuid
|
|
556
|
-
purchase_intake_id
|
|
557
|
-
purchase_intake
|
|
558
|
-
item_json
|
|
559
|
-
send_back_reason
|
|
560
|
-
send_back_approver_id
|
|
561
|
-
send_back_approver
|
|
562
|
-
|
|
556
|
+
id Int @id @default(autoincrement())
|
|
557
|
+
uuid String? @unique @default(uuid())
|
|
558
|
+
purchase_intake_id Int?
|
|
559
|
+
purchase_intake PurchaseIntake? @relation(fields: [purchase_intake_id], references: [id], onDelete: Cascade)
|
|
560
|
+
item_json Json? @db.JsonB
|
|
561
|
+
send_back_reason String?
|
|
562
|
+
send_back_approver_id Int?
|
|
563
|
+
send_back_approver User? @relation("send_back_approver", fields: [send_back_approver_id], references: [id], onDelete: Cascade)
|
|
564
|
+
send_back_requestor_id Int?
|
|
565
|
+
send_back_requestor User? @relation("send_back_requestor", fields: [send_back_requestor_id], references: [id], onDelete: Cascade)
|
|
566
|
+
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
563
567
|
|
|
564
568
|
@@map("send_backs")
|
|
565
569
|
}
|