@kipicore/dbcore 1.1.54 → 1.1.56

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