@kipicore/dbcore 1.1.48 → 1.1.50

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 (62) hide show
  1. package/.sequelizerc +4 -4
  2. package/dist/db/psql/migrations/20241225101052-add-deleted-by-and-deleted-at-fields.d.ts +1 -1
  3. package/dist/db/psql/migrations/20250106070945-add-user-fields-and-deleted-user-fields.d.ts +1 -1
  4. package/dist/db/psql/migrations/20250106080059-add-fields-and-deleted-fields.d.ts +1 -1
  5. package/dist/db/psql/migrations/20250210102846-add-profileImage-coverImage-to-users.d.ts +1 -1
  6. package/dist/db/psql/migrations/20250211071743-add-action-user-has-histroy.d.ts +1 -1
  7. package/dist/db/psql/migrations/20250213140815-add-assignQuantity-user-has-histroy.d.ts +1 -1
  8. package/dist/db/psql/migrations/20250214072626-add-middlename-user.d.ts +1 -1
  9. package/dist/db/psql/migrations/20250224085333-add-apptype-in-user.d.ts +1 -1
  10. package/dist/db/psql/migrations/20250226053006-add-brouchure-in-institute.d.ts +1 -1
  11. package/dist/db/psql/migrations/20250227123530-add-defult-in-fee-reminder.d.ts +1 -1
  12. package/dist/db/psql/migrations/20250304052831-add-institued-in-school-data-clm.d.ts +1 -1
  13. package/dist/db/psql/migrations/20250306053557-add-shifyId-in-batch.d.ts +1 -1
  14. package/dist/db/psql/migrations/20250402090653-add-user-area.d.ts +1 -1
  15. package/dist/db/psql/migrations/20250409105229-add-user-type-in-role.d.ts +1 -1
  16. package/dist/db/psql/migrations/20250417121316-make-institute-id-nullable-in-type-management.d.ts +1 -1
  17. package/dist/db/psql/migrations/20250419071236-fee_histroy_add_school_clm.d.ts +1 -1
  18. package/dist/db/psql/migrations/20250419085334-fee_histroy_add_school_clm.d.ts +1 -1
  19. package/dist/db/psql/migrations/20250421085618-add-entityIds-field-in-announcements.d.ts +1 -1
  20. package/dist/db/psql/migrations/20250422114032-add-account.d.ts +1 -1
  21. package/dist/db/psql/migrations/20250423051841-add-master-leave-clm.d.ts +1 -1
  22. package/dist/db/psql/migrations/20250423093827-update-institued-district.d.ts +1 -1
  23. package/dist/db/psql/migrations/20250424044755-update-fee-history-feeTyps-clm.d.ts +1 -1
  24. package/dist/db/psql/migrations/20250426070309-update-banner-clm-userType.d.ts +1 -1
  25. package/dist/db/psql/migrations/20250505035157-update-fee-collection-clm-add.d.ts +1 -1
  26. package/dist/db/psql/migrations/20250505082924-update-banner-clm.d.ts +1 -1
  27. package/dist/db/psql/migrations/20250505094616-about-as-clm-in-institued.d.ts +1 -1
  28. package/dist/db/psql/migrations/20250506070110-add-dayOfWeek-clm-in-working-model.d.ts +1 -1
  29. package/dist/db/psql/migrations/20250509055920-add-feecollection-isleft-clm.d.ts +1 -1
  30. package/dist/db/psql/migrations/20250513061037-add-techer-clm-batch.d.ts +1 -1
  31. package/dist/db/psql/migrations/20250514101801-add-slotId-workingShif.d.ts +1 -1
  32. package/dist/db/psql/migrations/20250516062917-add-globalId-clm-user-model.d.ts +1 -1
  33. package/dist/db/psql/migrations/20250516063542-add-globalId-clm-institute-model.d.ts +1 -1
  34. package/dist/db/psql/migrations/20250520061231-add-institued_mobile_person_data.d.ts +1 -1
  35. package/dist/db/psql/migrations/20250522044729-add-institued_update_add_2.d.ts +1 -1
  36. package/dist/db/psql/migrations/20250526035543-add-totalQuantity_add_remainingQuantiy_clm_userHasInventoryHistory.d.ts +1 -1
  37. package/dist/db/psql/migrations/20250526093322-add-appType_clm_in_module.d.ts +1 -1
  38. package/dist/db/psql/migrations/20250526094030-add-appType_clm_in_action.d.ts +1 -1
  39. package/dist/db/psql/migrations/20250526094233-add-appType_clm_in_module_features.d.ts +1 -1
  40. package/dist/db/psql/migrations/20250527065001-add-app-type-in-role-model.d.ts +1 -1
  41. package/dist/db/psql/migrations/20250528045906-add-module-type-to-notifications.d.ts +1 -1
  42. package/dist/db/psql/migrations/20250602090331-add-or-update-user-model-medicalHistory.d.ts +1 -1
  43. package/dist/db/psql/migrations/20250602100550-add-planner-sync-status-to-institute.d.ts +1 -1
  44. package/dist/db/psql/migrations/20250603054900-add-clm-for-defult-data-add-or-not-in-ins-model.d.ts +1 -1
  45. package/dist/db/psql/migrations/20250604103905-add-is-institute-default-field-in-role.d.ts +1 -1
  46. package/dist/db/psql/migrations/20250604121051-update-mobile-number-opstion.d.ts +1 -1
  47. package/dist/db/psql/migrations/20250701095321-add-clm-institute-pdfId.d.ts +1 -1
  48. package/dist/db/psql/migrations/20250717092933-add-floor-id-to-class-rooms.d.ts +1 -1
  49. package/dist/db/psql/migrations/20250718121251-add-clm-classroom-typeid.d.ts +1 -1
  50. package/dist/db/psql/migrations/20250721105455-add-clm-classroom-add-classroomnumber.d.ts +1 -1
  51. package/dist/db/psql/migrations/20250723150111-add-clm-batch-slotId.d.ts +1 -1
  52. package/dist/db/psql/migrations/20250804090437-update_ins_in_pdf_id_string_to_uuid.d.ts +1 -1
  53. package/dist/db/psql/migrations/20250805062440-remove_unique_key_into_batch_subject_project_assessments.d.ts +1 -1
  54. package/dist/db/psql/migrations/20250808100700-add_clm_contectFeed_in_ins_givenId.d.ts +1 -1
  55. package/dist/db/psql/migrations/20250908054025-userHasOffer_model_update.d.ts +1 -1
  56. package/dist/db/psql/migrations/20250908054754-offer_in_add_offertype_clm.d.ts +1 -1
  57. package/dist/models/psql/bannerModel.d.ts +19 -18
  58. package/dist/models/psql/bannerModel.js +77 -46
  59. package/dist/models/psql/index.d.ts +102 -0
  60. package/dist/models/psql/index.js +116 -0
  61. package/package.json +8 -3
  62. package/dist/.sequelizerc +0 -13
package/.sequelizerc CHANGED
@@ -3,11 +3,11 @@ const path = require("path");
3
3
  // Export an object with configuration options for Sequelize CLI
4
4
  module.exports = {
5
5
  // Configuration file path for Sequelize
6
- config: path.resolve("configs", "postgresConfig"),
6
+ config: path.resolve("src/configs", "postgresConfig.js"),
7
7
  // Path to the directory where models are stored
8
- "models-path": path.resolve("models", "psql"),
8
+ "models-path": path.resolve("src/models", "psql"),
9
9
  // Set the path to the directory to store seeders
10
- "seeders-path": path.resolve("db/psql", "seeders"),
10
+ "seeders-path": path.resolve("src/db/psql", "seeders"),
11
11
  // Set the path to the directory to store migrations
12
- "migrations-path": path.resolve("db/psql", "migrations"),
12
+ "migrations-path": path.resolve("src/db/psql", "migrations"),
13
13
  };
@@ -1,2 +1,2 @@
1
- declare const _exports: any;
1
+ declare const _exports: import("sequelize-cli").Migration;
2
2
  export = _exports;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,2 +1,2 @@
1
- declare const _exports: any;
1
+ declare const _exports: import("sequelize-cli").Migration;
2
2
  export = _exports;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,2 +1,2 @@
1
- declare const _exports: any;
1
+ declare const _exports: import("sequelize-cli").Migration;
2
2
  export = _exports;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,2 +1,2 @@
1
- declare const _exports: any;
1
+ declare const _exports: import("sequelize-cli").Migration;
2
2
  export = _exports;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,2 +1,2 @@
1
- declare const _exports: any;
1
+ declare const _exports: import("sequelize-cli").Migration;
2
2
  export = _exports;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,2 +1,2 @@
1
- declare const _exports: any;
1
+ declare const _exports: import("sequelize-cli").Migration;
2
2
  export = _exports;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  /** @type {import('sequelize-cli').Migration} */
2
- export const up: any;
2
+ export const up: import("sequelize-cli").Migration;
3
3
  export function down(queryInterface: any): Promise<void>;
@@ -1,24 +1,25 @@
1
1
  import { Model } from 'sequelize';
2
- import { IBankAccountDetailsInterfaceModelAttributes } from '../../interfaces/bankAccountDetailsInterface';
3
- import { TBankAccountDetailsModelCreationAttributes } from '../../types/bankAccountDetailsType';
4
- import { COMMAN_STATUS, BOOLEAN_STATUS } from '../../constants/app';
5
- export declare class BankAccountDetailsModel extends Model<IBankAccountDetailsInterfaceModelAttributes, TBankAccountDetailsModelCreationAttributes> {
2
+ import { IBannerModelAttributes } from '../../interfaces/bannerInterface';
3
+ import { TBannerModelCreationAttributes } from '../../types/bannerType';
4
+ import { BANNER_TYPE, APP_TYPE, COMMAN_STATUS, USER_TYPES } from '../../constants/app';
5
+ declare class BannerModel extends Model<IBannerModelAttributes, TBannerModelCreationAttributes> {
6
6
  id: string;
7
- accountHolderName: string;
8
- bankName: string;
9
- branchName: string;
10
- accountNumber: string;
11
- ifscCode: string;
12
- instituteId: string;
7
+ title?: string;
8
+ subTitle?: string;
9
+ description?: string;
10
+ type: APP_TYPE;
11
+ bannerType: BANNER_TYPE;
12
+ userType?: USER_TYPES;
13
13
  status: COMMAN_STATUS;
14
- isDefault: BOOLEAN_STATUS;
15
- isSelfAccount: BOOLEAN_STATUS;
16
- createdBy?: string;
17
- updatedBy?: string;
18
- deletedBy?: string;
14
+ fileStorageId: string;
15
+ instituteId: string;
16
+ fileUrl?: string;
17
+ createdBy: string;
18
+ updatedBy: string;
19
+ deletedBy: string;
19
20
  readonly createdAt: Date;
21
+ readonly deletedAt: string;
20
22
  readonly updatedAt: Date;
21
- readonly deletedAt?: string;
22
- static associate(models: any): void;
23
+ static associate(): void;
23
24
  }
24
- export default BankAccountDetailsModel;
25
+ export default BannerModel;
@@ -1,88 +1,119 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BankAccountDetailsModel = void 0;
4
6
  const sequelize_1 = require("sequelize");
5
7
  const index_1 = require("./index");
6
8
  const app_1 = require("../../constants/app");
7
- class BankAccountDetailsModel extends sequelize_1.Model {
8
- static associate(models) {
9
- const { InstituteModel, UserModel } = models;
10
- BankAccountDetailsModel.belongsTo(InstituteModel, {
11
- foreignKey: { name: 'instituteId', field: 'institute_id' },
12
- as: 'bankAccountDetailsInstitute',
9
+ const instituteModel_1 = __importDefault(require("./instituteModel"));
10
+ const fileStorageModel_1 = __importDefault(require("./fileStorageModel"));
11
+ const userModel_1 = __importDefault(require("./userModel"));
12
+ class BannerModel extends sequelize_1.Model {
13
+ static associate() {
14
+ BannerModel.belongsTo(instituteModel_1.default, {
15
+ foreignKey: {
16
+ name: 'instituteId',
17
+ field: 'institute_id',
18
+ },
19
+ as: 'bannerInstitute',
13
20
  });
14
- InstituteModel.hasMany(BankAccountDetailsModel, {
21
+ BannerModel.belongsTo(fileStorageModel_1.default, {
22
+ foreignKey: {
23
+ name: 'fileStorageId',
24
+ field: 'file_storage_id',
25
+ },
26
+ as: 'bannerFileStorage',
27
+ });
28
+ instituteModel_1.default.hasMany(BannerModel, {
15
29
  foreignKey: 'instituteId',
16
- as: 'instituteHasBankAccountDetails',
30
+ as: 'instituteHasBanners',
31
+ });
32
+ fileStorageModel_1.default.hasMany(BannerModel, {
33
+ foreignKey: 'fileStorageId',
17
34
  });
18
- BankAccountDetailsModel.belongsTo(UserModel, {
19
- foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
35
+ BannerModel.belongsTo(userModel_1.default, {
36
+ foreignKey: {
37
+ name: 'createdBy',
38
+ allowNull: true,
39
+ field: 'created_by',
40
+ },
20
41
  as: 'createdByUser',
21
42
  });
22
- BankAccountDetailsModel.belongsTo(UserModel, {
23
- foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
43
+ BannerModel.belongsTo(userModel_1.default, {
44
+ foreignKey: {
45
+ name: 'updatedBy',
46
+ allowNull: true,
47
+ field: 'updated_by',
48
+ },
24
49
  as: 'updatedByUser',
25
50
  });
26
- BankAccountDetailsModel.belongsTo(UserModel, {
27
- foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
51
+ BannerModel.belongsTo(userModel_1.default, {
52
+ foreignKey: {
53
+ name: 'deletedBy',
54
+ allowNull: true,
55
+ field: 'deleted_by',
56
+ },
28
57
  as: 'deletedByUser',
29
58
  });
30
59
  }
31
60
  }
32
- exports.BankAccountDetailsModel = BankAccountDetailsModel;
33
- BankAccountDetailsModel.init({
61
+ BannerModel.init({
34
62
  id: {
35
63
  type: sequelize_1.DataTypes.UUID,
36
64
  defaultValue: sequelize_1.DataTypes.UUIDV4,
37
65
  allowNull: false,
38
66
  primaryKey: true,
39
67
  },
40
- accountHolderName: {
68
+ title: {
41
69
  type: sequelize_1.DataTypes.STRING(500),
42
- allowNull: false,
70
+ allowNull: true,
43
71
  },
44
- bankName: {
72
+ subTitle: {
45
73
  type: sequelize_1.DataTypes.STRING(500),
46
- allowNull: false,
74
+ allowNull: true,
47
75
  },
48
- branchName: {
49
- type: sequelize_1.DataTypes.STRING(100),
50
- allowNull: false,
76
+ description: {
77
+ type: sequelize_1.DataTypes.STRING(1000),
78
+ allowNull: true,
51
79
  },
52
- accountNumber: {
80
+ fileUrl: {
53
81
  type: sequelize_1.DataTypes.STRING,
82
+ allowNull: true,
83
+ },
84
+ type: {
85
+ type: sequelize_1.DataTypes.ENUM(...Object.values(app_1.APP_TYPE)),
54
86
  allowNull: false,
87
+ defaultValue: app_1.APP_TYPE.INSTITUTE_APP,
55
88
  },
56
- ifscCode: {
57
- type: sequelize_1.DataTypes.STRING,
89
+ userType: {
90
+ type: sequelize_1.DataTypes.ENUM(...Object.values(app_1.USER_TYPES)),
91
+ field: 'user_type',
92
+ allowNull: true,
93
+ defaultValue: null,
94
+ },
95
+ bannerType: {
96
+ type: sequelize_1.DataTypes.ENUM(...Object.values(app_1.BANNER_TYPE)),
58
97
  allowNull: false,
98
+ defaultValue: app_1.BANNER_TYPE.BANNER_IMAGE,
59
99
  },
60
- instituteId: {
100
+ fileStorageId: {
61
101
  type: sequelize_1.DataTypes.UUID,
62
102
  allowNull: false,
63
103
  },
64
104
  status: {
65
- type: sequelize_1.DataTypes.ENUM,
66
- values: Object.values(app_1.COMMAN_STATUS),
67
- allowNull: false,
68
- defaultValue: app_1.COMMAN_STATUS.ACTIVE,
69
- },
70
- isDefault: {
71
- type: sequelize_1.DataTypes.ENUM,
72
- values: Object.values(app_1.BOOLEAN_STATUS),
105
+ type: sequelize_1.DataTypes.ENUM(...Object.values(app_1.COMMAN_STATUS)),
73
106
  allowNull: false,
74
- defaultValue: app_1.BOOLEAN_STATUS.NO,
107
+ defaultValue: app_1.COMMAN_STATUS.INACTIVE,
75
108
  },
76
- isSelfAccount: {
77
- type: sequelize_1.DataTypes.ENUM,
78
- values: Object.values(app_1.BOOLEAN_STATUS),
79
- allowNull: false,
80
- defaultValue: app_1.BOOLEAN_STATUS.NO,
109
+ instituteId: {
110
+ type: sequelize_1.DataTypes.UUID,
111
+ allowNull: true,
81
112
  },
82
113
  }, {
83
- modelName: 'BankAccountDetailsModel',
84
- tableName: 'bank_account_details',
85
- timestamps: true,
86
114
  sequelize: index_1.sequelize,
115
+ modelName: 'BannerModel',
116
+ tableName: 'banners',
117
+ timestamps: true,
87
118
  });
88
- exports.default = BankAccountDetailsModel;
119
+ exports.default = BannerModel;
@@ -2,3 +2,105 @@ import { Sequelize } from 'sequelize';
2
2
  declare const db: any;
3
3
  declare const sequelize: Sequelize;
4
4
  export { sequelize, db, Sequelize };
5
+ /*************Models ***************/
6
+ export * from './SubCategoriesModel';
7
+ export * from './academicCalendarModel';
8
+ export * from './accountHasReceiptDetailsModel';
9
+ export * from './announcementModel';
10
+ export * from './areaModel';
11
+ export * from './bankAccountDetailsModel';
12
+ export * from './bannerModel';
13
+ export * from './batchModel';
14
+ export * from './batchSubjectBookAssessmentModel';
15
+ export * from './batchSubjectProjectAssessmentModel';
16
+ export * from './bookAssessmentDateModel';
17
+ export * from './categoriesModel';
18
+ export * from './cityModel';
19
+ export * from './classRoomModel';
20
+ export * from './cloudStorageModel';
21
+ export * from './coinPurchaseOfferModel';
22
+ export * from './contactFeedBackModel';
23
+ export * from './countryModel';
24
+ export * from './courseHasVisitorsModel';
25
+ export * from './courseModel';
26
+ export * from './driverModel';
27
+ export * from './entityGroupModel';
28
+ export * from './facilityModel';
29
+ export * from './featureActionModel';
30
+ export * from './feeHistoryDetailsModel';
31
+ export * from './feeHistoryModel';
32
+ export * from './feeReminderModel';
33
+ export * from './feeReminderSettingModel';
34
+ export * from './feeTypeHasTermsModel';
35
+ export * from './feeTypeModel';
36
+ export * from './feesCollectionModel';
37
+ export * from './fileStorageModel';
38
+ export * from './floorManagementModel';
39
+ export * from './greetingsModel';
40
+ export * from './homeWorkModel';
41
+ export * from './instituteEntityModel';
42
+ export * from './instituteEntityTypeModel';
43
+ export * from './instituteModel';
44
+ export * from './instituteSubscriptionPlanModel';
45
+ export * from './inventoryHistoryModel';
46
+ export * from './inventoryModel';
47
+ export * from './lectureHistoryModel';
48
+ export * from './lectureModel';
49
+ export * from './masterLeaveModel';
50
+ export * from './moduleFeatureModel';
51
+ export * from './moduleModel';
52
+ export * from './offerModel';
53
+ export * from './paymentTermsModel';
54
+ export * from './pdcChequeModel';
55
+ export * from './pdcHistoryModel';
56
+ export * from './pincodeModel';
57
+ export * from './productModel';
58
+ export * from './projectAssessmentOptionModel';
59
+ export * from './roleModel';
60
+ export * from './rulesRegulationModel';
61
+ export * from './schoolFeeCollectionModel';
62
+ export * from './schoolOfferModel';
63
+ export * from './sendNotificationModel';
64
+ export * from './slotModel';
65
+ export * from './stateModel';
66
+ export * from './subjectHasFeeModel';
67
+ export * from './subjectHasPayFeeHistoryModel';
68
+ export * from './syllabusModel';
69
+ export * from './testimonialModel';
70
+ export * from './toDoModel';
71
+ export * from './tokenModel';
72
+ export * from './tripModel';
73
+ export * from './typeManagementModel';
74
+ export * from './userBookAssessmentModel';
75
+ export * from './userFeeTypeByAccountModel';
76
+ export * from './userFeeTypeModel';
77
+ export * from './userHasAnnouncementModel';
78
+ export * from './userHasBatchModel';
79
+ export * from './userHasCourseModel';
80
+ export * from './userHasDeviceModel';
81
+ export * from './userHasFeeTermsModel';
82
+ export * from './userHasFileModel';
83
+ export * from './userHasHomeWorkModel';
84
+ export * from './userHasInventoryHistoryModel';
85
+ export * from './userHasInventoryModel';
86
+ export * from './userHasLeaveHistoryModel';
87
+ export * from './userHasLeaveModel';
88
+ export * from './userHasOfferModel';
89
+ export * from './userHasParentModel';
90
+ export * from './userHasRoleModel';
91
+ export * from './userHasRollNumberModel';
92
+ export * from './userHasStorageModel';
93
+ export * from './userHasSubjectFeeModel';
94
+ export * from './userLeaveRequestModel';
95
+ export * from './userModel';
96
+ export * from './userPayoutDetailsModel';
97
+ export * from './userPayoutHistoryModel';
98
+ export * from './userPayoutModel';
99
+ export * from './userProjectAssessmentOptionModel';
100
+ export * from './userRequiredStepsModel';
101
+ export * from './vehicleModel';
102
+ export * from './vendorManagementModel';
103
+ export * from './walletHistoryModel';
104
+ export * from './walletModel';
105
+ export * from './workingDayModel';
106
+ export * from './workingShiftModel';
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
18
  };
@@ -98,3 +112,105 @@ sequelize.addHook('beforeFind', async (options) => {
98
112
  options.raw = false;
99
113
  }
100
114
  });
115
+ /*************Models ***************/
116
+ __exportStar(require("./SubCategoriesModel"), exports);
117
+ __exportStar(require("./academicCalendarModel"), exports);
118
+ __exportStar(require("./accountHasReceiptDetailsModel"), exports);
119
+ __exportStar(require("./announcementModel"), exports);
120
+ __exportStar(require("./areaModel"), exports);
121
+ __exportStar(require("./bankAccountDetailsModel"), exports);
122
+ __exportStar(require("./bannerModel"), exports);
123
+ __exportStar(require("./batchModel"), exports);
124
+ __exportStar(require("./batchSubjectBookAssessmentModel"), exports);
125
+ __exportStar(require("./batchSubjectProjectAssessmentModel"), exports);
126
+ __exportStar(require("./bookAssessmentDateModel"), exports);
127
+ __exportStar(require("./categoriesModel"), exports);
128
+ __exportStar(require("./cityModel"), exports);
129
+ __exportStar(require("./classRoomModel"), exports);
130
+ __exportStar(require("./cloudStorageModel"), exports);
131
+ __exportStar(require("./coinPurchaseOfferModel"), exports);
132
+ __exportStar(require("./contactFeedBackModel"), exports);
133
+ __exportStar(require("./countryModel"), exports);
134
+ __exportStar(require("./courseHasVisitorsModel"), exports);
135
+ __exportStar(require("./courseModel"), exports);
136
+ __exportStar(require("./driverModel"), exports);
137
+ __exportStar(require("./entityGroupModel"), exports);
138
+ __exportStar(require("./facilityModel"), exports);
139
+ __exportStar(require("./featureActionModel"), exports);
140
+ __exportStar(require("./feeHistoryDetailsModel"), exports);
141
+ __exportStar(require("./feeHistoryModel"), exports);
142
+ __exportStar(require("./feeReminderModel"), exports);
143
+ __exportStar(require("./feeReminderSettingModel"), exports);
144
+ __exportStar(require("./feeTypeHasTermsModel"), exports);
145
+ __exportStar(require("./feeTypeModel"), exports);
146
+ __exportStar(require("./feesCollectionModel"), exports);
147
+ __exportStar(require("./fileStorageModel"), exports);
148
+ __exportStar(require("./floorManagementModel"), exports);
149
+ __exportStar(require("./greetingsModel"), exports);
150
+ __exportStar(require("./homeWorkModel"), exports);
151
+ __exportStar(require("./instituteEntityModel"), exports);
152
+ __exportStar(require("./instituteEntityTypeModel"), exports);
153
+ __exportStar(require("./instituteModel"), exports);
154
+ __exportStar(require("./instituteSubscriptionPlanModel"), exports);
155
+ __exportStar(require("./inventoryHistoryModel"), exports);
156
+ __exportStar(require("./inventoryModel"), exports);
157
+ __exportStar(require("./lectureHistoryModel"), exports);
158
+ __exportStar(require("./lectureModel"), exports);
159
+ __exportStar(require("./masterLeaveModel"), exports);
160
+ __exportStar(require("./moduleFeatureModel"), exports);
161
+ __exportStar(require("./moduleModel"), exports);
162
+ __exportStar(require("./offerModel"), exports);
163
+ __exportStar(require("./paymentTermsModel"), exports);
164
+ __exportStar(require("./pdcChequeModel"), exports);
165
+ __exportStar(require("./pdcHistoryModel"), exports);
166
+ __exportStar(require("./pincodeModel"), exports);
167
+ __exportStar(require("./productModel"), exports);
168
+ __exportStar(require("./projectAssessmentOptionModel"), exports);
169
+ __exportStar(require("./roleModel"), exports);
170
+ __exportStar(require("./rulesRegulationModel"), exports);
171
+ __exportStar(require("./schoolFeeCollectionModel"), exports);
172
+ __exportStar(require("./schoolOfferModel"), exports);
173
+ __exportStar(require("./sendNotificationModel"), exports);
174
+ __exportStar(require("./slotModel"), exports);
175
+ __exportStar(require("./stateModel"), exports);
176
+ __exportStar(require("./subjectHasFeeModel"), exports);
177
+ __exportStar(require("./subjectHasPayFeeHistoryModel"), exports);
178
+ __exportStar(require("./syllabusModel"), exports);
179
+ __exportStar(require("./testimonialModel"), exports);
180
+ __exportStar(require("./toDoModel"), exports);
181
+ __exportStar(require("./tokenModel"), exports);
182
+ __exportStar(require("./tripModel"), exports);
183
+ __exportStar(require("./typeManagementModel"), exports);
184
+ __exportStar(require("./userBookAssessmentModel"), exports);
185
+ __exportStar(require("./userFeeTypeByAccountModel"), exports);
186
+ __exportStar(require("./userFeeTypeModel"), exports);
187
+ __exportStar(require("./userHasAnnouncementModel"), exports);
188
+ __exportStar(require("./userHasBatchModel"), exports);
189
+ __exportStar(require("./userHasCourseModel"), exports);
190
+ __exportStar(require("./userHasDeviceModel"), exports);
191
+ __exportStar(require("./userHasFeeTermsModel"), exports);
192
+ __exportStar(require("./userHasFileModel"), exports);
193
+ __exportStar(require("./userHasHomeWorkModel"), exports);
194
+ __exportStar(require("./userHasInventoryHistoryModel"), exports);
195
+ __exportStar(require("./userHasInventoryModel"), exports);
196
+ __exportStar(require("./userHasLeaveHistoryModel"), exports);
197
+ __exportStar(require("./userHasLeaveModel"), exports);
198
+ __exportStar(require("./userHasOfferModel"), exports);
199
+ __exportStar(require("./userHasParentModel"), exports);
200
+ __exportStar(require("./userHasRoleModel"), exports);
201
+ __exportStar(require("./userHasRollNumberModel"), exports);
202
+ __exportStar(require("./userHasStorageModel"), exports);
203
+ __exportStar(require("./userHasSubjectFeeModel"), exports);
204
+ __exportStar(require("./userLeaveRequestModel"), exports);
205
+ __exportStar(require("./userModel"), exports);
206
+ __exportStar(require("./userPayoutDetailsModel"), exports);
207
+ __exportStar(require("./userPayoutHistoryModel"), exports);
208
+ __exportStar(require("./userPayoutModel"), exports);
209
+ __exportStar(require("./userProjectAssessmentOptionModel"), exports);
210
+ __exportStar(require("./userRequiredStepsModel"), exports);
211
+ __exportStar(require("./vehicleModel"), exports);
212
+ __exportStar(require("./vendorManagementModel"), exports);
213
+ __exportStar(require("./walletHistoryModel"), exports);
214
+ __exportStar(require("./walletModel"), exports);
215
+ __exportStar(require("./workingDayModel"), exports);
216
+ __exportStar(require("./workingShiftModel"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.48",
3
+ "version": "1.1.50",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,10 @@
18
18
  "prebuild": "npm run clean",
19
19
  "lint": "eslint \"src/**/*.ts\"",
20
20
  "test": "npm run build && tsd",
21
- "postbuild": "cp .sequelizerc dist/"
21
+ "pgdb:migrate": "sequelize db:migrate",
22
+ "pgdb:migrate:undo": "sequelize db:migrate:undo",
23
+ "pgdb:seed:all": "sequelize db:seed:all",
24
+ "pgdb:seed:all:undo": "sequelize db:seed:undo:all"
22
25
  },
23
26
  "keywords": [
24
27
  "postgres",
@@ -49,7 +52,9 @@
49
52
  "@types/node": "^24.5.2",
50
53
  "@types/sequelize": "^4.28.14",
51
54
  "typescript": "^5.5.4",
52
- "prettier": "^3.3.3"
55
+ "prettier": "^3.3.3",
56
+ "sequelize-cli": "^6.6.2",
57
+ "country-state-city": "^3.2.1"
53
58
  },
54
59
  "files": [
55
60
  "dist",
package/dist/.sequelizerc DELETED
@@ -1,13 +0,0 @@
1
- // Import the path module to work with file paths
2
- const path = require("path");
3
- // Export an object with configuration options for Sequelize CLI
4
- module.exports = {
5
- // Configuration file path for Sequelize
6
- config: path.resolve("configs", "postgresConfig"),
7
- // Path to the directory where models are stored
8
- "models-path": path.resolve("models", "psql"),
9
- // Set the path to the directory to store seeders
10
- "seeders-path": path.resolve("db/psql", "seeders"),
11
- // Set the path to the directory to store migrations
12
- "migrations-path": path.resolve("db/psql", "migrations"),
13
- };