procbay-schema 1.0.21 → 1.0.23
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/20250903123528_added_catalogue_table/migration.sql +0 -0
- package/prisma/migrations/20250904071854_alter_item_and_category_table/migration.sql +8 -0
- package/prisma/migrations/20250905122252_alter_fc_enum/migration.sql +5 -0
- package/prisma/schema.prisma +24 -20
- package/src/prisma/edge.js +6 -4
- package/src/prisma/index-browser.js +3 -1
- package/src/prisma/index.d.ts +1099 -307
- package/src/prisma/index.js +6 -4
- package/src/prisma/package.json +1 -1
- package/src/prisma/schema.prisma +24 -20
- 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.23",
|
|
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",
|
|
File without changes
|
|
@@ -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 "item" ADD COLUMN "sub_category_id" INTEGER;
|
|
6
|
+
|
|
7
|
+
-- AddForeignKey
|
|
8
|
+
ALTER TABLE "item" ADD CONSTRAINT "item_sub_category_id_fkey" FOREIGN KEY ("sub_category_id") REFERENCES "categories"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
package/prisma/schema.prisma
CHANGED
|
@@ -238,25 +238,26 @@ model UserDepartment {
|
|
|
238
238
|
|
|
239
239
|
//---------------------------------- CATEGORY MODEL START ----------------------------------
|
|
240
240
|
model Category {
|
|
241
|
-
id
|
|
242
|
-
uuid
|
|
243
|
-
name
|
|
244
|
-
slug
|
|
245
|
-
is_active
|
|
246
|
-
parent_id
|
|
247
|
-
description
|
|
248
|
-
image_url
|
|
249
|
-
created_by
|
|
250
|
-
created_at
|
|
251
|
-
updated_by
|
|
252
|
-
updated_at
|
|
253
|
-
is_deleted
|
|
254
|
-
deleted_by
|
|
255
|
-
deleted_at
|
|
256
|
-
attributes
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
241
|
+
id Int @id @default(autoincrement())
|
|
242
|
+
uuid String? @unique @default(uuid())
|
|
243
|
+
name String? @unique
|
|
244
|
+
slug String?
|
|
245
|
+
is_active Boolean @default(true)
|
|
246
|
+
parent_id Int @default(0)
|
|
247
|
+
description String?
|
|
248
|
+
image_url String?
|
|
249
|
+
created_by Int?
|
|
250
|
+
created_at DateTime @default(now()) @db.Timestamptz(6)
|
|
251
|
+
updated_by Int?
|
|
252
|
+
updated_at DateTime @updatedAt @db.Timestamptz(6)
|
|
253
|
+
is_deleted Boolean @default(false)
|
|
254
|
+
deleted_by Int?
|
|
255
|
+
deleted_at DateTime? @db.Timestamptz(6)
|
|
256
|
+
attributes Attribute[]
|
|
257
|
+
category_uom UomCategory[]
|
|
258
|
+
category_budget CategoryBudget[]
|
|
259
|
+
item_category Item[] @relation("ItemCategory")
|
|
260
|
+
item_sub_category Item[] @relation("ItemSubCategory")
|
|
260
261
|
|
|
261
262
|
@@map("categories")
|
|
262
263
|
}
|
|
@@ -320,7 +321,9 @@ model Item {
|
|
|
320
321
|
is_parent Boolean @default(false)
|
|
321
322
|
parent_id Int? @default(0)
|
|
322
323
|
category_id Int?
|
|
323
|
-
category Category? @relation(fields: [category_id], references: [id])
|
|
324
|
+
category Category? @relation("ItemCategory", fields: [category_id], references: [id])
|
|
325
|
+
sub_category_id Int?
|
|
326
|
+
sub_category Category? @relation("ItemSubCategory", fields: [sub_category_id], references: [id])
|
|
324
327
|
uomId Int?
|
|
325
328
|
uom Uom? @relation(fields: [uomId], references: [id])
|
|
326
329
|
item_code String? @unique
|
|
@@ -2478,6 +2481,7 @@ enum RequestedCatalogueSubmissionStatusEnum {
|
|
|
2478
2481
|
PENDING
|
|
2479
2482
|
PARTIAL
|
|
2480
2483
|
COMPLETED
|
|
2484
|
+
APPROVED
|
|
2481
2485
|
}
|
|
2482
2486
|
|
|
2483
2487
|
model RequestedCatalogue {
|