procbay-schema 1.0.83 → 1.0.86

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "prisma-client-e2e325b6fa502178b559a684c046c7b507b30b73166f617eaa5e43fd16396a56",
2
+ "name": "prisma-client-b582871801a99733eeaf1b17a972a1a6ef47723bb7bd3e3ae8f398ae8d477947",
3
3
  "main": "index.js",
4
4
  "types": "index.d.ts",
5
5
  "browser": "index-browser.js",
@@ -108,6 +108,8 @@ model User {
108
108
  send_back_approvers SendBack[] @relation("send_back_approver")
109
109
  send_back_requestors SendBack[] @relation("send_back_requestor")
110
110
  user_login_activities UserLoginActivity[]
111
+ rfi_reviewer RfiSubmission[] @relation("rfi_reviewer")
112
+ rfi_action_by RfiSubmissionLog[] @relation("rfi_action_by")
111
113
 
112
114
  @@map("users")
113
115
  }
@@ -1156,6 +1158,7 @@ model Event {
1156
1158
  bid_logs BidLog[]
1157
1159
  quotations Quotation[]
1158
1160
  quotation_logs QuotationLog[]
1161
+ rfi_submissions RfiSubmission[]
1159
1162
  purchase_order PurchaseOrder[]
1160
1163
 
1161
1164
  @@map("events")
@@ -1244,6 +1247,7 @@ model EventVendors {
1244
1247
  bid_logs BidLog[]
1245
1248
  quotations Quotation[]
1246
1249
  quotation_logs QuotationLog[]
1250
+ rfi_submissions RfiSubmission[]
1247
1251
  purchase_order PurchaseOrder[]
1248
1252
 
1249
1253
  @@index([event_id, vendor_id])
@@ -2731,3 +2735,81 @@ model CatalogueCart {
2731
2735
  }
2732
2736
 
2733
2737
  //---------------------------------- CATALOGUE CART MODEL END ---------------------------------------
2738
+
2739
+ //---------------------------------- RFI SUBMISSION MODEL START ---------------------------------------
2740
+ enum RfiSubmissionStatus {
2741
+ PENDING
2742
+ SUBMITTED
2743
+ APPROVED
2744
+ REJECTED
2745
+ }
2746
+
2747
+ // Stores vendor RFI form submissions for RFI type events
2748
+ model RfiSubmission {
2749
+ id Int @id @default(autoincrement())
2750
+ uuid String? @unique @default(uuid())
2751
+ event_id Int?
2752
+ event Event? @relation(fields: [event_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2753
+ event_vendor_id Int?
2754
+ event_vendor EventVendors? @relation(fields: [event_vendor_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
2755
+ rfi_form Json? @db.JsonB
2756
+ rfi_form_response Json? @db.JsonB
2757
+ status RfiSubmissionStatus @default(PENDING)
2758
+ submission_date DateTime? @db.Timestamptz(6)
2759
+ reviewed_at DateTime? @db.Timestamptz(6)
2760
+ reviewed_by Int?
2761
+ reviewer User? @relation("rfi_reviewer", fields: [reviewed_by], references: [id], onDelete: SetNull)
2762
+ review_comments String?
2763
+ rejection_reason String?
2764
+ revision_notes String?
2765
+ rating Int?
2766
+ revision_count Int @default(0)
2767
+ version Int @default(1)
2768
+ attachments Json? @db.JsonB
2769
+ is_deleted Boolean @default(false)
2770
+ created_at DateTime @default(now()) @db.Timestamptz(6)
2771
+ created_by Int?
2772
+ updated_at DateTime @updatedAt @db.Timestamptz(6)
2773
+ updated_by Int?
2774
+ deleted_at DateTime? @db.Timestamptz(6)
2775
+ deleted_by Int?
2776
+
2777
+ rfi_submission_logs RfiSubmissionLog[]
2778
+
2779
+ @@unique([event_id, event_vendor_id], name: "unique_event_vendor_rfi")
2780
+ @@index([event_id])
2781
+ @@index([event_vendor_id])
2782
+ @@index([status])
2783
+ @@index([submission_date])
2784
+ @@map("rfi_submissions")
2785
+ }
2786
+
2787
+ //---------------------------------- RFI SUBMISSION MODEL END ---------------------------------------
2788
+
2789
+ //---------------------------------- RFI SUBMISSION LOG MODEL START ---------------------------------------
2790
+ // Audit log for RFI submissions - tracks complete history of all status changes and actions
2791
+ model RfiSubmissionLog {
2792
+ id Int @id @default(autoincrement())
2793
+ uuid String? @unique @default(uuid())
2794
+ rfi_submission_id Int?
2795
+ rfi_submission RfiSubmission? @relation(fields: [rfi_submission_id], references: [id], onDelete: Cascade)
2796
+ event_id Int?
2797
+ event_vendor_id Int?
2798
+ previous_status RfiSubmissionStatus?
2799
+ new_status RfiSubmissionStatus
2800
+ action String?
2801
+ action_by Int?
2802
+ action_by_user User? @relation("rfi_action_by", fields: [action_by], references: [id], onDelete: SetNull)
2803
+ comments String?
2804
+ rating Int?
2805
+ version Int @default(1)
2806
+ created_at DateTime @default(now()) @db.Timestamptz(6)
2807
+
2808
+ @@index([rfi_submission_id])
2809
+ @@index([event_id])
2810
+ @@index([event_vendor_id])
2811
+ @@index([created_at])
2812
+ @@map("rfi_submission_logs")
2813
+ }
2814
+
2815
+ //---------------------------------- RFI SUBMISSION LOG MODEL END ---------------------------------------
@@ -1663,6 +1663,49 @@ exports.Prisma.CatalogueCartScalarFieldEnum = {
1663
1663
  deleted_by: 'deleted_by'
1664
1664
  };
1665
1665
 
1666
+ exports.Prisma.RfiSubmissionScalarFieldEnum = {
1667
+ id: 'id',
1668
+ uuid: 'uuid',
1669
+ event_id: 'event_id',
1670
+ event_vendor_id: 'event_vendor_id',
1671
+ rfi_form: 'rfi_form',
1672
+ rfi_form_response: 'rfi_form_response',
1673
+ status: 'status',
1674
+ submission_date: 'submission_date',
1675
+ reviewed_at: 'reviewed_at',
1676
+ reviewed_by: 'reviewed_by',
1677
+ review_comments: 'review_comments',
1678
+ rejection_reason: 'rejection_reason',
1679
+ revision_notes: 'revision_notes',
1680
+ rating: 'rating',
1681
+ revision_count: 'revision_count',
1682
+ version: 'version',
1683
+ attachments: 'attachments',
1684
+ is_deleted: 'is_deleted',
1685
+ created_at: 'created_at',
1686
+ created_by: 'created_by',
1687
+ updated_at: 'updated_at',
1688
+ updated_by: 'updated_by',
1689
+ deleted_at: 'deleted_at',
1690
+ deleted_by: 'deleted_by'
1691
+ };
1692
+
1693
+ exports.Prisma.RfiSubmissionLogScalarFieldEnum = {
1694
+ id: 'id',
1695
+ uuid: 'uuid',
1696
+ rfi_submission_id: 'rfi_submission_id',
1697
+ event_id: 'event_id',
1698
+ event_vendor_id: 'event_vendor_id',
1699
+ previous_status: 'previous_status',
1700
+ new_status: 'new_status',
1701
+ action: 'action',
1702
+ action_by: 'action_by',
1703
+ comments: 'comments',
1704
+ rating: 'rating',
1705
+ version: 'version',
1706
+ created_at: 'created_at'
1707
+ };
1708
+
1666
1709
  exports.Prisma.SortOrder = {
1667
1710
  asc: 'asc',
1668
1711
  desc: 'desc'
@@ -2022,6 +2065,13 @@ exports.CatalogueVendorStatusEnum = exports.$Enums.CatalogueVendorStatusEnum = {
2022
2065
  INACTIVE: 'INACTIVE'
2023
2066
  };
2024
2067
 
2068
+ exports.RfiSubmissionStatus = exports.$Enums.RfiSubmissionStatus = {
2069
+ PENDING: 'PENDING',
2070
+ SUBMITTED: 'SUBMITTED',
2071
+ APPROVED: 'APPROVED',
2072
+ REJECTED: 'REJECTED'
2073
+ };
2074
+
2025
2075
  exports.Prisma.ModelName = {
2026
2076
  SerialNumberConfiguration: 'SerialNumberConfiguration',
2027
2077
  User: 'User',
@@ -2109,7 +2159,9 @@ exports.Prisma.ModelName = {
2109
2159
  RequestedCatalogueDetails: 'RequestedCatalogueDetails',
2110
2160
  Catalogue: 'Catalogue',
2111
2161
  CatalogueVendor: 'CatalogueVendor',
2112
- CatalogueCart: 'CatalogueCart'
2162
+ CatalogueCart: 'CatalogueCart',
2163
+ RfiSubmission: 'RfiSubmission',
2164
+ RfiSubmissionLog: 'RfiSubmissionLog'
2113
2165
  };
2114
2166
 
2115
2167
  /**