@kipicore/dbcore 1.1.55 → 1.1.57

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 (393) hide show
  1. package/dist/constants/app.d.ts +5 -0
  2. package/dist/constants/app.js +7 -1
  3. package/dist/constants/errorMessages.d.ts +14 -0
  4. package/dist/constants/errorMessages.js +17 -1
  5. package/dist/constants/successMessages.d.ts +12 -0
  6. package/dist/constants/successMessages.js +15 -1
  7. package/dist/db/psql/migrations/20251009040003-create-working-shift-days.d.ts +2 -0
  8. package/dist/db/psql/migrations/20251009040003-create-working-shift-days.js +181 -0
  9. package/dist/db/psql/migrations/20251009042557-create-or-update-academic-calendars.js +155 -0
  10. package/dist/db/psql/migrations/20251009043250-working_days.js +170 -0
  11. package/dist/db/psql/migrations/20251009044907-wallets.js +166 -0
  12. package/dist/db/psql/migrations/20251009045350-wallet_history.js +206 -0
  13. package/dist/db/psql/migrations/20251009045749-vendor_management.js +236 -0
  14. package/dist/db/psql/migrations/20251009050216-vehicles.js +180 -0
  15. package/dist/db/psql/migrations/20251009050518-UserRequiredSteps.js +152 -0
  16. package/dist/db/psql/migrations/20251009051027-user_project_assessment_options.js +174 -0
  17. package/dist/db/psql/migrations/20251009052015-user_payouts.js +180 -0
  18. package/dist/db/psql/migrations/20251009052646-user_payout_history.js +242 -0
  19. package/dist/db/psql/migrations/20251009052911-user_payout_details.js +132 -0
  20. package/dist/db/psql/migrations/20251009053200-users.d.ts +2 -0
  21. package/dist/db/psql/migrations/20251009053200-users.js +206 -0
  22. package/dist/db/psql/migrations/20251009053408-user_leave_request.d.ts +2 -0
  23. package/dist/db/psql/migrations/20251009053408-user_leave_request.js +206 -0
  24. package/dist/db/psql/migrations/20251009053639-user_has_subject_fee.d.ts +2 -0
  25. package/dist/db/psql/migrations/20251009053639-user_has_subject_fee.js +158 -0
  26. package/dist/db/psql/migrations/20251009053847-user_has_storage.d.ts +2 -0
  27. package/dist/db/psql/migrations/20251009053847-user_has_storage.js +172 -0
  28. package/dist/db/psql/migrations/20251009054048-user_has_roll_number.d.ts +2 -0
  29. package/dist/db/psql/migrations/20251009054048-user_has_roll_number.js +150 -0
  30. package/dist/db/psql/migrations/20251009054308-user_has_roles.d.ts +2 -0
  31. package/dist/db/psql/migrations/20251009054308-user_has_roles.js +150 -0
  32. package/dist/db/psql/migrations/20251009054554-user_has_parents.d.ts +2 -0
  33. package/dist/db/psql/migrations/20251009054554-user_has_parents.js +215 -0
  34. package/dist/db/psql/migrations/20251009054748-user_has_offers.d.ts +2 -0
  35. package/dist/db/psql/migrations/20251009054748-user_has_offers.js +172 -0
  36. package/dist/db/psql/migrations/20251009055140-user_has_leave.d.ts +2 -0
  37. package/dist/db/psql/migrations/20251009055140-user_has_leave.js +184 -0
  38. package/dist/db/psql/migrations/20251009055325-user_has_leave_history.d.ts +2 -0
  39. package/dist/db/psql/migrations/20251009055325-user_has_leave_history.js +218 -0
  40. package/dist/db/psql/migrations/20251009055540-user_has_inventory.d.ts +2 -0
  41. package/dist/db/psql/migrations/20251009055540-user_has_inventory.js +278 -0
  42. package/dist/db/psql/migrations/20251009060053-user_has_inventory_history.d.ts +2 -0
  43. package/dist/db/psql/migrations/20251009060053-user_has_inventory_history.js +270 -0
  44. package/dist/db/psql/migrations/20251009060301-user_has_home_work.d.ts +2 -0
  45. package/dist/db/psql/migrations/20251009060301-user_has_home_work.js +172 -0
  46. package/dist/db/psql/migrations/20251009060506-user_has_files.d.ts +2 -0
  47. package/dist/db/psql/migrations/20251009060506-user_has_files.js +173 -0
  48. package/dist/db/psql/migrations/20251009060732-create_account_has_receipt_details.d.ts +2 -0
  49. package/dist/db/psql/migrations/20251009060732-create_account_has_receipt_details.js +228 -0
  50. package/dist/db/psql/migrations/20251009060734-user_has_fee_terms.d.ts +2 -0
  51. package/dist/db/psql/migrations/20251009060734-user_has_fee_terms.js +240 -0
  52. package/dist/db/psql/migrations/20251009061032-user_has_device.d.ts +2 -0
  53. package/dist/db/psql/migrations/20251009061032-user_has_device.js +168 -0
  54. package/dist/db/psql/migrations/20251009061450-announcementes.d.ts +2 -0
  55. package/dist/db/psql/migrations/20251009061450-announcementes.js +236 -0
  56. package/dist/db/psql/migrations/20251009061917-userHasUserHasCourses.d.ts +2 -0
  57. package/dist/db/psql/migrations/20251009061917-userHasUserHasCourses.js +192 -0
  58. package/dist/db/psql/migrations/20251009061943-areas.d.ts +2 -0
  59. package/dist/db/psql/migrations/20251009061943-areas.js +130 -0
  60. package/dist/db/psql/migrations/20251009062112-user_has_batches.d.ts +2 -0
  61. package/dist/db/psql/migrations/20251009062112-user_has_batches.js +140 -0
  62. package/dist/db/psql/migrations/20251009062317-user_has_announcementes.d.ts +2 -0
  63. package/dist/db/psql/migrations/20251009062317-user_has_announcementes.js +150 -0
  64. package/dist/db/psql/migrations/20251009062408-bank_account_details.d.ts +2 -0
  65. package/dist/db/psql/migrations/20251009062408-bank_account_details.js +204 -0
  66. package/dist/db/psql/migrations/20251009062523-user_fee_types.d.ts +2 -0
  67. package/dist/db/psql/migrations/20251009062523-user_fee_types.js +216 -0
  68. package/dist/db/psql/migrations/20251009062708-user_fee_type_by_account.d.ts +2 -0
  69. package/dist/db/psql/migrations/20251009062708-user_fee_type_by_account.js +198 -0
  70. package/dist/db/psql/migrations/20251009062844-user_book_assessments.d.ts +2 -0
  71. package/dist/db/psql/migrations/20251009062844-user_book_assessments.js +174 -0
  72. package/dist/db/psql/migrations/20251009063105-type_management.d.ts +2 -0
  73. package/dist/db/psql/migrations/20251009063105-type_management.js +170 -0
  74. package/dist/db/psql/migrations/20251009063225-batches.d.ts +2 -0
  75. package/dist/db/psql/migrations/20251009063225-batches.js +240 -0
  76. package/dist/db/psql/migrations/20251009063427-trips.d.ts +2 -0
  77. package/dist/db/psql/migrations/20251009063427-trips.js +188 -0
  78. package/dist/db/psql/migrations/20251009063619-tokens.d.ts +2 -0
  79. package/dist/db/psql/migrations/20251009063619-tokens.js +144 -0
  80. package/dist/db/psql/migrations/20251009063849-toDos.d.ts +2 -0
  81. package/dist/db/psql/migrations/20251009063849-toDos.js +168 -0
  82. package/dist/db/psql/migrations/20251009064034-testimonials.d.ts +2 -0
  83. package/dist/db/psql/migrations/20251009064034-testimonials.js +178 -0
  84. package/dist/db/psql/migrations/20251009064240-syllabus.d.ts +2 -0
  85. package/dist/db/psql/migrations/20251009064240-syllabus.js +150 -0
  86. package/dist/db/psql/migrations/20251009064430-subject_has_pay_fee_history.d.ts +2 -0
  87. package/dist/db/psql/migrations/20251009064430-subject_has_pay_fee_history.js +158 -0
  88. package/dist/db/psql/migrations/20251009064531-batch_subject_book_assessments.d.ts +2 -0
  89. package/dist/db/psql/migrations/20251009064531-batch_subject_book_assessments.js +180 -0
  90. package/dist/db/psql/migrations/20251009064601-subject_has_fee.d.ts +2 -0
  91. package/dist/db/psql/migrations/20251009064601-subject_has_fee.js +138 -0
  92. package/dist/db/psql/migrations/20251009064917-sub_categories.d.ts +2 -0
  93. package/dist/db/psql/migrations/20251009064917-sub_categories.js +148 -0
  94. package/dist/db/psql/migrations/20251009065111-states.d.ts +2 -0
  95. package/dist/db/psql/migrations/20251009065111-states.js +150 -0
  96. package/dist/db/psql/migrations/20251009065230-batch_subject_project_assessments.d.ts +2 -0
  97. package/dist/db/psql/migrations/20251009065230-batch_subject_project_assessments.js +190 -0
  98. package/dist/db/psql/migrations/20251009065230-slots.d.ts +2 -0
  99. package/dist/db/psql/migrations/20251009065230-slots.js +152 -0
  100. package/dist/db/psql/migrations/20251009070114-notifications.d.ts +2 -0
  101. package/dist/db/psql/migrations/20251009070114-notifications.js +184 -0
  102. package/dist/db/psql/migrations/20251009070125-book_assessment_dates.d.ts +2 -0
  103. package/dist/db/psql/migrations/20251009070125-book_assessment_dates.js +152 -0
  104. package/dist/db/psql/migrations/20251009070250-school_offers.d.ts +2 -0
  105. package/dist/db/psql/migrations/20251009070250-school_offers.js +260 -0
  106. package/dist/db/psql/migrations/20251009070502-school_fee_collection.d.ts +2 -0
  107. package/dist/db/psql/migrations/20251009070502-school_fee_collection.js +202 -0
  108. package/dist/db/psql/migrations/20251009070735-rules_and_regulation.d.ts +2 -0
  109. package/dist/db/psql/migrations/20251009070735-rules_and_regulation.js +156 -0
  110. package/dist/db/psql/migrations/20251009070904-roles.d.ts +2 -0
  111. package/dist/db/psql/migrations/20251009070904-roles.js +184 -0
  112. package/dist/db/psql/migrations/20251009071136-project_assessment_options.d.ts +2 -0
  113. package/dist/db/psql/migrations/20251009071136-project_assessment_options.js +162 -0
  114. package/dist/db/psql/migrations/20251009071433-products.d.ts +2 -0
  115. package/dist/db/psql/migrations/20251009071433-products.js +158 -0
  116. package/dist/db/psql/migrations/20251009071615-pincodes.d.ts +2 -0
  117. package/dist/db/psql/migrations/20251009071615-pincodes.js +210 -0
  118. package/dist/db/psql/migrations/20251009071744-pdc_history.d.ts +2 -0
  119. package/dist/db/psql/migrations/20251009071744-pdc_history.js +226 -0
  120. package/dist/db/psql/migrations/20251009071958-pdcCheques.d.ts +2 -0
  121. package/dist/db/psql/migrations/20251009071958-pdcCheques.js +216 -0
  122. package/dist/db/psql/migrations/20251009072138-payment_terms.d.ts +2 -0
  123. package/dist/db/psql/migrations/20251009072138-payment_terms.js +208 -0
  124. package/dist/db/psql/migrations/20251009072258-offers.d.ts +2 -0
  125. package/dist/db/psql/migrations/20251009072258-offers.js +240 -0
  126. package/dist/db/psql/migrations/20251009072415-categories.d.ts +2 -0
  127. package/dist/db/psql/migrations/20251009072415-categories.js +138 -0
  128. package/dist/db/psql/migrations/20251009072447-modules.d.ts +2 -0
  129. package/dist/db/psql/migrations/20251009072447-modules.js +168 -0
  130. package/dist/db/psql/migrations/20251009072840-module_features.d.ts +2 -0
  131. package/dist/db/psql/migrations/20251009072840-module_features.js +178 -0
  132. package/dist/db/psql/migrations/20251009073048-cities.d.ts +2 -0
  133. package/dist/db/psql/migrations/20251009073048-cities.js +148 -0
  134. package/dist/db/psql/migrations/20251009073128-master_leaves.d.ts +2 -0
  135. package/dist/db/psql/migrations/20251009073128-master_leaves.js +192 -0
  136. package/dist/db/psql/migrations/20251009073333-lectures.d.ts +2 -0
  137. package/dist/db/psql/migrations/20251009073333-lectures.js +150 -0
  138. package/dist/db/psql/migrations/20251009073526-lecture_history.d.ts +2 -0
  139. package/dist/db/psql/migrations/20251009073526-lecture_history.js +156 -0
  140. package/dist/db/psql/migrations/20251009073655-inventory.d.ts +2 -0
  141. package/dist/db/psql/migrations/20251009073655-inventory.js +208 -0
  142. package/dist/db/psql/migrations/20251009073859-inventory_history.d.ts +2 -0
  143. package/dist/db/psql/migrations/20251009073859-inventory_history.js +226 -0
  144. package/dist/db/psql/migrations/20251009074039-institute_subscription_plans.d.ts +2 -0
  145. package/dist/db/psql/migrations/20251009074039-institute_subscription_plans.js +280 -0
  146. package/dist/db/psql/migrations/20251009074217-institutes.d.ts +2 -0
  147. package/dist/db/psql/migrations/20251009074217-institutes.js +222 -0
  148. package/dist/db/psql/migrations/20251009074350-institute_entity_types.d.ts +2 -0
  149. package/dist/db/psql/migrations/20251009074350-institute_entity_types.js +156 -0
  150. package/dist/db/psql/migrations/20251009074528-institute_entities.d.ts +2 -0
  151. package/dist/db/psql/migrations/20251009074528-institute_entities.js +204 -0
  152. package/dist/db/psql/migrations/20251009074701-home_work.d.ts +2 -0
  153. package/dist/db/psql/migrations/20251009074701-home_work.js +186 -0
  154. package/dist/db/psql/migrations/20251009074820-greeting.d.ts +2 -0
  155. package/dist/db/psql/migrations/20251009074820-greeting.js +178 -0
  156. package/dist/db/psql/migrations/20251009074941-floor_management.d.ts +2 -0
  157. package/dist/db/psql/migrations/20251009074941-floor_management.js +164 -0
  158. package/dist/db/psql/migrations/20251009075102-file_storage.d.ts +2 -0
  159. package/dist/db/psql/migrations/20251009075102-file_storage.js +190 -0
  160. package/dist/db/psql/migrations/20251009075229-fee_type.d.ts +2 -0
  161. package/dist/db/psql/migrations/20251009075229-fee_type.js +186 -0
  162. package/dist/db/psql/migrations/20251009075350-fee_type_has_terms.d.ts +2 -0
  163. package/dist/db/psql/migrations/20251009075350-fee_type_has_terms.js +174 -0
  164. package/dist/db/psql/migrations/20251009075519-fees_collections.d.ts +2 -0
  165. package/dist/db/psql/migrations/20251009075519-fees_collections.js +256 -0
  166. package/dist/db/psql/migrations/20251009075642-fee_reminder_settings.d.ts +2 -0
  167. package/dist/db/psql/migrations/20251009075642-fee_reminder_settings.js +160 -0
  168. package/dist/db/psql/migrations/20251009075804-fee_reminders.d.ts +2 -0
  169. package/dist/db/psql/migrations/20251009075804-fee_reminders.js +204 -0
  170. package/dist/db/psql/migrations/20251009075924-fee_history.d.ts +2 -0
  171. package/dist/db/psql/migrations/20251009075924-fee_history.js +158 -0
  172. package/dist/db/psql/migrations/20251009082617-class_rooms.d.ts +2 -0
  173. package/dist/db/psql/migrations/20251009082617-class_rooms.js +188 -0
  174. package/dist/db/psql/migrations/20251009082910-cloud_storage.d.ts +2 -0
  175. package/dist/db/psql/migrations/20251009082910-cloud_storage.js +222 -0
  176. package/dist/db/psql/migrations/20251009083435-coin_purchase_offers.d.ts +2 -0
  177. package/dist/db/psql/migrations/20251009083435-coin_purchase_offers.js +228 -0
  178. package/dist/db/psql/migrations/20251009083812-fee_history_details.d.ts +2 -0
  179. package/dist/db/psql/migrations/20251009083812-fee_history_details.js +230 -0
  180. package/dist/db/psql/migrations/20251009083949-feature_actions.d.ts +2 -0
  181. package/dist/db/psql/migrations/20251009083949-feature_actions.js +188 -0
  182. package/dist/db/psql/migrations/20251009084101-contact_feed_back.d.ts +2 -0
  183. package/dist/db/psql/migrations/20251009084101-contact_feed_back.js +188 -0
  184. package/dist/db/psql/migrations/20251009084145-facilities.d.ts +2 -0
  185. package/dist/db/psql/migrations/20251009084145-facilities.js +148 -0
  186. package/dist/db/psql/migrations/20251009084446-countries.d.ts +2 -0
  187. package/dist/db/psql/migrations/20251009084446-countries.js +160 -0
  188. package/dist/db/psql/migrations/20251009084908-courseHasVisitors.d.ts +2 -0
  189. package/dist/db/psql/migrations/20251009084908-courseHasVisitors.js +142 -0
  190. package/dist/db/psql/migrations/20251009085333-courses.d.ts +2 -0
  191. package/dist/db/psql/migrations/20251009085333-courses.js +242 -0
  192. package/dist/db/psql/migrations/20251009085654-drivers.d.ts +2 -0
  193. package/dist/db/psql/migrations/20251009085654-drivers.js +262 -0
  194. package/dist/db/psql/migrations/20251009090107-entity_group.d.ts +2 -0
  195. package/dist/db/psql/migrations/20251009090107-entity_group.js +184 -0
  196. package/dist/db/psql/migrations/20251009093327-banners.d.ts +2 -0
  197. package/dist/db/psql/migrations/20251009093327-banners.js +214 -0
  198. package/dist/db/psql/migrations/20251103103900-create-lost-found-item.d.ts +2 -0
  199. package/dist/db/psql/migrations/20251103103900-create-lost-found-item.js +168 -0
  200. package/dist/interfaces/canteenInterface.d.ts +11 -0
  201. package/dist/interfaces/canteenInterface.js +2 -0
  202. package/dist/interfaces/coinPurchaseOfferInterface.d.ts +1 -1
  203. package/dist/interfaces/examInterface.d.ts +1 -0
  204. package/dist/interfaces/feedBackInterface.d.ts +1 -0
  205. package/dist/interfaces/index.d.ts +2 -0
  206. package/dist/interfaces/index.js +2 -0
  207. package/dist/interfaces/lostFoundItemInterface.d.ts +11 -0
  208. package/dist/interfaces/lostFoundItemInterface.js +2 -0
  209. package/dist/models/mongodb/canteenModel.d.ts +4 -0
  210. package/dist/models/mongodb/canteenModel.js +63 -0
  211. package/dist/models/mongodb/examModel.js +4 -0
  212. package/dist/models/mongodb/feedBackModel.js +3 -0
  213. package/dist/models/mongodb/index.d.ts +1 -0
  214. package/dist/models/mongodb/index.js +3 -1
  215. package/dist/models/psql/coinPurchaseOfferModel.d.ts +1 -1
  216. package/dist/models/psql/coinPurchaseOfferModel.js +1 -1
  217. package/dist/models/psql/index.d.ts +1 -0
  218. package/dist/models/psql/index.js +3 -1
  219. package/dist/models/psql/lostFoundItemModel.d.ts +21 -0
  220. package/dist/models/psql/lostFoundItemModel.js +101 -0
  221. package/dist/models/psql/userHasHomeWorkModel.d.ts +0 -1
  222. package/dist/models/psql/userHasHomeWorkModel.js +0 -8
  223. package/dist/types/canteenType.d.ts +2 -0
  224. package/dist/types/canteenType.js +2 -0
  225. package/dist/types/index.d.ts +2 -0
  226. package/dist/types/index.js +2 -0
  227. package/dist/types/lostFoundItemType.d.ts +2 -0
  228. package/dist/types/lostFoundItemType.js +2 -0
  229. package/package.json +1 -1
  230. package/dist/db/psql/migrations/20241225101052-add-deleted-by-and-deleted-at-fields.d.ts +0 -2
  231. package/dist/db/psql/migrations/20241225101052-add-deleted-by-and-deleted-at-fields.js +0 -71
  232. package/dist/db/psql/migrations/20250106070945-add-user-fields-and-deleted-user-fields.d.ts +0 -3
  233. package/dist/db/psql/migrations/20250106070945-add-user-fields-and-deleted-user-fields.js +0 -33
  234. package/dist/db/psql/migrations/20250106080059-add-fields-and-deleted-fields.d.ts +0 -3
  235. package/dist/db/psql/migrations/20250106080059-add-fields-and-deleted-fields.js +0 -94
  236. package/dist/db/psql/migrations/20250108092439-update-batch-model-fields.d.ts +0 -2
  237. package/dist/db/psql/migrations/20250108092439-update-batch-model-fields.js +0 -38
  238. package/dist/db/psql/migrations/20250210102846-add-profileImage-coverImage-to-users.d.ts +0 -3
  239. package/dist/db/psql/migrations/20250210102846-add-profileImage-coverImage-to-users.js +0 -102
  240. package/dist/db/psql/migrations/20250211071743-add-action-user-has-histroy.d.ts +0 -3
  241. package/dist/db/psql/migrations/20250211071743-add-action-user-has-histroy.js +0 -76
  242. package/dist/db/psql/migrations/20250213140815-add-assignQuantity-user-has-histroy.d.ts +0 -3
  243. package/dist/db/psql/migrations/20250213140815-add-assignQuantity-user-has-histroy.js +0 -80
  244. package/dist/db/psql/migrations/20250214072626-add-middlename-user.d.ts +0 -3
  245. package/dist/db/psql/migrations/20250214072626-add-middlename-user.js +0 -80
  246. package/dist/db/psql/migrations/20250224085333-add-apptype-in-user.d.ts +0 -3
  247. package/dist/db/psql/migrations/20250224085333-add-apptype-in-user.js +0 -78
  248. package/dist/db/psql/migrations/20250226053006-add-brouchure-in-institute.d.ts +0 -3
  249. package/dist/db/psql/migrations/20250226053006-add-brouchure-in-institute.js +0 -80
  250. package/dist/db/psql/migrations/20250227123530-add-defult-in-fee-reminder.d.ts +0 -3
  251. package/dist/db/psql/migrations/20250227123530-add-defult-in-fee-reminder.js +0 -78
  252. package/dist/db/psql/migrations/20250304052831-add-institued-in-school-data-clm.d.ts +0 -3
  253. package/dist/db/psql/migrations/20250304052831-add-institued-in-school-data-clm.js +0 -112
  254. package/dist/db/psql/migrations/20250306053557-add-shifyId-in-batch.d.ts +0 -3
  255. package/dist/db/psql/migrations/20250306053557-add-shifyId-in-batch.js +0 -86
  256. package/dist/db/psql/migrations/20250311044606-add-institued-in-school-data-clm-subtype.d.ts +0 -2
  257. package/dist/db/psql/migrations/20250311044606-add-institued-in-school-data-clm-subtype.js +0 -43
  258. package/dist/db/psql/migrations/20250402090653-add-user-area.d.ts +0 -3
  259. package/dist/db/psql/migrations/20250402090653-add-user-area.js +0 -94
  260. package/dist/db/psql/migrations/20250407094125-update-type-in-typeManagement.d.ts +0 -2
  261. package/dist/db/psql/migrations/20250407094125-update-type-in-typeManagement.js +0 -64
  262. package/dist/db/psql/migrations/20250409105229-add-user-type-in-role.d.ts +0 -3
  263. package/dist/db/psql/migrations/20250409105229-add-user-type-in-role.js +0 -55
  264. package/dist/db/psql/migrations/20250417121316-make-institute-id-nullable-in-type-management.d.ts +0 -2
  265. package/dist/db/psql/migrations/20250417121316-make-institute-id-nullable-in-type-management.js +0 -16
  266. package/dist/db/psql/migrations/20250419071236-fee_histroy_add_school_clm.d.ts +0 -3
  267. package/dist/db/psql/migrations/20250419071236-fee_histroy_add_school_clm.js +0 -134
  268. package/dist/db/psql/migrations/20250419085334-fee_histroy_add_school_clm.d.ts +0 -3
  269. package/dist/db/psql/migrations/20250419085334-fee_histroy_add_school_clm.js +0 -86
  270. package/dist/db/psql/migrations/20250421085618-add-entityIds-field-in-announcements.d.ts +0 -3
  271. package/dist/db/psql/migrations/20250421085618-add-entityIds-field-in-announcements.js +0 -81
  272. package/dist/db/psql/migrations/20250422114032-add-account.d.ts +0 -3
  273. package/dist/db/psql/migrations/20250422114032-add-account.js +0 -86
  274. package/dist/db/psql/migrations/20250423051841-add-master-leave-clm.d.ts +0 -3
  275. package/dist/db/psql/migrations/20250423051841-add-master-leave-clm.js +0 -71
  276. package/dist/db/psql/migrations/20250423064522-update-calender-enum.d.ts +0 -2
  277. package/dist/db/psql/migrations/20250423064522-update-calender-enum.js +0 -34
  278. package/dist/db/psql/migrations/20250423093827-update-institued-district.d.ts +0 -3
  279. package/dist/db/psql/migrations/20250423093827-update-institued-district.js +0 -78
  280. package/dist/db/psql/migrations/20250424044755-update-fee-history-feeTyps-clm.d.ts +0 -3
  281. package/dist/db/psql/migrations/20250424044755-update-fee-history-feeTyps-clm.js +0 -34
  282. package/dist/db/psql/migrations/20250424053841-update-fee-history-key.d.ts +0 -2
  283. package/dist/db/psql/migrations/20250424053841-update-fee-history-key.js +0 -35
  284. package/dist/db/psql/migrations/20250426070309-update-banner-clm-userType.d.ts +0 -3
  285. package/dist/db/psql/migrations/20250426070309-update-banner-clm-userType.js +0 -55
  286. package/dist/db/psql/migrations/20250505035157-update-fee-collection-clm-add.d.ts +0 -3
  287. package/dist/db/psql/migrations/20250505035157-update-fee-collection-clm-add.js +0 -86
  288. package/dist/db/psql/migrations/20250505082924-update-banner-clm.d.ts +0 -3
  289. package/dist/db/psql/migrations/20250505082924-update-banner-clm.js +0 -18
  290. package/dist/db/psql/migrations/20250505094616-about-as-clm-in-institued.d.ts +0 -2
  291. package/dist/db/psql/migrations/20250505094616-about-as-clm-in-institued.js +0 -16
  292. package/dist/db/psql/migrations/20250506070110-add-dayOfWeek-clm-in-working-model.d.ts +0 -3
  293. package/dist/db/psql/migrations/20250506070110-add-dayOfWeek-clm-in-working-model.js +0 -80
  294. package/dist/db/psql/migrations/20250509055920-add-feecollection-isleft-clm.d.ts +0 -3
  295. package/dist/db/psql/migrations/20250509055920-add-feecollection-isleft-clm.js +0 -80
  296. package/dist/db/psql/migrations/20250513061037-add-techer-clm-batch.d.ts +0 -3
  297. package/dist/db/psql/migrations/20250513061037-add-techer-clm-batch.js +0 -88
  298. package/dist/db/psql/migrations/20250514101801-add-slotId-workingShif.d.ts +0 -3
  299. package/dist/db/psql/migrations/20250514101801-add-slotId-workingShif.js +0 -86
  300. package/dist/db/psql/migrations/20250516062917-add-globalId-clm-user-model.d.ts +0 -3
  301. package/dist/db/psql/migrations/20250516062917-add-globalId-clm-user-model.js +0 -80
  302. package/dist/db/psql/migrations/20250516063542-add-globalId-clm-institute-model.d.ts +0 -3
  303. package/dist/db/psql/migrations/20250516063542-add-globalId-clm-institute-model.js +0 -80
  304. package/dist/db/psql/migrations/20250520061231-add-institued_mobile_person_data.d.ts +0 -3
  305. package/dist/db/psql/migrations/20250520061231-add-institued_mobile_person_data.js +0 -116
  306. package/dist/db/psql/migrations/20250522044729-add-institued_update_add_2.d.ts +0 -2
  307. package/dist/db/psql/migrations/20250522044729-add-institued_update_add_2.js +0 -16
  308. package/dist/db/psql/migrations/20250526035543-add-totalQuantity_add_remainingQuantiy_clm_userHasInventoryHistory.d.ts +0 -3
  309. package/dist/db/psql/migrations/20250526035543-add-totalQuantity_add_remainingQuantiy_clm_userHasInventoryHistory.js +0 -98
  310. package/dist/db/psql/migrations/20250526093322-add-appType_clm_in_module.d.ts +0 -3
  311. package/dist/db/psql/migrations/20250526093322-add-appType_clm_in_module.js +0 -80
  312. package/dist/db/psql/migrations/20250526094030-add-appType_clm_in_action.d.ts +0 -3
  313. package/dist/db/psql/migrations/20250526094030-add-appType_clm_in_action.js +0 -80
  314. package/dist/db/psql/migrations/20250526094233-add-appType_clm_in_module_features.d.ts +0 -3
  315. package/dist/db/psql/migrations/20250526094233-add-appType_clm_in_module_features.js +0 -80
  316. package/dist/db/psql/migrations/20250527065001-add-app-type-in-role-model.d.ts +0 -3
  317. package/dist/db/psql/migrations/20250527065001-add-app-type-in-role-model.js +0 -57
  318. package/dist/db/psql/migrations/20250528045906-add-module-type-to-notifications.d.ts +0 -2
  319. package/dist/db/psql/migrations/20250528045906-add-module-type-to-notifications.js +0 -13
  320. package/dist/db/psql/migrations/20250602090331-add-or-update-user-model-medicalHistory.d.ts +0 -3
  321. package/dist/db/psql/migrations/20250602090331-add-or-update-user-model-medicalHistory.js +0 -107
  322. package/dist/db/psql/migrations/20250602100550-add-planner-sync-status-to-institute.d.ts +0 -3
  323. package/dist/db/psql/migrations/20250602100550-add-planner-sync-status-to-institute.js +0 -113
  324. package/dist/db/psql/migrations/20250603054900-add-clm-for-defult-data-add-or-not-in-ins-model.d.ts +0 -3
  325. package/dist/db/psql/migrations/20250603054900-add-clm-for-defult-data-add-or-not-in-ins-model.js +0 -80
  326. package/dist/db/psql/migrations/20250604103905-add-is-institute-default-field-in-role.d.ts +0 -3
  327. package/dist/db/psql/migrations/20250604103905-add-is-institute-default-field-in-role.js +0 -57
  328. package/dist/db/psql/migrations/20250604121051-update-mobile-number-opstion.d.ts +0 -3
  329. package/dist/db/psql/migrations/20250604121051-update-mobile-number-opstion.js +0 -15
  330. package/dist/db/psql/migrations/20250617064159-update-type-management-jun-17.d.ts +0 -2
  331. package/dist/db/psql/migrations/20250617064159-update-type-management-jun-17.js +0 -11
  332. package/dist/db/psql/migrations/20250627065013-is-institute-default-added-type-managemente.js +0 -12
  333. package/dist/db/psql/migrations/20250701095321-add-clm-institute-pdfId.d.ts +0 -3
  334. package/dist/db/psql/migrations/20250701095321-add-clm-institute-pdfId.js +0 -57
  335. package/dist/db/psql/migrations/20250704102117-add-clm-isDefult-in-typeManagemet.js +0 -12
  336. package/dist/db/psql/migrations/20250715103324-add-academic-calendar-id-to-batches.js +0 -13
  337. package/dist/db/psql/migrations/20250715121047-remove-batch-id-from-academic-calendars.d.ts +0 -2
  338. package/dist/db/psql/migrations/20250715121047-remove-batch-id-from-academic-calendars.js +0 -12
  339. package/dist/db/psql/migrations/20250716131731-rename-user-id-to-primary-user-id.d.ts +0 -2
  340. package/dist/db/psql/migrations/20250716131731-rename-user-id-to-primary-user-id.js +0 -9
  341. package/dist/db/psql/migrations/20250717092933-add-floor-id-to-class-rooms.d.ts +0 -3
  342. package/dist/db/psql/migrations/20250717092933-add-floor-id-to-class-rooms.js +0 -86
  343. package/dist/db/psql/migrations/20250718121251-add-clm-classroom-typeid.d.ts +0 -3
  344. package/dist/db/psql/migrations/20250718121251-add-clm-classroom-typeid.js +0 -86
  345. package/dist/db/psql/migrations/20250721065317-add-instituteId-fileSize-to-fileStorage.js +0 -22
  346. package/dist/db/psql/migrations/20250721100004-add-shift-slot-id-to-lectures.js +0 -17
  347. package/dist/db/psql/migrations/20250721105455-add-clm-classroom-add-classroomnumber.d.ts +0 -3
  348. package/dist/db/psql/migrations/20250721105455-add-clm-classroom-add-classroomnumber.js +0 -78
  349. package/dist/db/psql/migrations/20250722071836-add-title-to-floor-management.d.ts +0 -2
  350. package/dist/db/psql/migrations/20250722071836-add-title-to-floor-management.js +0 -14
  351. package/dist/db/psql/migrations/20250723150111-add-clm-batch-slotId.d.ts +0 -3
  352. package/dist/db/psql/migrations/20250723150111-add-clm-batch-slotId.js +0 -86
  353. package/dist/db/psql/migrations/20250724062458-update_classRoom_number_clm_to_string.d.ts +0 -2
  354. package/dist/db/psql/migrations/20250724062458-update_classRoom_number_clm_to_string.js +0 -15
  355. package/dist/db/psql/migrations/20250725132424-add-unique-index-on-instituteId-name-type.d.ts +0 -2
  356. package/dist/db/psql/migrations/20250725132424-add-unique-index-on-instituteId-name-type.js +0 -24
  357. package/dist/db/psql/migrations/20250730104844-update-unique-key-assessment-type.d.ts +0 -2
  358. package/dist/db/psql/migrations/20250730104844-update-unique-key-assessment-type.js +0 -30
  359. package/dist/db/psql/migrations/20250804090437-update_ins_in_pdf_id_string_to_uuid.d.ts +0 -3
  360. package/dist/db/psql/migrations/20250804090437-update_ins_in_pdf_id_string_to_uuid.js +0 -62
  361. package/dist/db/psql/migrations/20250805062440-remove_unique_key_into_batch_subject_project_assessments.d.ts +0 -2
  362. package/dist/db/psql/migrations/20250805062440-remove_unique_key_into_batch_subject_project_assessments.js +0 -21
  363. package/dist/db/psql/migrations/20250805115805-add-descriptions-to-lectures.js +0 -12
  364. package/dist/db/psql/migrations/20250808100700-add_clm_contectFeed_in_ins_givenId.d.ts +0 -3
  365. package/dist/db/psql/migrations/20250808100700-add_clm_contectFeed_in_ins_givenId.js +0 -86
  366. package/dist/db/psql/migrations/20250808101515-add-sequence-to-institute_entities.js +0 -12
  367. package/dist/db/psql/migrations/20250812080521-add-title-and-descriptions-to-batch-subject-project-assessments.js +0 -17
  368. package/dist/db/psql/migrations/20250820092836-add-sequence-number-to-institute-entities.js +0 -15
  369. package/dist/db/psql/migrations/20250829103203-remove-syllabus-composit-index.d.ts +0 -2
  370. package/dist/db/psql/migrations/20250829103203-remove-syllabus-composit-index.js +0 -15
  371. package/dist/db/psql/migrations/20250905132024-add-uuid-to-users.js +0 -12
  372. package/dist/db/psql/migrations/20250908054025-userHasOffer_model_update.d.ts +0 -3
  373. package/dist/db/psql/migrations/20250908054025-userHasOffer_model_update.js +0 -112
  374. package/dist/db/psql/migrations/20250908054754-offer_in_add_offertype_clm.d.ts +0 -3
  375. package/dist/db/psql/migrations/20250908054754-offer_in_add_offertype_clm.js +0 -70
  376. package/dist/db/psql/migrations/20250909061117-add-instituteId-isDefault-to-entityGroup.js +0 -17
  377. package/dist/db/psql/migrations/20250911060106-change-wallet-history-columns-to-float.d.ts +0 -2
  378. package/dist/db/psql/migrations/20250911060106-change-wallet-history-columns-to-float.js +0 -39
  379. package/dist/db/psql/migrations/20250911060245-change-coin-to-float-in-wallets.d.ts +0 -2
  380. package/dist/db/psql/migrations/20250911060245-change-coin-to-float-in-wallets.js +0 -17
  381. package/dist/db/psql/migrations/20250917135646-change-storageInBytes-to-float.d.ts +0 -2
  382. package/dist/db/psql/migrations/20250917135646-change-storageInBytes-to-float.js +0 -17
  383. /package/dist/db/psql/migrations/{20250627065013-is-institute-default-added-type-managemente.d.ts → 20251009042557-create-or-update-academic-calendars.d.ts} +0 -0
  384. /package/dist/db/psql/migrations/{20250704102117-add-clm-isDefult-in-typeManagemet.d.ts → 20251009043250-working_days.d.ts} +0 -0
  385. /package/dist/db/psql/migrations/{20250715103324-add-academic-calendar-id-to-batches.d.ts → 20251009044907-wallets.d.ts} +0 -0
  386. /package/dist/db/psql/migrations/{20250721065317-add-instituteId-fileSize-to-fileStorage.d.ts → 20251009045350-wallet_history.d.ts} +0 -0
  387. /package/dist/db/psql/migrations/{20250721100004-add-shift-slot-id-to-lectures.d.ts → 20251009045749-vendor_management.d.ts} +0 -0
  388. /package/dist/db/psql/migrations/{20250805115805-add-descriptions-to-lectures.d.ts → 20251009050216-vehicles.d.ts} +0 -0
  389. /package/dist/db/psql/migrations/{20250808101515-add-sequence-to-institute_entities.d.ts → 20251009050518-UserRequiredSteps.d.ts} +0 -0
  390. /package/dist/db/psql/migrations/{20250812080521-add-title-and-descriptions-to-batch-subject-project-assessments.d.ts → 20251009051027-user_project_assessment_options.d.ts} +0 -0
  391. /package/dist/db/psql/migrations/{20250820092836-add-sequence-number-to-institute-entities.d.ts → 20251009052015-user_payouts.d.ts} +0 -0
  392. /package/dist/db/psql/migrations/{20250905132024-add-uuid-to-users.d.ts → 20251009052646-user_payout_history.d.ts} +0 -0
  393. /package/dist/db/psql/migrations/{20250909061117-add-instituteId-isDefault-to-entityGroup.d.ts → 20251009052911-user_payout_details.d.ts} +0 -0
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const tableName = 'user_payout_history';
4
+ const tableExists = await queryInterface
5
+ .describeTable(tableName)
6
+ .then(() => true)
7
+ .catch(() => false);
8
+ if (!tableExists) {
9
+ await queryInterface.createTable(tableName, {
10
+ id: {
11
+ type: Sequelize.UUID,
12
+ defaultValue: Sequelize.UUIDV4,
13
+ allowNull: false,
14
+ primaryKey: true,
15
+ },
16
+ userId: {
17
+ type: Sequelize.UUID,
18
+ allowNull: false,
19
+ field: 'user_id',
20
+ },
21
+ userType: {
22
+ type: Sequelize.ENUM('MASTER_ADMIN', 'ADMIN', 'INSTITUTE_MASTER_ADMIN', 'INSTITUTE_ADMIN', 'TEACHER', 'STUDENT', 'PARENTS', 'DRIVER'),
23
+ allowNull: false,
24
+ field: 'user_type',
25
+ },
26
+ instituteId: {
27
+ type: Sequelize.UUID,
28
+ allowNull: false,
29
+ field: 'institute_id',
30
+ },
31
+ userPayoutId: {
32
+ type: Sequelize.UUID,
33
+ allowNull: false,
34
+ field: 'user_payout_id',
35
+ },
36
+ paidAmount: {
37
+ type: Sequelize.FLOAT,
38
+ allowNull: false,
39
+ field: 'paid_amount',
40
+ },
41
+ payableAmount: {
42
+ type: Sequelize.FLOAT,
43
+ allowNull: false,
44
+ field: 'payable_amount',
45
+ },
46
+ bonusAmount: {
47
+ type: Sequelize.FLOAT,
48
+ allowNull: true,
49
+ defaultValue: 0,
50
+ field: 'bonus_amount',
51
+ },
52
+ overtimeAmount: {
53
+ type: Sequelize.FLOAT,
54
+ allowNull: true,
55
+ defaultValue: 0,
56
+ field: 'overtime_amount',
57
+ },
58
+ payoutDate: {
59
+ type: Sequelize.DATE,
60
+ allowNull: false,
61
+ field: 'payout_date',
62
+ },
63
+ payoutStartTime: {
64
+ type: Sequelize.DATE,
65
+ allowNull: false,
66
+ field: 'payout_start_time',
67
+ },
68
+ payoutEndTime: {
69
+ type: Sequelize.DATE,
70
+ allowNull: false,
71
+ field: 'payout_end_time',
72
+ },
73
+ payoutType: {
74
+ type: Sequelize.ENUM('PERCENTAGE', 'HOURLY', 'MONTHLY'),
75
+ allowNull: false,
76
+ field: 'payout_type',
77
+ },
78
+ description: {
79
+ type: Sequelize.STRING,
80
+ allowNull: true,
81
+ },
82
+ createdBy: {
83
+ type: Sequelize.UUID,
84
+ allowNull: true,
85
+ field: 'created_by'
86
+ },
87
+ updatedBy: {
88
+ type: Sequelize.UUID,
89
+ allowNull: true,
90
+ field: 'updated_by'
91
+ },
92
+ deletedBy: {
93
+ type: Sequelize.UUID,
94
+ allowNull: true,
95
+ field: 'deleted_by'
96
+ },
97
+ createdAt: {
98
+ type: Sequelize.DATE,
99
+ allowNull: false,
100
+ field: 'created_at'
101
+ },
102
+ updatedAt: {
103
+ type: Sequelize.DATE,
104
+ allowNull: false,
105
+ field: 'updated_at'
106
+ },
107
+ deletedAt: {
108
+ type: Sequelize.DATE,
109
+ allowNull: true,
110
+ field: 'deleted_at'
111
+ },
112
+ });
113
+ }
114
+ else {
115
+ const tableDefinition = await queryInterface.describeTable(tableName);
116
+ const columnsToAdd = {
117
+ id: {
118
+ type: Sequelize.UUID,
119
+ defaultValue: Sequelize.UUIDV4,
120
+ allowNull: false,
121
+ primaryKey: true,
122
+ },
123
+ userId: {
124
+ type: Sequelize.UUID,
125
+ allowNull: false,
126
+ field: 'user_id',
127
+ },
128
+ userType: {
129
+ type: Sequelize.ENUM('MASTER_ADMIN', 'ADMIN', 'INSTITUTE_MASTER_ADMIN', 'INSTITUTE_ADMIN', 'TEACHER', 'STUDENT', 'PARENTS', 'DRIVER'),
130
+ allowNull: false,
131
+ field: 'user_type',
132
+ },
133
+ instituteId: {
134
+ type: Sequelize.UUID,
135
+ allowNull: false,
136
+ field: 'institute_id',
137
+ },
138
+ userPayoutId: {
139
+ type: Sequelize.UUID,
140
+ allowNull: false,
141
+ field: 'user_payout_id',
142
+ },
143
+ paidAmount: {
144
+ type: Sequelize.FLOAT,
145
+ allowNull: false,
146
+ field: 'paid_amount',
147
+ },
148
+ payableAmount: {
149
+ type: Sequelize.FLOAT,
150
+ allowNull: false,
151
+ field: 'payable_amount',
152
+ },
153
+ bonusAmount: {
154
+ type: Sequelize.FLOAT,
155
+ allowNull: true,
156
+ defaultValue: 0,
157
+ field: 'bonus_amount',
158
+ },
159
+ overtimeAmount: {
160
+ type: Sequelize.FLOAT,
161
+ allowNull: true,
162
+ defaultValue: 0,
163
+ field: 'overtime_amount',
164
+ },
165
+ payoutDate: {
166
+ type: Sequelize.DATE,
167
+ allowNull: false,
168
+ field: 'payout_date',
169
+ },
170
+ payoutStartTime: {
171
+ type: Sequelize.DATE,
172
+ allowNull: false,
173
+ field: 'payout_start_time',
174
+ },
175
+ payoutEndTime: {
176
+ type: Sequelize.DATE,
177
+ allowNull: false,
178
+ field: 'payout_end_time',
179
+ },
180
+ payoutType: {
181
+ type: Sequelize.ENUM('PERCENTAGE', 'HOURLY', 'MONTHLY'),
182
+ allowNull: false,
183
+ field: 'payout_type',
184
+ },
185
+ description: {
186
+ type: Sequelize.STRING,
187
+ allowNull: true,
188
+ },
189
+ createdBy: {
190
+ type: Sequelize.UUID,
191
+ allowNull: true,
192
+ field: 'created_by'
193
+ },
194
+ updatedBy: {
195
+ type: Sequelize.UUID,
196
+ allowNull: true,
197
+ field: 'updated_by'
198
+ },
199
+ deletedBy: {
200
+ type: Sequelize.UUID,
201
+ allowNull: true,
202
+ field: 'deleted_by'
203
+ },
204
+ createdAt: {
205
+ type: Sequelize.DATE,
206
+ allowNull: false,
207
+ field: 'created_at'
208
+ },
209
+ updatedAt: {
210
+ type: Sequelize.DATE,
211
+ allowNull: false,
212
+ field: 'updated_at'
213
+ },
214
+ deletedAt: {
215
+ type: Sequelize.DATE,
216
+ allowNull: true,
217
+ field: 'deleted_at'
218
+ },
219
+ };
220
+ for (const column of Object.keys(columnsToAdd)) {
221
+ const columnToAdd = columnsToAdd[column];
222
+ const tableColumn = columnToAdd.field || column;
223
+ if (!tableDefinition[tableColumn]) {
224
+ await queryInterface.addColumn(tableName, tableColumn, columnToAdd);
225
+ }
226
+ }
227
+ }
228
+ };
229
+ const down = async (queryInterface) => {
230
+ const tableName = 'user_payout_history';
231
+ const tableExists = await queryInterface
232
+ .describeTable(tableName)
233
+ .then(() => true)
234
+ .catch(() => false);
235
+ if (tableExists) {
236
+ await queryInterface.dropTable(tableName);
237
+ }
238
+ };
239
+ module.exports = {
240
+ up,
241
+ down,
242
+ };
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const tableName = 'user_payout_details';
4
+ const tableExists = await queryInterface
5
+ .describeTable(tableName)
6
+ .then(() => true)
7
+ .catch(() => false);
8
+ if (!tableExists) {
9
+ await queryInterface.createTable(tableName, {
10
+ id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, allowNull: false, primaryKey: true },
11
+ subjectId: { type: Sequelize.UUID, allowNull: false, field: 'subject_id' },
12
+ batchId: { type: Sequelize.UUID, allowNull: false, field: 'batch_id' },
13
+ userPayoutId: { type: Sequelize.UUID, allowNull: false, field: 'user_payout_id' },
14
+ payableAmount: { type: Sequelize.FLOAT, allowNull: true, defaultValue: 0, field: 'payable_amount' },
15
+ amountPerHour: { type: Sequelize.FLOAT, allowNull: true, defaultValue: 0, field: 'amount_per_hour' },
16
+ percentage: { type: Sequelize.FLOAT, allowNull: true, defaultValue: 0, field: 'percentage' },
17
+ type: {
18
+ type: Sequelize.ENUM('PERCENTAGE', 'HOURLY', 'MONTHLY'),
19
+ allowNull: false
20
+ },
21
+ userId: { type: Sequelize.UUID, allowNull: false, field: 'user_id' },
22
+ instituteId: { type: Sequelize.UUID, allowNull: false, field: 'institute_id' },
23
+ description: {
24
+ type: Sequelize.STRING,
25
+ allowNull: true,
26
+ },
27
+ createdBy: {
28
+ type: Sequelize.UUID,
29
+ allowNull: true,
30
+ field: 'created_by'
31
+ },
32
+ updatedBy: {
33
+ type: Sequelize.UUID,
34
+ allowNull: true,
35
+ field: 'updated_by'
36
+ },
37
+ deletedBy: {
38
+ type: Sequelize.UUID,
39
+ allowNull: true,
40
+ field: 'deleted_by'
41
+ },
42
+ createdAt: {
43
+ type: Sequelize.DATE,
44
+ allowNull: false,
45
+ field: 'created_at'
46
+ },
47
+ updatedAt: {
48
+ type: Sequelize.DATE,
49
+ allowNull: false,
50
+ field: 'updated_at'
51
+ },
52
+ deletedAt: {
53
+ type: Sequelize.DATE,
54
+ allowNull: true,
55
+ field: 'deleted_at'
56
+ },
57
+ });
58
+ }
59
+ else {
60
+ const tableDefinition = await queryInterface.describeTable(tableName);
61
+ const columnsToAdd = {
62
+ id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, allowNull: false, primaryKey: true },
63
+ subjectId: { type: Sequelize.UUID, allowNull: false, field: 'subject_id' },
64
+ batchId: { type: Sequelize.UUID, allowNull: false, field: 'batch_id' },
65
+ userPayoutId: { type: Sequelize.UUID, allowNull: false, field: 'user_payout_id' },
66
+ payableAmount: { type: Sequelize.FLOAT, allowNull: true, defaultValue: 0, field: 'payable_amount' },
67
+ amountPerHour: { type: Sequelize.FLOAT, allowNull: true, defaultValue: 0, field: 'amount_per_hour' },
68
+ percentage: { type: Sequelize.FLOAT, allowNull: true, defaultValue: 0, field: 'percentage' },
69
+ type: {
70
+ type: Sequelize.ENUM('PERCENTAGE', 'HOURLY', 'MONTHLY'),
71
+ allowNull: false
72
+ },
73
+ userId: { type: Sequelize.UUID, allowNull: false, field: 'user_id' },
74
+ instituteId: { type: Sequelize.UUID, allowNull: false, field: 'institute_id' },
75
+ description: {
76
+ type: Sequelize.STRING,
77
+ allowNull: true,
78
+ },
79
+ createdBy: {
80
+ type: Sequelize.UUID,
81
+ allowNull: true,
82
+ field: 'created_by'
83
+ },
84
+ updatedBy: {
85
+ type: Sequelize.UUID,
86
+ allowNull: true,
87
+ field: 'updated_by'
88
+ },
89
+ deletedBy: {
90
+ type: Sequelize.UUID,
91
+ allowNull: true,
92
+ field: 'deleted_by'
93
+ },
94
+ createdAt: {
95
+ type: Sequelize.DATE,
96
+ allowNull: false,
97
+ field: 'created_at'
98
+ },
99
+ updatedAt: {
100
+ type: Sequelize.DATE,
101
+ allowNull: false,
102
+ field: 'updated_at'
103
+ },
104
+ deletedAt: {
105
+ type: Sequelize.DATE,
106
+ allowNull: true,
107
+ field: 'deleted_at'
108
+ },
109
+ };
110
+ for (const column of Object.keys(columnsToAdd)) {
111
+ const columnToAdd = columnsToAdd[column];
112
+ const tableColumn = columnToAdd.field || column;
113
+ if (!tableDefinition[tableColumn]) {
114
+ await queryInterface.addColumn(tableName, tableColumn, columnToAdd);
115
+ }
116
+ }
117
+ }
118
+ };
119
+ const down = async (queryInterface) => {
120
+ const tableName = 'user_payout_details';
121
+ const tableExists = await queryInterface
122
+ .describeTable(tableName)
123
+ .then(() => true)
124
+ .catch(() => false);
125
+ if (tableExists) {
126
+ await queryInterface.dropTable(tableName);
127
+ }
128
+ };
129
+ module.exports = {
130
+ up,
131
+ down,
132
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;
@@ -0,0 +1,206 @@
1
+ "use strict";
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const tableName = 'users';
4
+ const tableExists = await queryInterface
5
+ .describeTable(tableName)
6
+ .then(() => true)
7
+ .catch(() => false);
8
+ if (!tableExists) {
9
+ await queryInterface.createTable(tableName, {
10
+ id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, allowNull: false, primaryKey: true },
11
+ uuid: { type: Sequelize.UUID, allowNull: true },
12
+ firstName: { type: Sequelize.STRING(25), allowNull: false, field: 'first_name' },
13
+ lastName: { type: Sequelize.STRING(25), allowNull: false, field: 'last_name' },
14
+ middleName: { type: Sequelize.STRING(25), allowNull: true, field: 'middle_name' },
15
+ email: { type: Sequelize.STRING(50), allowNull: false },
16
+ mobile: { type: Sequelize.STRING(10), allowNull: true },
17
+ password: { type: Sequelize.STRING, allowNull: true },
18
+ emailVerification: {
19
+ type: Sequelize.STRING(30),
20
+ allowNull: false,
21
+ field: 'email_varification',
22
+ defaultValue: EMAIL_VERIFICATION.PENDING,
23
+ },
24
+ mobileVerification: {
25
+ type: Sequelize.STRING(30),
26
+ allowNull: false,
27
+ field: 'mobile_varification',
28
+ defaultValue: MOBILE_VERIFICATION.PENDING,
29
+ },
30
+ appType: {
31
+ type: Sequelize.ENUM('INSTITUTE_APP', 'SCHOOL_APP', 'GLOBAL_APP', 'STUDENT_APP'),
32
+ allowNull: true,
33
+ field: 'app_type',
34
+ defaultValue: 'INSTITUTE_APP',
35
+ },
36
+ type: { type: Sequelize.STRING(30), allowNull: false },
37
+ globalId: { type: Sequelize.STRING, field: 'global_id', defaultValue: null, allowNull: true },
38
+ address1: { type: Sequelize.STRING, allowNull: true },
39
+ address2: { type: Sequelize.STRING, allowNull: true },
40
+ gender: { type: Sequelize.STRING, allowNull: true },
41
+ dob: { type: Sequelize.STRING, allowNull: true },
42
+ bloodGroup: { type: Sequelize.STRING, allowNull: true, field: 'blood_group' },
43
+ motherTongue: { type: Sequelize.STRING, allowNull: true, field: 'mother_tongue' },
44
+ otherLanguages: { type: Sequelize.STRING, allowNull: true, field: 'other_languages' },
45
+ degree: { type: Sequelize.STRING, allowNull: true },
46
+ college: { type: Sequelize.STRING, allowNull: true },
47
+ passingYear: { type: Sequelize.STRING, allowNull: true, field: 'passing_year' },
48
+ pinCode: { type: Sequelize.STRING, allowNull: true, field: 'pin_code' },
49
+ country: { type: Sequelize.INTEGER, allowNull: true },
50
+ area: { type: Sequelize.STRING, allowNull: true },
51
+ district: { type: Sequelize.STRING, allowNull: true },
52
+ state: { type: Sequelize.INTEGER, allowNull: true },
53
+ city: { type: Sequelize.INTEGER, allowNull: true },
54
+ verificationOtp: { type: Sequelize.STRING(10), allowNull: true, field: 'verification_otp' },
55
+ schoolName: { type: Sequelize.STRING, allowNull: true, field: 'school_name' },
56
+ board: { type: Sequelize.STRING, allowNull: true },
57
+ medium: { type: Sequelize.STRING, allowNull: true },
58
+ standard: { type: Sequelize.STRING, allowNull: true },
59
+ stream: { type: Sequelize.STRING, allowNull: true },
60
+ schoolAddress: { type: Sequelize.STRING, allowNull: true, field: 'school_address' },
61
+ knownAllergies: { type: Sequelize.STRING, allowNull: true, field: 'known_allergies' },
62
+ medications: { type: Sequelize.STRING, allowNull: true, field: 'medications' },
63
+ relation: { type: Sequelize.STRING, allowNull: true },
64
+ createdBy: {
65
+ type: Sequelize.UUID,
66
+ allowNull: true,
67
+ field: 'created_by'
68
+ },
69
+ updatedBy: {
70
+ type: Sequelize.UUID,
71
+ allowNull: true,
72
+ field: 'updated_by'
73
+ },
74
+ deletedBy: {
75
+ type: Sequelize.UUID,
76
+ allowNull: true,
77
+ field: 'deleted_by'
78
+ },
79
+ createdAt: {
80
+ type: Sequelize.DATE,
81
+ allowNull: false,
82
+ field: 'created_at'
83
+ },
84
+ updatedAt: {
85
+ type: Sequelize.DATE,
86
+ allowNull: false,
87
+ field: 'updated_at'
88
+ },
89
+ deletedAt: {
90
+ type: Sequelize.DATE,
91
+ allowNull: true,
92
+ field: 'deleted_at'
93
+ },
94
+ });
95
+ }
96
+ else {
97
+ const tableDefinition = await queryInterface.describeTable(tableName);
98
+ const columnsToAdd = {
99
+ id: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, allowNull: false, primaryKey: true },
100
+ uuid: { type: Sequelize.UUID, allowNull: true },
101
+ firstName: { type: Sequelize.STRING(25), allowNull: false, field: 'first_name' },
102
+ lastName: { type: Sequelize.STRING(25), allowNull: false, field: 'last_name' },
103
+ middleName: { type: Sequelize.STRING(25), allowNull: true, field: 'middle_name' },
104
+ email: { type: Sequelize.STRING(50), allowNull: false },
105
+ mobile: { type: Sequelize.STRING(10), allowNull: true },
106
+ password: { type: Sequelize.STRING, allowNull: true },
107
+ emailVerification: {
108
+ type: Sequelize.STRING(30),
109
+ allowNull: false,
110
+ field: 'email_varification',
111
+ defaultValue: 'PENDING',
112
+ },
113
+ mobileVerification: {
114
+ type: Sequelize.STRING(30),
115
+ allowNull: false,
116
+ field: 'mobile_varification',
117
+ defaultValue: 'PENDING',
118
+ },
119
+ appType: {
120
+ type: Sequelize.ENUM('INSTITUTE_APP', 'SCHOOL_APP', 'GLOBAL_APP', 'STUDENT_APP'),
121
+ allowNull: true,
122
+ field: 'app_type',
123
+ defaultValue: 'INSTITUTE_APP',
124
+ },
125
+ type: { type: Sequelize.STRING(30), allowNull: false },
126
+ globalId: { type: Sequelize.STRING, field: 'global_id', defaultValue: null, allowNull: true },
127
+ address1: { type: Sequelize.STRING, allowNull: true },
128
+ address2: { type: Sequelize.STRING, allowNull: true },
129
+ gender: { type: Sequelize.STRING, allowNull: true },
130
+ dob: { type: Sequelize.STRING, allowNull: true },
131
+ bloodGroup: { type: Sequelize.STRING, allowNull: true, field: 'blood_group' },
132
+ motherTongue: { type: Sequelize.STRING, allowNull: true, field: 'mother_tongue' },
133
+ otherLanguages: { type: Sequelize.STRING, allowNull: true },
134
+ degree: { type: Sequelize.STRING, allowNull: true },
135
+ college: { type: Sequelize.STRING, allowNull: true },
136
+ passingYear: { type: Sequelize.STRING, allowNull: true, field: 'passing_year' },
137
+ pinCode: { type: Sequelize.STRING, allowNull: true, field: 'pin_code' },
138
+ country: { type: Sequelize.INTEGER, allowNull: true },
139
+ area: { type: Sequelize.STRING, allowNull: true },
140
+ district: { type: Sequelize.STRING, allowNull: true },
141
+ state: { type: Sequelize.INTEGER, allowNull: true },
142
+ city: { type: Sequelize.INTEGER, allowNull: true },
143
+ verificationOtp: { type: Sequelize.STRING(10), allowNull: true, field: 'verification_otp' },
144
+ schoolName: { type: Sequelize.STRING, allowNull: true, field: 'school_name' },
145
+ board: { type: Sequelize.STRING, allowNull: true },
146
+ medium: { type: Sequelize.STRING, allowNull: true },
147
+ standard: { type: Sequelize.STRING, allowNull: true },
148
+ stream: { type: Sequelize.STRING, allowNull: true },
149
+ schoolAddress: { type: Sequelize.STRING, allowNull: true, field: 'school_address' },
150
+ knownAllergies: { type: Sequelize.STRING, allowNull: true, field: 'known_allergies' },
151
+ medications: { type: Sequelize.STRING, allowNull: true, field: 'medications' },
152
+ relation: { type: Sequelize.STRING, allowNull: true },
153
+ createdBy: {
154
+ type: Sequelize.UUID,
155
+ allowNull: true,
156
+ field: 'created_by'
157
+ },
158
+ updatedBy: {
159
+ type: Sequelize.UUID,
160
+ allowNull: true,
161
+ field: 'updated_by'
162
+ },
163
+ deletedBy: {
164
+ type: Sequelize.UUID,
165
+ allowNull: true,
166
+ field: 'deleted_by'
167
+ },
168
+ createdAt: {
169
+ type: Sequelize.DATE,
170
+ allowNull: false,
171
+ field: 'created_at'
172
+ },
173
+ updatedAt: {
174
+ type: Sequelize.DATE,
175
+ allowNull: false,
176
+ field: 'updated_at'
177
+ },
178
+ deletedAt: {
179
+ type: Sequelize.DATE,
180
+ allowNull: true,
181
+ field: 'deleted_at'
182
+ },
183
+ };
184
+ for (const column of Object.keys(columnsToAdd)) {
185
+ const columnToAdd = columnsToAdd[column];
186
+ const tableColumn = columnToAdd.field || column;
187
+ if (!tableDefinition[tableColumn]) {
188
+ await queryInterface.addColumn(tableName, tableColumn, columnToAdd);
189
+ }
190
+ }
191
+ }
192
+ };
193
+ const down = async (queryInterface) => {
194
+ const tableName = 'users';
195
+ const tableExists = await queryInterface
196
+ .describeTable(tableName)
197
+ .then(() => true)
198
+ .catch(() => false);
199
+ if (tableExists) {
200
+ await queryInterface.dropTable(tableName);
201
+ }
202
+ };
203
+ module.exports = {
204
+ up,
205
+ down,
206
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;