procbay-schema 1.0.0

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.
Files changed (280) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +189 -0
  3. package/package.json +77 -0
  4. package/prisma/.env +13 -0
  5. package/prisma/migrations/20250116142512_init_user_table/migration.sql +38 -0
  6. package/prisma/migrations/20250116142709_init_role_table/migration.sql +20 -0
  7. package/prisma/migrations/20250116143847_init_user_role_table/migration.sql +20 -0
  8. package/prisma/migrations/20250116144035_init_permission_table/migration.sql +21 -0
  9. package/prisma/migrations/20250116144140_init_role_permission_table/migration.sql +21 -0
  10. package/prisma/migrations/20250116144233_init_department_table/migration.sql +20 -0
  11. package/prisma/migrations/20250116144345_init_user_department_table/migration.sql +20 -0
  12. package/prisma/migrations/20250116152941_init_serial_number_table/migration.sql +17 -0
  13. package/prisma/migrations/20250116153048_init_category_table/migration.sql +22 -0
  14. package/prisma/migrations/20250116153415_init_attributes_table/migration.sql +28 -0
  15. package/prisma/migrations/20250116153628_init_attribute_values_table/migration.sql +27 -0
  16. package/prisma/migrations/20250116153900_init_purchase_intake_table/migration.sql +32 -0
  17. package/prisma/migrations/20250116154038_init_purchase_intake_item_table/migration.sql +15 -0
  18. package/prisma/migrations/20250120090355_added_reset_token_column_in_user_table/migration.sql +10 -0
  19. package/prisma/migrations/20250120100616_init_item_table/migration.sql +42 -0
  20. package/prisma/migrations/20250120123720_init_vendor_table/migration.sql +39 -0
  21. package/prisma/migrations/20250120124526_init_vendor_categories_table/migration.sql +20 -0
  22. package/prisma/migrations/20250122114935_added_email_template_and_smtp_config_table/migration.sql +41 -0
  23. package/prisma/migrations/20250123095637_chnages_in_vendr_table/migration.sql +3 -0
  24. package/prisma/migrations/20250123103705_added_delated_filed_in_email_template_table/migration.sql +4 -0
  25. package/prisma/migrations/20250123103810_added_delated_filed_in_smtp_config_table/migration.sql +13 -0
  26. package/prisma/migrations/20250127123900_create_approval_heirarchy_table/migration.sql +72 -0
  27. package/prisma/migrations/20250128054523_make_optional_role_and_user_in_approval_hierachy/migration.sql +3 -0
  28. package/prisma/migrations/20250129084223_item_table_chnages/migration.sql +151 -0
  29. package/prisma/migrations/20250130115331_chnages_in_item_table/migration.sql +9 -0
  30. package/prisma/migrations/20250131054132_added_approval_journey_table/migration.sql +22 -0
  31. package/prisma/migrations/20250131064653_added_default_for_product_id_in_item_table/migration.sql +2 -0
  32. package/prisma/migrations/20250204101253_chnages_in_approval_table/migration.sql +39 -0
  33. package/prisma/migrations/20250206091422_added_item_document_table/migration.sql +17 -0
  34. package/prisma/migrations/20250207113110_added_new_column_media/migration.sql +9 -0
  35. package/prisma/migrations/20250207125224_added_chnages_in_pr_table/migration.sql +12 -0
  36. package/prisma/migrations/20250212092048_vendor_contact_table/migration.sql +30 -0
  37. package/prisma/migrations/20250212133620_added_tamplate_master_table/migration.sql +43 -0
  38. package/prisma/migrations/20250213111908_created_faq_catgory_and_faq_table/migration.sql +58 -0
  39. package/prisma/migrations/20250214065142_chnages_in_uom_table/migration.sql +50 -0
  40. package/prisma/migrations/20250217061122_corrected_email_teamplate_table/migration.sql +11 -0
  41. package/prisma/migrations/20250218073530_init_events/migration.sql +120 -0
  42. package/prisma/migrations/20250218092119_corrected_table_name/migration.sql +37 -0
  43. package/prisma/migrations/20250218120935_chnages_in_event_table/migration.sql +5 -0
  44. package/prisma/migrations/20250219083326_added_new_table_for_event_startegy/migration.sql +60 -0
  45. package/prisma/migrations/20250219083416_added_cms_table/migration.sql +29 -0
  46. package/prisma/migrations/20250219092918_alter_event_table/migration.sql +5 -0
  47. package/prisma/migrations/20250219093046_alter_event_to_draft/migration.sql +2 -0
  48. package/prisma/migrations/20250220080337_altered_event_table/migration.sql +9 -0
  49. package/prisma/migrations/20250221105922_added_unique_to_email_in_user_table/migration.sql +8 -0
  50. package/prisma/migrations/20250225063838_created_vendor_kyc_table/migration.sql +23 -0
  51. package/prisma/migrations/20250227060646_template_field_types_added_enum/migration.sql +14 -0
  52. package/prisma/migrations/20250227110306_updated_event_items_and_event_vendor_table/migration.sql +7 -0
  53. package/prisma/migrations/20250228060440_added_country_code_in_vendor_contact_person/migration.sql +2 -0
  54. package/prisma/migrations/20250228095319_init_currencies_table/migration.sql +23 -0
  55. package/prisma/migrations/20250303082614_added_support_ticket_table/migration.sql +89 -0
  56. package/prisma/migrations/20250304050248_alter_support_ticket_relations/migration.sql +35 -0
  57. package/prisma/migrations/20250304050613_alter_support_ticket_realtions/migration.sql +36 -0
  58. package/prisma/migrations/20250304061954_init_support_category_table/migration.sql +261 -0
  59. package/prisma/migrations/20250304092346_alter_event_vendor_table/migration.sql +2 -0
  60. package/prisma/migrations/20250305065430_alter_vendor_kyc_table/migration.sql +2 -0
  61. package/prisma/migrations/20250305111735_alter_vendor_and_user_table/migration.sql +5 -0
  62. package/prisma/migrations/20250307033751_alter_token_version_in_user_and_vendor_token/migration.sql +5 -0
  63. package/prisma/migrations/20250307034907_alter_user_and_vendor_table/migration.sql +14 -0
  64. package/prisma/migrations/20250307064359_chnages_in_approval_herarcy_table/migration.sql +2 -0
  65. package/prisma/migrations/20250307105352_alter_itme_and_vendorkyc_table/migration.sql +21 -0
  66. package/prisma/migrations/20250310103914_init_vendor_status_table/migration.sql +21 -0
  67. package/prisma/migrations/20250310105209_alter_vendor_status_table/migration.sql +18 -0
  68. package/prisma/migrations/20250310105413_init_vendor_kyc_status_table/migration.sql +23 -0
  69. package/prisma/migrations/20250311090552_alter_vendor_kyc_status_table/migration.sql +2 -0
  70. package/prisma/migrations/20250312055258_alter_status_column_in_event_vendors/migration.sql +12 -0
  71. package/prisma/migrations/20250312072145_init_vendor_event_watchlist_table/migration.sql +26 -0
  72. package/prisma/migrations/20250312083842_alter_vendor_event_watchlisst_table/migration.sql +41 -0
  73. package/prisma/migrations/20250312134730_added_chnages_in_kyc_table/migration.sql +19 -0
  74. package/prisma/migrations/20250317040841_init_admin_and_vendor_tables/migration.sql +38 -0
  75. package/prisma/migrations/20250317044110_alter_event_vendor_table/migration.sql +2 -0
  76. package/prisma/migrations/20250317071807_alter_rejected_reason_in_approval_journey_and_purchase_intak_table/migration.sql +5 -0
  77. package/prisma/migrations/20250318085504_init_customer_notification_table/migration.sql +31 -0
  78. package/prisma/migrations/20250318085856_alter_purchase_intake_table/migration.sql +18 -0
  79. package/prisma/migrations/20250319085159_alter_purchase_intake_table/migration.sql +12 -0
  80. package/prisma/migrations/20250320093356_init_bid_and_bidlog_table/migration.sql +75 -0
  81. package/prisma/migrations/20250320095501_alter_email_template_table/migration.sql +2 -0
  82. package/prisma/migrations/20250321053926_alter_approval_journey_table/migration.sql +2 -0
  83. package/prisma/migrations/20250324040851_alter_bidlog_table/migration.sql +2 -0
  84. package/prisma/migrations/20250324091328_init_form_master_and_dynamic_form_table/migration.sql +53 -0
  85. package/prisma/migrations/20250324103742_alter_bidlog_table/migration.sql +5 -0
  86. package/prisma/migrations/20250325052714_alter_form_master_table/migration.sql +27 -0
  87. package/prisma/migrations/20250327011625_init_module_and_tenant_configuration_table/migration.sql +39 -0
  88. package/prisma/migrations/20250403054008_alter_purchase_intake_table/migration.sql +5 -0
  89. package/prisma/migrations/20250404115613_init_approval_level_user/migration.sql +98 -0
  90. package/prisma/migrations/20250410060521_alter_approval_journey_enums/migration.sql +12 -0
  91. package/prisma/migrations/20250410110823_alter_purchase_intake/migration.sql +2 -0
  92. package/prisma/migrations/20250411062955_alter_template_field_table/migration.sql +2 -0
  93. package/prisma/migrations/20250414065640_alter_template/migration.sql +2 -0
  94. package/prisma/migrations/20250414111856_alter_event_vendors/migration.sql +2 -0
  95. package/prisma/migrations/20250414125356_alter_event_vendor/migration.sql +9 -0
  96. package/prisma/migrations/20250415063558_alter_alert_type_enum/migration.sql +2 -0
  97. package/prisma/migrations/20250416062508_alter_purchase_intake_table/migration.sql +15 -0
  98. package/prisma/migrations/20250417090325_alter_purchase_intake_table_updated_enum/migration.sql +13 -0
  99. package/prisma/migrations/20250417111024_alter_purchase_intake_and_purchase_intake_item/migration.sql +16 -0
  100. package/prisma/migrations/20250421061732_init_quotation_and_quotation_log_tables/migration.sql +96 -0
  101. package/prisma/migrations/20250421112331_alter_item_table_added_unique_to_slug/migration.sql +8 -0
  102. package/prisma/migrations/20250422060655_init_user_activity_table/migration.sql +17 -0
  103. package/prisma/migrations/20250423053027_/migration.sql +9 -0
  104. package/prisma/migrations/20250423103233_alter_user_login_activity_table/migration.sql +5 -0
  105. package/prisma/migrations/20250423111141_init_location_tables/migration.sql +141 -0
  106. package/prisma/migrations/20250424120106_alter_event_table_added_user_relation/migration.sql +2 -0
  107. package/prisma/migrations/20250424141637_alter_states_table/migration.sql +11 -0
  108. package/prisma/migrations/20250425105131_alter_user_login_activity_table/migration.sql +9 -0
  109. package/prisma/migrations/20250428092626_alter_location_tables/migration.sql +34 -0
  110. package/prisma/migrations/20250428114301_alter_location_table/migration.sql +14 -0
  111. package/prisma/migrations/20250429103436_alter_event_vendor_table/migration.sql +14 -0
  112. package/prisma/migrations/20250429135621_alter_event_vendor_table/migration.sql +5 -0
  113. package/prisma/migrations/20250430094809_alter_form_master_table_added_user_relation/migration.sql +2 -0
  114. package/prisma/migrations/20250430103440_alter_event_table/migration.sql +3 -0
  115. package/prisma/migrations/20250501125411_alter_strategies_table/migration.sql +2 -0
  116. package/prisma/migrations/20250502065554_init_location_table/migration.sql +41 -0
  117. package/prisma/migrations/20250505104038_alter_bid_quotation_and_dynamic_form/migration.sql +22 -0
  118. package/prisma/migrations/20250505105253_alter_quotation/migration.sql +5 -0
  119. package/prisma/migrations/20250505124851_alter_alert_enum/migration.sql +56 -0
  120. package/prisma/migrations/20250505133250_init_sub_module_table/migration.sql +17 -0
  121. package/prisma/migrations/20250506054325_alter_event_vendor_bid_status/migration.sql +14 -0
  122. package/prisma/migrations/20250506102135_init_counter_offer_table/migration.sql +38 -0
  123. package/prisma/migrations/20250506103355_alter_bid_and_quotaion_table/migration.sql +5 -0
  124. package/prisma/migrations/20250506110309_alter_tenant_configuration_table/migration.sql +3 -0
  125. package/prisma/migrations/20250506123527_alter_vendor_kyu_infor_verification_status/migration.sql +2 -0
  126. package/prisma/migrations/20250507055536_alter_dynamic_form_table/migration.sql +2 -0
  127. package/prisma/migrations/20250507070518_alter_bid_log_and_quotation_log/migration.sql +15 -0
  128. package/prisma/migrations/20250507130834_alter_bid_status/migration.sql +10 -0
  129. package/prisma/migrations/20250508065503_alter_purchase_intake_item_table/migration.sql +16 -0
  130. package/prisma/migrations/20250508130119_alter_purchase_intake_item/migration.sql +13 -0
  131. package/prisma/migrations/20250512082244_altered_template_table_to_add_currency_id/migration.sql +12 -0
  132. package/prisma/migrations/20250512100817_alter_approval_journey_table/migration.sql +3 -0
  133. package/prisma/migrations/20250513083700_alter_item_table/migration.sql +2 -0
  134. package/prisma/migrations/20250514100915_alter_event_table_added_template_realtion/migration.sql +2 -0
  135. package/prisma/migrations/20250514103503_alter_vendor_table_added_is_kyc_approved_column/migration.sql +2 -0
  136. package/prisma/migrations/20250520131556_init_purchase_order_table/migration.sql +52 -0
  137. package/prisma/migrations/20250521113946_alter_purchase_order_status_enum/migration.sql +16 -0
  138. package/prisma/migrations/20250522083917_alter_event_vendor_bid_status_enum/migration.sql +17 -0
  139. package/prisma/migrations/20250522131610_updated_vendor_table/migration.sql +16 -0
  140. package/prisma/migrations/20250523051058_alter_vendor_kyc_verificaiton_status_enum/migration.sql +2 -0
  141. package/prisma/migrations/20250526072120_alter_vendor_table/migration.sql +16 -0
  142. package/prisma/migrations/20250527055351_init_purchase_order_activity_log/migration.sql +41 -0
  143. package/prisma/migrations/20250528060657_alter_item_tale/migration.sql +14 -0
  144. package/prisma/migrations/20250528061946_alter_event_item_table/migration.sql +5 -0
  145. package/prisma/migrations/20250528081337_alter_item_table/migration.sql +2 -0
  146. package/prisma/migrations/20250528081524_removed_item_id_from_item_table/migration.sql +11 -0
  147. package/prisma/migrations/20250528081843_alter_item_table/migration.sql +2 -0
  148. package/prisma/migrations/20250528094057_alter_alert_type_enum/migration.sql +11 -0
  149. package/prisma/migrations/20250529053721_alter_added_quantity_in_purchase_order/migration.sql +2 -0
  150. package/prisma/migrations/20250602055114_alter_approval_journey_parent_id_to_string/migration.sql +2 -0
  151. package/prisma/migrations/20250602055748_alter_event_configuration_added_rule_slug/migration.sql +2 -0
  152. package/prisma/migrations/20250602111042_init_user_vendor_socket_token_table/migration.sql +17 -0
  153. package/prisma/migrations/20250602125833_alter_bidlog_and_quoatationlog_tableto_add_json_field/migration.sql +5 -0
  154. package/prisma/migrations/20250603063501_alter_bid_and_quoatation_table/migration.sql +29 -0
  155. package/prisma/migrations/20250606015045_alter_quotation_log_table/migration.sql +2 -0
  156. package/prisma/migrations/20250606020918_alter_quotation_table/migration.sql +2 -0
  157. package/prisma/migrations/20250606022901_alter_quotation_log_table/migration.sql +3 -0
  158. package/prisma/migrations/20250606054914_init_event_activity_logs_table/migration.sql +35 -0
  159. package/prisma/migrations/20250606100634_alter_added_counter_offer_status/migration.sql +5 -0
  160. package/prisma/migrations/20250606100908_alter_counter_offer_table/migration.sql +2 -0
  161. package/prisma/migrations/20250610055710_alter_enum/migration.sql +16 -0
  162. package/prisma/migrations/20250610060558_alter_event_and_event_vendor_db/migration.sql +14 -0
  163. package/prisma/migrations/20250610091013_alter_purchase_intak_item_table/migration.sql +4 -0
  164. package/prisma/migrations/20250610100156_alter_purchase_intake_item_table/migration.sql +19 -0
  165. package/prisma/migrations/20250610125706_alter_event_table/migration.sql +6 -0
  166. package/prisma/migrations/20250610133613_added_timestamp/migration.sql +319 -0
  167. package/prisma/migrations/20250611090439_init_contact_us_table/migration.sql +23 -0
  168. package/prisma/migrations/20250611121005_alter_event_vendor_table/migration.sql +10 -0
  169. package/prisma/migrations/20250612064335_alter_tenant_configuration/migration.sql +3 -0
  170. package/prisma/migrations/20250612094643_alter_event_vendor_bid_status_enum/migration.sql +2 -0
  171. package/prisma/migrations/20250618074558_alter_updated_bid_status_and_quotation_status/migration.sql +21 -0
  172. package/prisma/migrations/20250618122242_alter_added_event_phase_closed/migration.sql +2 -0
  173. package/prisma/migrations/20250620054518_alter_event_phase/migration.sql +2 -0
  174. package/prisma/migrations/20250620062723_alter_event_phase/migration.sql +2 -0
  175. package/prisma/migrations/20250620063056_alter_event_phase/migration.sql +2 -0
  176. package/prisma/migrations/20250620100507_alter_event_phase/migration.sql +2 -0
  177. package/prisma/migrations/20250627104958_alter_counter_offer_status/migration.sql +2 -0
  178. package/prisma/migrations/20250702095923_alter_item_table/migration.sql +74 -0
  179. package/prisma/migrations/20250702120134_/migration.sql +14 -0
  180. package/prisma/migrations/20250702150717_alter_attribute_table/migration.sql +9 -0
  181. package/prisma/migrations/20250703090321_alter_item_table/migration.sql +2 -0
  182. package/prisma/migrations/20250707054625_alter_purchase_order_table/migration.sql +15 -0
  183. package/prisma/migrations/20250707111354_alter_purchase_order_table_and_init_purchase_order_item_table/migration.sql +39 -0
  184. package/prisma/migrations/20250707111522_alter_purchase_order_item_table/migration.sql +17 -0
  185. package/prisma/migrations/20250710054113_alter_bid_and_quotation_status/migration.sql +31 -0
  186. package/prisma/migrations/20250710070813_alter_event_status/migration.sql +2 -0
  187. package/prisma/migrations/20250710082332_alter_bid_and_quotations_table/migration.sql +36 -0
  188. package/prisma/migrations/20250714102325_init_upload_log_table/migration.sql +27 -0
  189. package/prisma/migrations/20250716061012_alter_event_activity_logs_to_activity_logs/migration.sql +48 -0
  190. package/prisma/migrations/20250716071839_init_chat_thread_chat_message_and_ai_models/migration.sql +56 -0
  191. package/prisma/migrations/20250716135548_alter_admin_alerts_enum/migration.sql +2 -0
  192. package/prisma/migrations/20250717100515_init_user_event_configuration/migration.sql +21 -0
  193. package/prisma/migrations/20250717101037_alter_user_event_configuration_table/migration.sql +19 -0
  194. package/prisma/migrations/20250718071630_alter_added_module_in_upload_logs_table/migration.sql +5 -0
  195. package/prisma/migrations/20250718071732_alter_module_enum/migration.sql +15 -0
  196. package/prisma/migrations/20250721054851_init_export_log_table/migration.sql +34 -0
  197. package/prisma/migrations/20250722054549_init_fiscal_year_table/migration.sql +22 -0
  198. package/prisma/migrations/20250722072051_alter_fiscal_year_table_added_uuid/migration.sql +14 -0
  199. package/prisma/migrations/20250722095259_alter_fiscal_table/migration.sql +9 -0
  200. package/prisma/migrations/20250723071050_alter_department_table/migration.sql +14 -0
  201. package/prisma/migrations/20250724071201_alter_export_upload_log_enum/migration.sql +8 -0
  202. package/prisma/migrations/20250725094759_new_migrate/migration.sql +2 -0
  203. package/prisma/migrations/20250725095012_alter_migration/migration.sql +2 -0
  204. package/prisma/migrations/20250728072402_init_budget_management_tables/migration.sql +80 -0
  205. package/prisma/migrations/migration_lock.toml +3 -0
  206. package/prisma/schema.prisma +2609 -0
  207. package/prisma/seeders/approval-hierarchy.seed.js +340 -0
  208. package/prisma/seeders/attribute-value.seed.js +64 -0
  209. package/prisma/seeders/attribute.seed.js +61 -0
  210. package/prisma/seeders/category.seed.js +133 -0
  211. package/prisma/seeders/city.seed.js +147 -0
  212. package/prisma/seeders/country.seed.js +282 -0
  213. package/prisma/seeders/currency.seed.js +41 -0
  214. package/prisma/seeders/customer-notification.seed.js +83 -0
  215. package/prisma/seeders/department.seed.js +38 -0
  216. package/prisma/seeders/docs/CORE_SEEDER_OPTIMIZATIONS.md +270 -0
  217. package/prisma/seeders/docs/GEOGRAPHIC_PERFORMANCE_OPTIMIZATIONS.md +175 -0
  218. package/prisma/seeders/dynamic-form.seed.js +135 -0
  219. package/prisma/seeders/email-template.seed.js +68 -0
  220. package/prisma/seeders/faq-category.seed.js +56 -0
  221. package/prisma/seeders/faq.seed.js +61 -0
  222. package/prisma/seeders/form-master.seed.js +55 -0
  223. package/prisma/seeders/item.seed.js +133 -0
  224. package/prisma/seeders/permission.seed.js +102 -0
  225. package/prisma/seeders/region.seed.js +78 -0
  226. package/prisma/seeders/role-permission.seed.js +70 -0
  227. package/prisma/seeders/role.seed.js +38 -0
  228. package/prisma/seeders/seed.js +553 -0
  229. package/prisma/seeders/serial-number-config.seed.js +58 -0
  230. package/prisma/seeders/smtp-config.seed.js +61 -0
  231. package/prisma/seeders/state.seed.js +170 -0
  232. package/prisma/seeders/strategies.seed.js +54 -0
  233. package/prisma/seeders/subregion.seed.js +88 -0
  234. package/prisma/seeders/support-category.seed.js +56 -0
  235. package/prisma/seeders/template.seed.js +87 -0
  236. package/prisma/seeders/test-core-seeders.js +276 -0
  237. package/prisma/seeders/user-department.seed.js +66 -0
  238. package/prisma/seeders/user-event-configuration.seed.js +47 -0
  239. package/prisma/seeders/user-role.seed.js +74 -0
  240. package/prisma/seeders/user.seed.js +114 -0
  241. package/prisma/seeders/utils/bulk-seeder.js +300 -0
  242. package/prisma/seeders/utils/config.js +103 -0
  243. package/prisma/seeders/utils/connection-manager.js +380 -0
  244. package/prisma/seeders/utils/content-seeder.js +472 -0
  245. package/prisma/seeders/utils/core-seeder.js +330 -0
  246. package/prisma/seeders/utils/json-loader.js +69 -0
  247. package/prisma/seeders/utils/performance-config.js +341 -0
  248. package/prisma/seeders/utils/performance-helpers.js +206 -0
  249. package/prisma/seeders/utils/progress-tracker.js +364 -0
  250. package/prisma/seeders/utils/seeder-config-mapper.js +316 -0
  251. package/scripts/seed-databases.js +873 -0
  252. package/scripts/sync-schemas.js +865 -0
  253. package/scripts/truncate-tables.js +1048 -0
  254. package/src/prisma/client.d.ts +1 -0
  255. package/src/prisma/client.js +4 -0
  256. package/src/prisma/default.d.ts +1 -0
  257. package/src/prisma/default.js +4 -0
  258. package/src/prisma/edge.d.ts +1 -0
  259. package/src/prisma/edge.js +2084 -0
  260. package/src/prisma/index-browser.js +2043 -0
  261. package/src/prisma/index.d.ts +202051 -0
  262. package/src/prisma/index.js +2113 -0
  263. package/src/prisma/libquery_engine-darwin.dylib.node +0 -0
  264. package/src/prisma/libquery_engine-darwin.dylib.node.tmp24628 +0 -0
  265. package/src/prisma/libquery_engine-darwin.dylib.node.tmp29464 +0 -0
  266. package/src/prisma/libquery_engine-debian-openssl-3.0.x.so.node +0 -0
  267. package/src/prisma/package.json +140 -0
  268. package/src/prisma/query_engine-windows.dll.node +0 -0
  269. package/src/prisma/query_engine-windows.dll.node.tmp4144 +0 -0
  270. package/src/prisma/runtime/edge-esm.js +34 -0
  271. package/src/prisma/runtime/edge.js +34 -0
  272. package/src/prisma/runtime/index-browser.d.ts +370 -0
  273. package/src/prisma/runtime/index-browser.js +16 -0
  274. package/src/prisma/runtime/library.d.ts +3647 -0
  275. package/src/prisma/runtime/library.js +146 -0
  276. package/src/prisma/runtime/react-native.js +83 -0
  277. package/src/prisma/runtime/wasm.js +35 -0
  278. package/src/prisma/schema.prisma +2609 -0
  279. package/src/prisma/wasm.d.ts +1 -0
  280. package/src/prisma/wasm.js +2043 -0
@@ -0,0 +1,261 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `category` on the `support_tickets` table. All the data in the column will be lost.
5
+ - A unique constraint covering the columns `[uuid]` on the table `approval_conditions` will be added. If there are existing duplicate values, this will fail.
6
+ - A unique constraint covering the columns `[uuid]` on the table `approval_hierarchy` will be added. If there are existing duplicate values, this will fail.
7
+ - A unique constraint covering the columns `[uuid]` on the table `approval_journey` will be added. If there are existing duplicate values, this will fail.
8
+ - A unique constraint covering the columns `[uuid]` on the table `approval_level_escalations` will be added. If there are existing duplicate values, this will fail.
9
+ - A unique constraint covering the columns `[uuid]` on the table `approval_levels` will be added. If there are existing duplicate values, this will fail.
10
+ - A unique constraint covering the columns `[uuid]` on the table `categories` will be added. If there are existing duplicate values, this will fail.
11
+ - A unique constraint covering the columns `[uuid]` on the table `currencies` will be added. If there are existing duplicate values, this will fail.
12
+ - A unique constraint covering the columns `[uuid]` on the table `departments` will be added. If there are existing duplicate values, this will fail.
13
+ - A unique constraint covering the columns `[uuid]` on the table `event_configurations` will be added. If there are existing duplicate values, this will fail.
14
+ - A unique constraint covering the columns `[uuid]` on the table `event_items` will be added. If there are existing duplicate values, this will fail.
15
+ - A unique constraint covering the columns `[uuid]` on the table `event_strategies` will be added. If there are existing duplicate values, this will fail.
16
+ - A unique constraint covering the columns `[uuid]` on the table `event_vendors` will be added. If there are existing duplicate values, this will fail.
17
+ - A unique constraint covering the columns `[uuid]` on the table `item_attribute_values` will be added. If there are existing duplicate values, this will fail.
18
+ - A unique constraint covering the columns `[uuid]` on the table `item_attributes` will be added. If there are existing duplicate values, this will fail.
19
+ - A unique constraint covering the columns `[uuid]` on the table `item_documents` will be added. If there are existing duplicate values, this will fail.
20
+ - A unique constraint covering the columns `[uuid]` on the table `item_images` will be added. If there are existing duplicate values, this will fail.
21
+ - A unique constraint covering the columns `[uuid]` on the table `purchase_intakes` will be added. If there are existing duplicate values, this will fail.
22
+ - A unique constraint covering the columns `[uuid]` on the table `purchase_intakes_items` will be added. If there are existing duplicate values, this will fail.
23
+ - A unique constraint covering the columns `[uuid]` on the table `strategies` will be added. If there are existing duplicate values, this will fail.
24
+ - A unique constraint covering the columns `[uuid]` on the table `support_tickets` will be added. If there are existing duplicate values, this will fail.
25
+ - A unique constraint covering the columns `[uuid]` on the table `template_fields` will be added. If there are existing duplicate values, this will fail.
26
+ - A unique constraint covering the columns `[uuid]` on the table `templates` will be added. If there are existing duplicate values, this will fail.
27
+ - A unique constraint covering the columns `[uuid]` on the table `ticket_assignments` will be added. If there are existing duplicate values, this will fail.
28
+ - A unique constraint covering the columns `[uuid]` on the table `ticket_history` will be added. If there are existing duplicate values, this will fail.
29
+ - A unique constraint covering the columns `[uuid]` on the table `ticket_replies` will be added. If there are existing duplicate values, this will fail.
30
+ - A unique constraint covering the columns `[uuid]` on the table `uom_categories` will be added. If there are existing duplicate values, this will fail.
31
+ - A unique constraint covering the columns `[uuid]` on the table `user_departments` will be added. If there are existing duplicate values, this will fail.
32
+ - A unique constraint covering the columns `[uuid]` on the table `users` will be added. If there are existing duplicate values, this will fail.
33
+ - A unique constraint covering the columns `[uuid]` on the table `vendor_categories` will be added. If there are existing duplicate values, this will fail.
34
+ - A unique constraint covering the columns `[uuid]` on the table `vendor_contact_persons` will be added. If there are existing duplicate values, this will fail.
35
+ - A unique constraint covering the columns `[uuid]` on the table `vendor_kyc_info` will be added. If there are existing duplicate values, this will fail.
36
+ - A unique constraint covering the columns `[uuid]` on the table `vendors` will be added. If there are existing duplicate values, this will fail.
37
+
38
+ */
39
+ -- AlterTable
40
+ ALTER TABLE "approval_conditions" ADD COLUMN "uuid" TEXT;
41
+
42
+ -- AlterTable
43
+ ALTER TABLE "approval_hierarchy" ADD COLUMN "uuid" TEXT;
44
+
45
+ -- AlterTable
46
+ ALTER TABLE "approval_journey" ADD COLUMN "uuid" TEXT;
47
+
48
+ -- AlterTable
49
+ ALTER TABLE "approval_level_escalations" ADD COLUMN "uuid" TEXT;
50
+
51
+ -- AlterTable
52
+ ALTER TABLE "approval_levels" ADD COLUMN "uuid" TEXT;
53
+
54
+ -- AlterTable
55
+ ALTER TABLE "categories" ADD COLUMN "uuid" TEXT;
56
+
57
+ -- AlterTable
58
+ ALTER TABLE "currencies" ADD COLUMN "uuid" TEXT;
59
+
60
+ -- AlterTable
61
+ ALTER TABLE "departments" ADD COLUMN "uuid" TEXT;
62
+
63
+ -- AlterTable
64
+ ALTER TABLE "event_configurations" ADD COLUMN "uuid" TEXT;
65
+
66
+ -- AlterTable
67
+ ALTER TABLE "event_items" ADD COLUMN "uuid" TEXT;
68
+
69
+ -- AlterTable
70
+ ALTER TABLE "event_strategies" ADD COLUMN "uuid" TEXT;
71
+
72
+ -- AlterTable
73
+ ALTER TABLE "event_vendors" ADD COLUMN "uuid" TEXT;
74
+
75
+ -- AlterTable
76
+ ALTER TABLE "item_attribute_values" ADD COLUMN "uuid" TEXT;
77
+
78
+ -- AlterTable
79
+ ALTER TABLE "item_attributes" ADD COLUMN "uuid" TEXT;
80
+
81
+ -- AlterTable
82
+ ALTER TABLE "item_documents" ADD COLUMN "uuid" TEXT;
83
+
84
+ -- AlterTable
85
+ ALTER TABLE "item_images" ADD COLUMN "uuid" TEXT;
86
+
87
+ -- AlterTable
88
+ ALTER TABLE "purchase_intakes" ADD COLUMN "uuid" TEXT;
89
+
90
+ -- AlterTable
91
+ ALTER TABLE "purchase_intakes_items" ADD COLUMN "uuid" TEXT;
92
+
93
+ -- AlterTable
94
+ ALTER TABLE "strategies" ADD COLUMN "uuid" TEXT;
95
+
96
+ -- AlterTable
97
+ ALTER TABLE "support_tickets" DROP COLUMN "category",
98
+ ADD COLUMN "category_id" INTEGER,
99
+ ADD COLUMN "uuid" TEXT;
100
+
101
+ -- AlterTable
102
+ ALTER TABLE "template_fields" ADD COLUMN "uuid" TEXT;
103
+
104
+ -- AlterTable
105
+ ALTER TABLE "templates" ADD COLUMN "uuid" TEXT;
106
+
107
+ -- AlterTable
108
+ ALTER TABLE "ticket_assignments" ADD COLUMN "uuid" TEXT;
109
+
110
+ -- AlterTable
111
+ ALTER TABLE "ticket_history" ADD COLUMN "uuid" TEXT;
112
+
113
+ -- AlterTable
114
+ ALTER TABLE "ticket_replies" ADD COLUMN "uuid" TEXT;
115
+
116
+ -- AlterTable
117
+ ALTER TABLE "uom_categories" ADD COLUMN "uuid" TEXT;
118
+
119
+ -- AlterTable
120
+ ALTER TABLE "user_departments" ADD COLUMN "uuid" TEXT;
121
+
122
+ -- AlterTable
123
+ ALTER TABLE "users" ADD COLUMN "uuid" TEXT;
124
+
125
+ -- AlterTable
126
+ ALTER TABLE "vendor_categories" ADD COLUMN "uuid" TEXT;
127
+
128
+ -- AlterTable
129
+ ALTER TABLE "vendor_contact_persons" ADD COLUMN "uuid" TEXT;
130
+
131
+ -- AlterTable
132
+ ALTER TABLE "vendor_kyc_info" ADD COLUMN "uuid" TEXT;
133
+
134
+ -- AlterTable
135
+ ALTER TABLE "vendors" ADD COLUMN "uuid" TEXT;
136
+
137
+ -- CreateTable
138
+ CREATE TABLE "support_categories" (
139
+ "id" SERIAL NOT NULL,
140
+ "uuid" TEXT,
141
+ "name" TEXT,
142
+ "parent_id" INTEGER DEFAULT 0,
143
+ "description" TEXT,
144
+ "image_url" TEXT,
145
+ "is_active" BOOLEAN DEFAULT false,
146
+ "slug" TEXT,
147
+ "created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
148
+ "created_by" INTEGER,
149
+ "updated_at" TIMESTAMP(3),
150
+ "updated_by" INTEGER,
151
+ "is_deleted" BOOLEAN DEFAULT false,
152
+ "deleted_at" TIMESTAMP(3),
153
+ "deleted_by" INTEGER,
154
+
155
+ CONSTRAINT "support_categories_pkey" PRIMARY KEY ("id")
156
+ );
157
+
158
+ -- CreateIndex
159
+ CREATE UNIQUE INDEX "support_categories_uuid_key" ON "support_categories"("uuid");
160
+
161
+ -- CreateIndex
162
+ CREATE UNIQUE INDEX "support_categories_name_key" ON "support_categories"("name");
163
+
164
+ -- CreateIndex
165
+ CREATE UNIQUE INDEX "approval_conditions_uuid_key" ON "approval_conditions"("uuid");
166
+
167
+ -- CreateIndex
168
+ CREATE UNIQUE INDEX "approval_hierarchy_uuid_key" ON "approval_hierarchy"("uuid");
169
+
170
+ -- CreateIndex
171
+ CREATE UNIQUE INDEX "approval_journey_uuid_key" ON "approval_journey"("uuid");
172
+
173
+ -- CreateIndex
174
+ CREATE UNIQUE INDEX "approval_level_escalations_uuid_key" ON "approval_level_escalations"("uuid");
175
+
176
+ -- CreateIndex
177
+ CREATE UNIQUE INDEX "approval_levels_uuid_key" ON "approval_levels"("uuid");
178
+
179
+ -- CreateIndex
180
+ CREATE UNIQUE INDEX "categories_uuid_key" ON "categories"("uuid");
181
+
182
+ -- CreateIndex
183
+ CREATE UNIQUE INDEX "currencies_uuid_key" ON "currencies"("uuid");
184
+
185
+ -- CreateIndex
186
+ CREATE UNIQUE INDEX "departments_uuid_key" ON "departments"("uuid");
187
+
188
+ -- CreateIndex
189
+ CREATE UNIQUE INDEX "event_configurations_uuid_key" ON "event_configurations"("uuid");
190
+
191
+ -- CreateIndex
192
+ CREATE UNIQUE INDEX "event_items_uuid_key" ON "event_items"("uuid");
193
+
194
+ -- CreateIndex
195
+ CREATE UNIQUE INDEX "event_strategies_uuid_key" ON "event_strategies"("uuid");
196
+
197
+ -- CreateIndex
198
+ CREATE UNIQUE INDEX "event_vendors_uuid_key" ON "event_vendors"("uuid");
199
+
200
+ -- CreateIndex
201
+ CREATE UNIQUE INDEX "item_attribute_values_uuid_key" ON "item_attribute_values"("uuid");
202
+
203
+ -- CreateIndex
204
+ CREATE UNIQUE INDEX "item_attributes_uuid_key" ON "item_attributes"("uuid");
205
+
206
+ -- CreateIndex
207
+ CREATE UNIQUE INDEX "item_documents_uuid_key" ON "item_documents"("uuid");
208
+
209
+ -- CreateIndex
210
+ CREATE UNIQUE INDEX "item_images_uuid_key" ON "item_images"("uuid");
211
+
212
+ -- CreateIndex
213
+ CREATE UNIQUE INDEX "purchase_intakes_uuid_key" ON "purchase_intakes"("uuid");
214
+
215
+ -- CreateIndex
216
+ CREATE UNIQUE INDEX "purchase_intakes_items_uuid_key" ON "purchase_intakes_items"("uuid");
217
+
218
+ -- CreateIndex
219
+ CREATE UNIQUE INDEX "strategies_uuid_key" ON "strategies"("uuid");
220
+
221
+ -- CreateIndex
222
+ CREATE UNIQUE INDEX "support_tickets_uuid_key" ON "support_tickets"("uuid");
223
+
224
+ -- CreateIndex
225
+ CREATE UNIQUE INDEX "template_fields_uuid_key" ON "template_fields"("uuid");
226
+
227
+ -- CreateIndex
228
+ CREATE UNIQUE INDEX "templates_uuid_key" ON "templates"("uuid");
229
+
230
+ -- CreateIndex
231
+ CREATE UNIQUE INDEX "ticket_assignments_uuid_key" ON "ticket_assignments"("uuid");
232
+
233
+ -- CreateIndex
234
+ CREATE UNIQUE INDEX "ticket_history_uuid_key" ON "ticket_history"("uuid");
235
+
236
+ -- CreateIndex
237
+ CREATE UNIQUE INDEX "ticket_replies_uuid_key" ON "ticket_replies"("uuid");
238
+
239
+ -- CreateIndex
240
+ CREATE UNIQUE INDEX "uom_categories_uuid_key" ON "uom_categories"("uuid");
241
+
242
+ -- CreateIndex
243
+ CREATE UNIQUE INDEX "user_departments_uuid_key" ON "user_departments"("uuid");
244
+
245
+ -- CreateIndex
246
+ CREATE UNIQUE INDEX "users_uuid_key" ON "users"("uuid");
247
+
248
+ -- CreateIndex
249
+ CREATE UNIQUE INDEX "vendor_categories_uuid_key" ON "vendor_categories"("uuid");
250
+
251
+ -- CreateIndex
252
+ CREATE UNIQUE INDEX "vendor_contact_persons_uuid_key" ON "vendor_contact_persons"("uuid");
253
+
254
+ -- CreateIndex
255
+ CREATE UNIQUE INDEX "vendor_kyc_info_uuid_key" ON "vendor_kyc_info"("uuid");
256
+
257
+ -- CreateIndex
258
+ CREATE UNIQUE INDEX "vendors_uuid_key" ON "vendors"("uuid");
259
+
260
+ -- AddForeignKey
261
+ ALTER TABLE "support_tickets" ADD CONSTRAINT "support_tickets_category_id_fkey" FOREIGN KEY ("category_id") REFERENCES "support_categories"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "event_vendors" ADD COLUMN "is_accepted" BOOLEAN DEFAULT false;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "vendor_kyc_info" ADD COLUMN "section_name" TEXT;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "users" ADD COLUMN "access_token_expiry" TEXT;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "vendors" ADD COLUMN "access_token_expiry" TEXT;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "users" ADD COLUMN "tokenVersion" INTEGER DEFAULT 0;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "vendors" ADD COLUMN "tokenVersion" INTEGER DEFAULT 0;
@@ -0,0 +1,14 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `tokenVersion` on the `users` table. All the data in the column will be lost.
5
+ - You are about to drop the column `tokenVersion` on the `vendors` table. All the data in the column will be lost.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "users" DROP COLUMN "tokenVersion",
10
+ ADD COLUMN "token_version" INTEGER DEFAULT 0;
11
+
12
+ -- AlterTable
13
+ ALTER TABLE "vendors" DROP COLUMN "tokenVersion",
14
+ ADD COLUMN "token_version" INTEGER DEFAULT 0;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "approval_hierarchy" ALTER COLUMN "is_active" SET DEFAULT true;
@@ -0,0 +1,21 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `compare_at_price` on the `item` table. All the data in the column will be lost.
5
+ - You are about to drop the column `notes` on the `item` table. All the data in the column will be lost.
6
+ - You are about to drop the column `price` on the `item` table. All the data in the column will be lost.
7
+ - You are about to drop the column `price_per_item` on the `item` table. All the data in the column will be lost.
8
+
9
+ */
10
+ -- CreateEnum
11
+ CREATE TYPE "VendorKycStatusEnum" AS ENUM ('PENDING', 'APPROVED', 'REJECTED');
12
+
13
+ -- AlterTable
14
+ ALTER TABLE "item" DROP COLUMN "compare_at_price",
15
+ DROP COLUMN "notes",
16
+ DROP COLUMN "price",
17
+ DROP COLUMN "price_per_item";
18
+
19
+ -- AlterTable
20
+ ALTER TABLE "vendor_kyc_info" ADD COLUMN "reject_reason" TEXT,
21
+ ADD COLUMN "status" "VendorKycStatusEnum" NOT NULL DEFAULT 'PENDING';
@@ -0,0 +1,21 @@
1
+ -- AlterEnum
2
+ ALTER TYPE "StatusEnum" ADD VALUE 'Suspended';
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "vendor_status" (
6
+ "id" SERIAL NOT NULL,
7
+ "vendor_id" INTEGER NOT NULL,
8
+ "previous_status" "StatusEnum" NOT NULL,
9
+ "current_status" "StatusEnum" NOT NULL,
10
+ "comment" TEXT NOT NULL,
11
+ "updated_at" TIMESTAMP(3),
12
+ "updated_by" INTEGER NOT NULL,
13
+
14
+ CONSTRAINT "vendor_status_pkey" PRIMARY KEY ("id")
15
+ );
16
+
17
+ -- AddForeignKey
18
+ ALTER TABLE "vendor_status" ADD CONSTRAINT "vendor_status_vendor_id_fkey" FOREIGN KEY ("vendor_id") REFERENCES "vendors"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
19
+
20
+ -- AddForeignKey
21
+ ALTER TABLE "vendor_status" ADD CONSTRAINT "vendor_status_updated_by_fkey" FOREIGN KEY ("updated_by") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
@@ -0,0 +1,18 @@
1
+ -- DropForeignKey
2
+ ALTER TABLE "vendor_status" DROP CONSTRAINT "vendor_status_updated_by_fkey";
3
+
4
+ -- DropForeignKey
5
+ ALTER TABLE "vendor_status" DROP CONSTRAINT "vendor_status_vendor_id_fkey";
6
+
7
+ -- AlterTable
8
+ ALTER TABLE "vendor_status" ALTER COLUMN "vendor_id" DROP NOT NULL,
9
+ ALTER COLUMN "previous_status" DROP NOT NULL,
10
+ ALTER COLUMN "current_status" DROP NOT NULL,
11
+ ALTER COLUMN "comment" DROP NOT NULL,
12
+ ALTER COLUMN "updated_by" DROP NOT NULL;
13
+
14
+ -- AddForeignKey
15
+ ALTER TABLE "vendor_status" ADD CONSTRAINT "vendor_status_vendor_id_fkey" FOREIGN KEY ("vendor_id") REFERENCES "vendors"("id") ON DELETE SET NULL ON UPDATE CASCADE;
16
+
17
+ -- AddForeignKey
18
+ ALTER TABLE "vendor_status" ADD CONSTRAINT "vendor_status_updated_by_fkey" FOREIGN KEY ("updated_by") REFERENCES "users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,23 @@
1
+ -- CreateEnum
2
+ CREATE TYPE "VendorKycVerificationStatusEnum" AS ENUM ('PENDING', 'APPROVED', 'REJECTED');
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "vendor_kyc_info_verification_status" (
6
+ "id" SERIAL NOT NULL,
7
+ "uuid" TEXT,
8
+ "kyc_id" INTEGER,
9
+ "status" "VendorKycVerificationStatusEnum" NOT NULL DEFAULT 'PENDING',
10
+ "created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
11
+ "created_by" INTEGER,
12
+
13
+ CONSTRAINT "vendor_kyc_info_verification_status_pkey" PRIMARY KEY ("id")
14
+ );
15
+
16
+ -- CreateIndex
17
+ CREATE UNIQUE INDEX "vendor_kyc_info_verification_status_uuid_key" ON "vendor_kyc_info_verification_status"("uuid");
18
+
19
+ -- AddForeignKey
20
+ ALTER TABLE "vendor_kyc_info_verification_status" ADD CONSTRAINT "vendor_kyc_info_verification_status_kyc_id_fkey" FOREIGN KEY ("kyc_id") REFERENCES "vendor_kyc_info"("id") ON DELETE CASCADE ON UPDATE CASCADE;
21
+
22
+ -- AddForeignKey
23
+ ALTER TABLE "vendor_kyc_info_verification_status" ADD CONSTRAINT "vendor_kyc_info_verification_status_created_by_fkey" FOREIGN KEY ("created_by") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "vendor_kyc_info_verification_status" ADD COLUMN "reject_reason" TEXT;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `is_accepted` on the `event_vendors` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- CreateEnum
8
+ CREATE TYPE "EventVendorStatus" AS ENUM ('Pending', 'Approved', 'Rejected');
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "event_vendors" DROP COLUMN "is_accepted",
12
+ ADD COLUMN "status" "EventVendorStatus" NOT NULL DEFAULT 'Pending';
@@ -0,0 +1,26 @@
1
+ -- CreateTable
2
+ CREATE TABLE "event_vendor_watchlist" (
3
+ "id" SERIAL NOT NULL,
4
+ "uuid" TEXT,
5
+ "vendor_id" INTEGER NOT NULL,
6
+ "event_id" INTEGER NOT NULL,
7
+ "is_active" BOOLEAN DEFAULT true,
8
+ "created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
9
+ "created_by" INTEGER,
10
+ "updated_at" TIMESTAMP(3),
11
+ "updated_by" INTEGER,
12
+ "is_deleted" BOOLEAN DEFAULT false,
13
+ "deleted_at" TIMESTAMP(3),
14
+ "deleted_by" INTEGER,
15
+
16
+ CONSTRAINT "event_vendor_watchlist_pkey" PRIMARY KEY ("id")
17
+ );
18
+
19
+ -- CreateIndex
20
+ CREATE UNIQUE INDEX "event_vendor_watchlist_uuid_key" ON "event_vendor_watchlist"("uuid");
21
+
22
+ -- AddForeignKey
23
+ ALTER TABLE "event_vendor_watchlist" ADD CONSTRAINT "event_vendor_watchlist_vendor_id_fkey" FOREIGN KEY ("vendor_id") REFERENCES "vendors"("id") ON DELETE CASCADE ON UPDATE CASCADE;
24
+
25
+ -- AddForeignKey
26
+ ALTER TABLE "event_vendor_watchlist" ADD CONSTRAINT "event_vendor_watchlist_event_id_fkey" FOREIGN KEY ("event_id") REFERENCES "events"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,41 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `event_vendor_watchlist` table. If the table is not empty, all the data it contains will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE "event_vendor_watchlist" DROP CONSTRAINT "event_vendor_watchlist_event_id_fkey";
9
+
10
+ -- DropForeignKey
11
+ ALTER TABLE "event_vendor_watchlist" DROP CONSTRAINT "event_vendor_watchlist_vendor_id_fkey";
12
+
13
+ -- DropTable
14
+ DROP TABLE "event_vendor_watchlist";
15
+
16
+ -- CreateTable
17
+ CREATE TABLE "vendor_event_watchlist" (
18
+ "id" SERIAL NOT NULL,
19
+ "uuid" TEXT,
20
+ "vendor_id" INTEGER NOT NULL,
21
+ "event_id" INTEGER NOT NULL,
22
+ "is_active" BOOLEAN DEFAULT true,
23
+ "created_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
24
+ "created_by" INTEGER,
25
+ "updated_at" TIMESTAMP(3),
26
+ "updated_by" INTEGER,
27
+ "is_deleted" BOOLEAN DEFAULT false,
28
+ "deleted_at" TIMESTAMP(3),
29
+ "deleted_by" INTEGER,
30
+
31
+ CONSTRAINT "vendor_event_watchlist_pkey" PRIMARY KEY ("id")
32
+ );
33
+
34
+ -- CreateIndex
35
+ CREATE UNIQUE INDEX "vendor_event_watchlist_uuid_key" ON "vendor_event_watchlist"("uuid");
36
+
37
+ -- AddForeignKey
38
+ ALTER TABLE "vendor_event_watchlist" ADD CONSTRAINT "vendor_event_watchlist_vendor_id_fkey" FOREIGN KEY ("vendor_id") REFERENCES "vendors"("id") ON DELETE CASCADE ON UPDATE CASCADE;
39
+
40
+ -- AddForeignKey
41
+ ALTER TABLE "vendor_event_watchlist" ADD CONSTRAINT "vendor_event_watchlist_event_id_fkey" FOREIGN KEY ("event_id") REFERENCES "events"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,19 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `created_by` on the `vendor_kyc_info_verification_status` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- DropForeignKey
8
+ ALTER TABLE "vendor_kyc_info_verification_status" DROP CONSTRAINT "vendor_kyc_info_verification_status_created_by_fkey";
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "vendor_kyc_info_verification_status" DROP COLUMN "created_by",
12
+ ADD COLUMN "approved_by" INTEGER,
13
+ ADD COLUMN "raised_by" INTEGER;
14
+
15
+ -- AddForeignKey
16
+ ALTER TABLE "vendor_kyc_info_verification_status" ADD CONSTRAINT "vendor_kyc_info_verification_status_raised_by_fkey" FOREIGN KEY ("raised_by") REFERENCES "vendors"("id") ON DELETE CASCADE ON UPDATE CASCADE;
17
+
18
+ -- AddForeignKey
19
+ ALTER TABLE "vendor_kyc_info_verification_status" ADD CONSTRAINT "vendor_kyc_info_verification_status_approved_by_fkey" FOREIGN KEY ("approved_by") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,38 @@
1
+ -- CreateEnum
2
+ CREATE TYPE "AlertTypeEnum" AS ENUM ('PURCHASE_INTAKE', 'PURCHASE_REQUEST', 'PURCHASE_ORDER', 'APPROVAL', 'RFQ', 'AUCTION');
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "admin_alerts" (
6
+ "id" SERIAL NOT NULL,
7
+ "user_id" INTEGER,
8
+ "alert_type" "AlertTypeEnum",
9
+ "title" TEXT,
10
+ "message" TEXT,
11
+ "redirect_url" TEXT,
12
+ "is_read" BOOLEAN NOT NULL DEFAULT false,
13
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
14
+ "meta_data" JSONB,
15
+
16
+ CONSTRAINT "admin_alerts_pkey" PRIMARY KEY ("id")
17
+ );
18
+
19
+ -- CreateTable
20
+ CREATE TABLE "vendor_alerts" (
21
+ "id" SERIAL NOT NULL,
22
+ "vendor_id" INTEGER,
23
+ "alert_type" "AlertTypeEnum",
24
+ "title" TEXT,
25
+ "message" TEXT,
26
+ "redirect_url" TEXT,
27
+ "is_read" BOOLEAN NOT NULL DEFAULT false,
28
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
29
+ "meta_data" JSONB,
30
+
31
+ CONSTRAINT "vendor_alerts_pkey" PRIMARY KEY ("id")
32
+ );
33
+
34
+ -- AddForeignKey
35
+ ALTER TABLE "admin_alerts" ADD CONSTRAINT "admin_alerts_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
36
+
37
+ -- AddForeignKey
38
+ ALTER TABLE "vendor_alerts" ADD CONSTRAINT "vendor_alerts_vendor_id_fkey" FOREIGN KEY ("vendor_id") REFERENCES "vendors"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "event_vendors" ADD COLUMN "reason" TEXT;
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "approval_journey" ADD COLUMN "reject_reason" TEXT;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "purchase_intakes" ADD COLUMN "reject_reason" TEXT;
@@ -0,0 +1,31 @@
1
+ -- CreateEnum
2
+ CREATE TYPE "MediumEnum" AS ENUM ('EMAIL', 'SMS');
3
+
4
+ -- CreateTable
5
+ CREATE TABLE "customer_notifications" (
6
+ "id" SERIAL NOT NULL,
7
+ "uuid" TEXT,
8
+ "template_name" VARCHAR(255),
9
+ "remark" TEXT,
10
+ "event" VARCHAR(255),
11
+ "medium" "MediumEnum",
12
+ "is_recurring" BOOLEAN NOT NULL DEFAULT false,
13
+ "title" TEXT,
14
+ "trigger_message" TEXT,
15
+ "template_slug" TEXT,
16
+ "attachments" TEXT[] DEFAULT ARRAY[]::TEXT[],
17
+ "files" JSONB[],
18
+ "is_active" BOOLEAN NOT NULL DEFAULT false,
19
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
20
+ "created_by" INTEGER,
21
+ "updated_at" TIMESTAMP(3) NOT NULL,
22
+ "updated_by" INTEGER,
23
+ "is_deleted" BOOLEAN NOT NULL DEFAULT false,
24
+ "deleted_at" TIMESTAMP(3),
25
+ "deleted_by" INTEGER,
26
+
27
+ CONSTRAINT "customer_notifications_pkey" PRIMARY KEY ("id")
28
+ );
29
+
30
+ -- CreateIndex
31
+ CREATE UNIQUE INDEX "customer_notifications_uuid_key" ON "customer_notifications"("uuid");
@@ -0,0 +1,18 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `name_of_requestor` on the `purchase_intakes` table. All the data in the column will be lost.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "purchase_intakes" DROP COLUMN "name_of_requestor",
9
+ ADD COLUMN "requestor_id" INTEGER,
10
+ ALTER COLUMN "department" DROP NOT NULL,
11
+ ALTER COLUMN "request_date" DROP NOT NULL,
12
+ ALTER COLUMN "items_or_services_description" DROP NOT NULL,
13
+ ALTER COLUMN "quantity" DROP NOT NULL,
14
+ ALTER COLUMN "estimated_budget" DROP NOT NULL,
15
+ ALTER COLUMN "pr_number" DROP NOT NULL;
16
+
17
+ -- AddForeignKey
18
+ ALTER TABLE "purchase_intakes" ADD CONSTRAINT "purchase_intakes_requestor_id_fkey" FOREIGN KEY ("requestor_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The `attachments` column on the `purchase_intakes` table would be dropped and recreated. This will lead to data loss if there is data in the column.
5
+ - The `if_yes_attach_quotations` column on the `purchase_intakes` table would be dropped and recreated. This will lead to data loss if there is data in the column.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "purchase_intakes" DROP COLUMN "attachments",
10
+ ADD COLUMN "attachments" JSONB,
11
+ DROP COLUMN "if_yes_attach_quotations",
12
+ ADD COLUMN "if_yes_attach_quotations" JSONB;