@kipicore/dbcore 1.1.132 → 1.1.134

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 (35) hide show
  1. package/dist/constants/app.d.ts +2 -1
  2. package/dist/constants/app.js +1 -0
  3. package/dist/constants/errorMessages.d.ts +2 -1
  4. package/dist/constants/errorMessages.js +1 -0
  5. package/dist/db/psql/migrations/20251125045339-income_expense_model.js +4 -4
  6. package/dist/db/psql/migrations/20251205062200-add_ids_subjectHFee.js +0 -11
  7. package/dist/db/psql/migrations/20251210100917-id_add_typemanagement.js +5 -5
  8. package/dist/db/psql/migrations/20251210104353-id_add_floorManagement.js +5 -5
  9. package/dist/db/psql/migrations/20251210113530-id_add_role.js +0 -11
  10. package/dist/db/psql/migrations/20251210122210-id_add_userHasRole.js +0 -11
  11. package/dist/db/psql/migrations/20251211051454-add-acl_id_.d.ts +2 -0
  12. package/dist/db/psql/migrations/20251211051454-add-acl_id_.js +33 -0
  13. package/dist/db/psql/migrations/20251211051744-add-acl_id_subject_has_fee.d.ts +2 -0
  14. package/dist/db/psql/migrations/20251211051744-add-acl_id_subject_has_fee.js +44 -0
  15. package/dist/db/psql/migrations/20251211051953-add-acl_id_user_has_role.d.ts +2 -0
  16. package/dist/db/psql/migrations/20251211051953-add-acl_id_user_has_role.js +33 -0
  17. package/dist/db/psql/migrations/20251211052218-remove_wrong_acl_id.d.ts +1 -0
  18. package/dist/db/psql/migrations/20251211052218-remove_wrong_acl_id.js +18 -0
  19. package/dist/interfaces/incomeExpenseInterface.d.ts +1 -1
  20. package/dist/interfaces/roleInterface.d.ts +1 -1
  21. package/dist/interfaces/subjectIndexInterface.d.ts +1 -1
  22. package/dist/interfaces/typeManagementInterface.d.ts +1 -1
  23. package/dist/interfaces/userHasRoleInterface.d.ts +1 -1
  24. package/dist/models/mongodb/subjectIndexModel.js +1 -1
  25. package/dist/models/psql/incomeExpenseModel.d.ts +1 -1
  26. package/dist/models/psql/incomeExpenseModel.js +6 -6
  27. package/dist/models/psql/roleModel.d.ts +1 -1
  28. package/dist/models/psql/roleModel.js +4 -4
  29. package/dist/models/psql/subjectHasFeeModel.d.ts +1 -1
  30. package/dist/models/psql/subjectHasFeeModel.js +1 -1
  31. package/dist/models/psql/typeManagementModel.d.ts +1 -1
  32. package/dist/models/psql/typeManagementModel.js +6 -6
  33. package/dist/models/psql/userHasRoleModel.d.ts +1 -1
  34. package/dist/models/psql/userHasRoleModel.js +4 -4
  35. package/package.json +1 -1
@@ -257,7 +257,8 @@ export declare enum USER_INSTITUTE_META_STATUS {
257
257
  REJECTED = "REJECTED",
258
258
  LEFT = "LEFT",
259
259
  BLOCKED = "BLOCKED",
260
- SUBSCRIPTION_PLAN_EXPIRED = "SUBSCRIPTION_PLAN_EXPIRED"
260
+ SUBSCRIPTION_PLAN_EXPIRED = "SUBSCRIPTION_PLAN_EXPIRED",
261
+ DRAFT = "DRAFT"
261
262
  }
262
263
  export declare enum EMPLOYMENT_TYPE {
263
264
  PART_TIME = "PART_TIME",
@@ -318,6 +318,7 @@ var USER_INSTITUTE_META_STATUS;
318
318
  USER_INSTITUTE_META_STATUS["LEFT"] = "LEFT";
319
319
  USER_INSTITUTE_META_STATUS["BLOCKED"] = "BLOCKED";
320
320
  USER_INSTITUTE_META_STATUS["SUBSCRIPTION_PLAN_EXPIRED"] = "SUBSCRIPTION_PLAN_EXPIRED";
321
+ USER_INSTITUTE_META_STATUS["DRAFT"] = "DRAFT";
321
322
  })(USER_INSTITUTE_META_STATUS || (exports.USER_INSTITUTE_META_STATUS = USER_INSTITUTE_META_STATUS = {}));
322
323
  var EMPLOYMENT_TYPE;
323
324
  (function (EMPLOYMENT_TYPE) {
@@ -504,7 +504,8 @@ export declare enum USER_INSTITUTE_META_ERROR_MESSAGES {
504
504
  CAN_NOT_UPDATE_BATCH_FOUND = "Cannot update institute data: dependency found between removed data and assigned batch",
505
505
  CAN_NOT_UPDATE_LECTURE_FOUND = "Institute update failed: removed data is linked to an existing lectures",
506
506
  USER_ALREADY_FIL_FROM = "User already filUp form",
507
- CAN_NOT_UPDATE_ENTITY_FOUND = "Institute update failed: removed data is linked to an existing group"
507
+ CAN_NOT_UPDATE_ENTITY_FOUND = "Institute update failed: removed data is linked to an existing group",
508
+ CAN_NOT_LEFT = "User cannot be removed as they hold certain responsibilities."
508
509
  }
509
510
  export declare enum PARENTS_ERROR_MESSAGES {
510
511
  CREATE_FAIL = "Unable to save parents data!",
@@ -553,6 +553,7 @@ var USER_INSTITUTE_META_ERROR_MESSAGES;
553
553
  USER_INSTITUTE_META_ERROR_MESSAGES["CAN_NOT_UPDATE_LECTURE_FOUND"] = "Institute update failed: removed data is linked to an existing lectures";
554
554
  USER_INSTITUTE_META_ERROR_MESSAGES["USER_ALREADY_FIL_FROM"] = "User already filUp form";
555
555
  USER_INSTITUTE_META_ERROR_MESSAGES["CAN_NOT_UPDATE_ENTITY_FOUND"] = "Institute update failed: removed data is linked to an existing group";
556
+ USER_INSTITUTE_META_ERROR_MESSAGES["CAN_NOT_LEFT"] = "User cannot be removed as they hold certain responsibilities.";
556
557
  })(USER_INSTITUTE_META_ERROR_MESSAGES || (exports.USER_INSTITUTE_META_ERROR_MESSAGES = USER_INSTITUTE_META_ERROR_MESSAGES = {}));
557
558
  var PARENTS_ERROR_MESSAGES;
558
559
  (function (PARENTS_ERROR_MESSAGES) {
@@ -18,9 +18,9 @@ const up = async (queryInterface, Sequelize) => {
18
18
  field: 'institute_id',
19
19
  allowNull: true,
20
20
  },
21
- academicCalenderId: {
21
+ academicCalendarId: {
22
22
  type: Sequelize.UUID,
23
- field: 'academic_calender_id',
23
+ field: 'academic_calendar_id',
24
24
  allowNull: true,
25
25
  },
26
26
  type: {
@@ -85,9 +85,9 @@ const up = async (queryInterface, Sequelize) => {
85
85
  field: 'institute_id',
86
86
  allowNull: true,
87
87
  },
88
- academicCalenderId: {
88
+ academicCalendarId: {
89
89
  type: Sequelize.UUID,
90
- field: 'academic_calender_id',
90
+ field: 'academic_calendar_id',
91
91
  allowNull: true,
92
92
  },
93
93
  type: {
@@ -17,14 +17,6 @@ const up = async (queryInterface, Sequelize) => {
17
17
  field: 'batch_type',
18
18
  });
19
19
  }
20
- if (!table.academic_calender_id) {
21
- await queryInterface.addColumn('subject_has_fee', 'academic_calender_id', {
22
- type: Sequelize.UUID,
23
- defaultValue: null,
24
- allowNull: true,
25
- field: 'academic_calender_id',
26
- });
27
- }
28
20
  };
29
21
  const down = async (queryInterface, Sequelize) => {
30
22
  const table = await queryInterface.describeTable('subject_has_fee');
@@ -34,9 +26,6 @@ const down = async (queryInterface, Sequelize) => {
34
26
  if (table.batch_type) {
35
27
  await queryInterface.removeColumn('subject_has_fee', 'batch_type');
36
28
  }
37
- if (table.academic_calender_id) {
38
- await queryInterface.removeColumn('subject_has_fee', 'academic_calender_id');
39
- }
40
29
  };
41
30
  module.exports = {
42
31
  up,
@@ -9,12 +9,12 @@ const up = async (queryInterface, Sequelize) => {
9
9
  field: 'old_id',
10
10
  });
11
11
  }
12
- if (!table.academic_calender_id) {
13
- await queryInterface.addColumn('type_management', 'academic_calender_id', {
12
+ if (!table.academic_calendar_id) {
13
+ await queryInterface.addColumn('type_management', 'academic_calendar_id', {
14
14
  type: Sequelize.UUID,
15
15
  defaultValue: null,
16
16
  allowNull: true,
17
- field: 'academic_calender_id',
17
+ field: 'academic_calendar_id',
18
18
  });
19
19
  }
20
20
  };
@@ -23,8 +23,8 @@ const down = async (queryInterface, Sequelize) => {
23
23
  if (table.old_id) {
24
24
  await queryInterface.removeColumn('type_management', 'old_id');
25
25
  }
26
- if (table.academic_calender_id) {
27
- await queryInterface.removeColumn('type_management', 'academic_calender_id');
26
+ if (table.academic_calendar_id) {
27
+ await queryInterface.removeColumn('type_management', 'academic_calendar_id');
28
28
  }
29
29
  };
30
30
  module.exports = {
@@ -9,12 +9,12 @@ const up = async (queryInterface, Sequelize) => {
9
9
  field: 'old_id',
10
10
  });
11
11
  }
12
- if (!table.academic_calender_id) {
13
- await queryInterface.addColumn('floor_management', 'academic_calender_id', {
12
+ if (!table.academic_calendar_id) {
13
+ await queryInterface.addColumn('floor_management', 'academic_calendar_id', {
14
14
  type: Sequelize.UUID,
15
15
  defaultValue: null,
16
16
  allowNull: true,
17
- field: 'academic_calender_id',
17
+ field: 'academic_calendar_id',
18
18
  });
19
19
  }
20
20
  };
@@ -23,8 +23,8 @@ const down = async (queryInterface, Sequelize) => {
23
23
  if (table.old_id) {
24
24
  await queryInterface.removeColumn('floor_management', 'old_id');
25
25
  }
26
- if (table.academic_calender_id) {
27
- await queryInterface.removeColumn('floor_management', 'academic_calender_id');
26
+ if (table.academic_calendar_id) {
27
+ await queryInterface.removeColumn('floor_management', 'academic_calendar_id');
28
28
  }
29
29
  };
30
30
  module.exports = {
@@ -9,23 +9,12 @@ const up = async (queryInterface, Sequelize) => {
9
9
  field: 'old_id',
10
10
  });
11
11
  }
12
- if (!table.academic_calender_id) {
13
- await queryInterface.addColumn('roles', 'academic_calender_id', {
14
- type: Sequelize.UUID,
15
- defaultValue: null,
16
- allowNull: true,
17
- field: 'academic_calender_id',
18
- });
19
- }
20
12
  };
21
13
  const down = async (queryInterface, Sequelize) => {
22
14
  const table = await queryInterface.describeTable('roles');
23
15
  if (table.old_id) {
24
16
  await queryInterface.removeColumn('roles', 'old_id');
25
17
  }
26
- if (table.academic_calender_id) {
27
- await queryInterface.removeColumn('roles', 'academic_calender_id');
28
- }
29
18
  };
30
19
  module.exports = {
31
20
  up,
@@ -9,23 +9,12 @@ const up = async (queryInterface, Sequelize) => {
9
9
  field: 'old_id',
10
10
  });
11
11
  }
12
- if (!table.academic_calender_id) {
13
- await queryInterface.addColumn('user_has_roles', 'academic_calender_id', {
14
- type: Sequelize.UUID,
15
- defaultValue: null,
16
- allowNull: true,
17
- field: 'academic_calender_id',
18
- });
19
- }
20
12
  };
21
13
  const down = async (queryInterface, Sequelize) => {
22
14
  const table = await queryInterface.describeTable('user_has_roles');
23
15
  if (table.old_id) {
24
16
  await queryInterface.removeColumn('user_has_roles', 'old_id');
25
17
  }
26
- if (table.academic_calender_id) {
27
- await queryInterface.removeColumn('user_has_roles', 'academic_calender_id');
28
- }
29
18
  };
30
19
  module.exports = {
31
20
  up,
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('roles');
4
+ if (!table.old_id) {
5
+ await queryInterface.addColumn('roles', 'old_id', {
6
+ type: Sequelize.UUID,
7
+ defaultValue: null,
8
+ allowNull: true,
9
+ field: 'old_id',
10
+ });
11
+ }
12
+ if (!table.academic_calendar_id) {
13
+ await queryInterface.addColumn('roles', 'academic_calendar_id', {
14
+ type: Sequelize.UUID,
15
+ defaultValue: null,
16
+ allowNull: true,
17
+ field: 'academic_calendar_id',
18
+ });
19
+ }
20
+ };
21
+ const down = async (queryInterface, Sequelize) => {
22
+ const table = await queryInterface.describeTable('roles');
23
+ if (table.old_id) {
24
+ await queryInterface.removeColumn('roles', 'old_id');
25
+ }
26
+ if (table.academic_calendar_id) {
27
+ await queryInterface.removeColumn('roles', 'academic_calendar_id');
28
+ }
29
+ };
30
+ module.exports = {
31
+ up,
32
+ down,
33
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,44 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('subject_has_fee');
4
+ if (!table.batch_id) {
5
+ await queryInterface.addColumn('subject_has_fee', 'batch_id', {
6
+ type: Sequelize.UUID,
7
+ defaultValue: null,
8
+ allowNull: true,
9
+ field: 'batch_id',
10
+ });
11
+ }
12
+ if (!table.batch_type) {
13
+ await queryInterface.addColumn('subject_has_fee', 'batch_type', {
14
+ type: Sequelize.UUID,
15
+ defaultValue: null,
16
+ allowNull: true,
17
+ field: 'batch_type',
18
+ });
19
+ }
20
+ if (!table.academic_calendar_id) {
21
+ await queryInterface.addColumn('subject_has_fee', 'academic_calendar_id', {
22
+ type: Sequelize.UUID,
23
+ defaultValue: null,
24
+ allowNull: true,
25
+ field: 'academic_calendar_id',
26
+ });
27
+ }
28
+ };
29
+ const down = async (queryInterface, Sequelize) => {
30
+ const table = await queryInterface.describeTable('subject_has_fee');
31
+ if (table.batch_id) {
32
+ await queryInterface.removeColumn('subject_has_fee', 'batch_id');
33
+ }
34
+ if (table.batch_type) {
35
+ await queryInterface.removeColumn('subject_has_fee', 'batch_type');
36
+ }
37
+ if (table.academic_calender_id) {
38
+ await queryInterface.removeColumn('subject_has_fee', 'academic_calendar_id');
39
+ }
40
+ };
41
+ module.exports = {
42
+ up,
43
+ down,
44
+ };
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('user_has_roles');
4
+ if (!table.old_id) {
5
+ await queryInterface.addColumn('user_has_roles', 'old_id', {
6
+ type: Sequelize.UUID,
7
+ defaultValue: null,
8
+ allowNull: true,
9
+ field: 'old_id',
10
+ });
11
+ }
12
+ if (!table.academic_calendar_id) {
13
+ await queryInterface.addColumn('user_has_roles', 'academic_calendar_id', {
14
+ type: Sequelize.UUID,
15
+ defaultValue: null,
16
+ allowNull: true,
17
+ field: 'academic_calendar_id',
18
+ });
19
+ }
20
+ };
21
+ const down = async (queryInterface, Sequelize) => {
22
+ const table = await queryInterface.describeTable('user_has_roles');
23
+ if (table.old_id) {
24
+ await queryInterface.removeColumn('user_has_roles', 'old_id');
25
+ }
26
+ if (table.academic_calendar_id) {
27
+ await queryInterface.removeColumn('user_has_roles', 'academic_calendar_id');
28
+ }
29
+ };
30
+ module.exports = {
31
+ up,
32
+ down,
33
+ };
@@ -0,0 +1 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('subject_has_fee');
4
+ if (table.academic_calender_id) {
5
+ await queryInterface.removeColumn('subject_has_fee', 'academic_calender_id');
6
+ }
7
+ const roleTable = await queryInterface.describeTable('roles');
8
+ if (roleTable.academic_calender_id) {
9
+ await queryInterface.removeColumn('roles', 'academic_calender_id');
10
+ }
11
+ const userRoleTable = await queryInterface.describeTable('user_has_roles');
12
+ if (userRoleTable.academic_calender_id) {
13
+ await queryInterface.removeColumn('user_has_roles', 'academic_calender_id');
14
+ }
15
+ };
16
+ module.exports = {
17
+ up,
18
+ };
@@ -4,7 +4,7 @@ export interface IIncomeExpenseModelAttributes extends IDefaultAttributes {
4
4
  id: string;
5
5
  date: Date;
6
6
  instituteId: string;
7
- academicCalenderId: string;
7
+ academicCalendarId: string;
8
8
  amount: number;
9
9
  type: INCOME_EXPENSE_TYPE;
10
10
  source: INCOME_EXPENSE_SOURCE;
@@ -17,7 +17,7 @@ export interface IRoleAttributes extends IDefaultAttributes {
17
17
  appType: APP_TYPE;
18
18
  isInstituteDefault?: boolean;
19
19
  oldId?: string;
20
- academicCalenderId?: string;
20
+ academicCalendarId?: string;
21
21
  }
22
22
  interface IRoleFeatureAction extends TModuleFeatureCreationAttributes {
23
23
  actions: TFeatureActionCreationAttributes[];
@@ -46,6 +46,6 @@ export interface ISubjectIndexModelAttributes extends IDefaultAttributes, Docume
46
46
  assignedUsers?: IAssignedUsersAttributes[];
47
47
  selectedCategoryIds?: string[];
48
48
  courseId?: string;
49
- academicCalenderId?: string;
49
+ academicCalendarId?: string;
50
50
  oldId?: string;
51
51
  }
@@ -8,6 +8,6 @@ export interface ITypeManagementModelAttributes extends IDefaultAttributes {
8
8
  type: TYPE_MANAGEMENT_TYPE;
9
9
  isInstituteDefault?: boolean;
10
10
  isDefault?: boolean;
11
- academicCalenderId?: string;
11
+ academicCalendarId?: string;
12
12
  oldId?: string;
13
13
  }
@@ -11,5 +11,5 @@ export interface IUserHasRoleAttributes extends IDefaultAttributes {
11
11
  createdAt?: Date;
12
12
  updatedAt?: Date;
13
13
  oldId?: string;
14
- academicCalenderId?: string;
14
+ academicCalendarId?: string;
15
15
  }
@@ -224,7 +224,7 @@ const SubjectIndexSchema = new mongoose_1.Schema({
224
224
  type: String,
225
225
  required: false,
226
226
  },
227
- academicCalenderId: {
227
+ academicCalendarId: {
228
228
  type: String,
229
229
  required: false,
230
230
  },
@@ -8,7 +8,7 @@ export declare class IncomeExpenseModel extends Model<IIncomeExpenseModelAttribu
8
8
  source: string;
9
9
  amount: number;
10
10
  instituteId: string;
11
- academicCalenderId: string;
11
+ academicCalendarId: string;
12
12
  static associate(models: any): void;
13
13
  }
14
14
  export default IncomeExpenseModel;
@@ -43,15 +43,15 @@ class IncomeExpenseModel extends sequelize_1.Model {
43
43
  });
44
44
  IncomeExpenseModel.belongsTo(AcademicCalendarModel, {
45
45
  foreignKey: {
46
- name: 'academicCalenderId',
47
- field: 'academic_calender_id',
46
+ name: 'academicCalendarId',
47
+ field: 'academic_calendar_id',
48
48
  },
49
49
  as: 'incomeExpenseAcademicCalender',
50
50
  });
51
51
  AcademicCalendarModel.hasMany(IncomeExpenseModel, {
52
52
  foreignKey: {
53
- name: 'academicCalenderId',
54
- field: 'academic_calender_id',
53
+ name: 'academicCalendarId',
54
+ field: 'academic_calendar_id',
55
55
  },
56
56
  as: 'AcademicCalenderIncomeExpense',
57
57
  });
@@ -70,9 +70,9 @@ IncomeExpenseModel.init({
70
70
  field: 'institute_id',
71
71
  allowNull: true,
72
72
  },
73
- academicCalenderId: {
73
+ academicCalendarId: {
74
74
  type: sequelize_1.DataTypes.UUID,
75
- field: 'academic_calender_id',
75
+ field: 'academic_calendar_id',
76
76
  allowNull: true,
77
77
  },
78
78
  type: {
@@ -13,7 +13,7 @@ declare class RoleModel extends Model<IRoleAttributes, TRoleCreationAttributes>
13
13
  appType: APP_TYPE;
14
14
  isInstituteDefault?: boolean;
15
15
  oldId?: string;
16
- academicCalenderId?: string;
16
+ academicCalendarId?: string;
17
17
  createdBy: string;
18
18
  updatedBy: string;
19
19
  deletedBy: string;
@@ -27,11 +27,11 @@ class RoleModel extends sequelize_1.Model {
27
27
  as: 'childOldRole',
28
28
  });
29
29
  RoleModel.belongsTo(AcademicCalendarModel, {
30
- foreignKey: { name: 'academicCalenderId', allowNull: true, field: 'academic_calender_id' },
30
+ foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
31
31
  as: 'roleAcaCal',
32
32
  });
33
33
  AcademicCalendarModel.hasMany(RoleModel, {
34
- foreignKey: { name: 'academicCalenderId', allowNull: true, field: 'academic_calender_id' },
34
+ foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
35
35
  as: 'AcaCalRole',
36
36
  });
37
37
  }
@@ -86,9 +86,9 @@ RoleModel.init({
86
86
  field: 'old_id',
87
87
  allowNull: true,
88
88
  },
89
- academicCalenderId: {
89
+ academicCalendarId: {
90
90
  type: sequelize_1.DataTypes.UUID,
91
- field: 'academic_calender_id',
91
+ field: 'academic_calendar_id',
92
92
  allowNull: true,
93
93
  }
94
94
  }, {
@@ -6,7 +6,7 @@ declare class SubjectHasFeeModel extends Model<ISubjectHasFeeModelAttributes, TS
6
6
  instituteId: string;
7
7
  subjectId: string;
8
8
  fee: number;
9
- academicCalenderId?: string;
9
+ academicCalendarId?: string;
10
10
  batchId?: string;
11
11
  batchType?: string;
12
12
  oldId?: string;
@@ -106,7 +106,7 @@ SubjectHasFeeModel.init({
106
106
  },
107
107
  academicCalendarId: {
108
108
  type: sequelize_1.DataTypes.UUID,
109
- field: 'academic_calender_id',
109
+ field: 'academic_calendar_id',
110
110
  allowNull: true,
111
111
  },
112
112
  batchId: {
@@ -10,7 +10,7 @@ declare class TypeManagementModel extends Model<ITypeManagementModelAttributes,
10
10
  type: TYPE_MANAGEMENT_TYPE;
11
11
  isInstituteDefault: boolean;
12
12
  isDefault: boolean;
13
- academicCalenderId?: string;
13
+ academicCalendarId?: string;
14
14
  oldId?: string;
15
15
  createdBy: string;
16
16
  updatedBy: string;
@@ -20,15 +20,15 @@ class TypeManagementModel extends sequelize_1.Model {
20
20
  });
21
21
  TypeManagementModel.belongsTo(AcademicCalendarModel, {
22
22
  foreignKey: {
23
- name: 'academicCalenderId',
24
- field: 'academic_calender_id',
23
+ name: 'academicCalendarId',
24
+ field: 'academic_calendar_id',
25
25
  },
26
26
  as: 'typeManagementAcaCal',
27
27
  });
28
28
  AcademicCalendarModel.hasMany(TypeManagementModel, {
29
29
  foreignKey: {
30
- name: 'academicCalenderId',
31
- field: 'academic_calender_id',
30
+ name: 'academicCalendarId',
31
+ field: 'academic_calendar_id',
32
32
  },
33
33
  as: 'AcaCalTypeManagement',
34
34
  });
@@ -141,9 +141,9 @@ TypeManagementModel.init({
141
141
  field: 'is_default',
142
142
  defaultValue: false,
143
143
  },
144
- academicCalenderId: {
144
+ academicCalendarId: {
145
145
  type: sequelize_1.DataTypes.UUID,
146
- field: 'academic_calender_id',
146
+ field: 'academic_calendar_id',
147
147
  allowNull: true,
148
148
  },
149
149
  oldId: {
@@ -9,7 +9,7 @@ declare class UserHasRoleModel extends Model<IUserHasRoleAttributes, TUserHasRol
9
9
  roleId: string;
10
10
  instituteId?: string;
11
11
  oldId?: string;
12
- academicCalenderId?: string;
12
+ academicCalendarId?: string;
13
13
  createdBy?: string;
14
14
  updatedBy?: string;
15
15
  deletedBy?: string;
@@ -27,11 +27,11 @@ class UserHasRoleModel extends sequelize_1.Model {
27
27
  as: 'childUserHRole',
28
28
  });
29
29
  UserHasRoleModel.belongsTo(AcademicCalendarModel, {
30
- foreignKey: { name: 'academicCalenderId', allowNull: true, field: 'academic_calender_id' },
30
+ foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
31
31
  as: 'userHRollAcaCal',
32
32
  });
33
33
  AcademicCalendarModel.hasMany(UserHasRoleModel, {
34
- foreignKey: { name: 'academicCalenderId', allowNull: true, field: 'academic_calender_id' },
34
+ foreignKey: { name: 'academicCalendarId', allowNull: true, field: 'academic_calendar_id' },
35
35
  as: 'acaCalUserHasR',
36
36
  });
37
37
  UserHasRoleModel.belongsTo(UserModel, {
@@ -80,9 +80,9 @@ UserHasRoleModel.init({
80
80
  field: 'old_id',
81
81
  allowNull: true,
82
82
  },
83
- academicCalenderId: {
83
+ academicCalendarId: {
84
84
  type: sequelize_1.DataTypes.UUID,
85
- field: 'academic_calender_id',
85
+ field: 'academic_calendar_id',
86
86
  allowNull: true,
87
87
  },
88
88
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.132",
3
+ "version": "1.1.134",
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",