@kipicore/dbcore 1.1.214 → 1.1.216

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.
@@ -174,3 +174,4 @@ export * from './classRoomCollectionInterface';
174
174
  export * from './penaltyInterface';
175
175
  export * from './userHasPenaltyInterface';
176
176
  export * from './studentFeeTermsInterface';
177
+ export * from './feeType1Interface';
@@ -190,3 +190,4 @@ __exportStar(require("./classRoomCollectionInterface"), exports);
190
190
  __exportStar(require("./penaltyInterface"), exports);
191
191
  __exportStar(require("./userHasPenaltyInterface"), exports);
192
192
  __exportStar(require("./studentFeeTermsInterface"), exports);
193
+ __exportStar(require("./feeType1Interface"), exports);
@@ -41,7 +41,7 @@ const app_1 = require("../../constants/app");
41
41
  const errorMessages_1 = require("../../constants/errorMessages");
42
42
  const instituteModel_1 = __importDefault(require("../psql/instituteModel"));
43
43
  const userInstituteMetaModel_1 = __importDefault(require("./userInstituteMetaModel"));
44
- const feeTypeModel_1 = __importDefault(require("../psql/feeTypeModel"));
44
+ const feeType1Model_1 = __importDefault(require("../psql/feeType1Model"));
45
45
  const termsSchema = new mongoose_1.Schema({
46
46
  date: {
47
47
  type: Date,
@@ -199,7 +199,7 @@ schoolFee1Schema.pre('save', async function (next) {
199
199
  // };
200
200
  for (const fee of schoolFee1.fees) {
201
201
  if (fee.feeTypeId) {
202
- const feeType = await feeTypeModel_1.default.findByPk(fee.feeTypeId);
202
+ const feeType = await feeType1Model_1.default.findByPk(fee.feeTypeId);
203
203
  if (!feeType)
204
204
  return next(new Error(errorMessages_1.FEE_TYPE_ERROR_MESSAGES.NOT_FOUND));
205
205
  }
@@ -123,3 +123,4 @@ export { default as ClassRoomCollectionModel } from './classRoomCollectionModel'
123
123
  export { default as PenaltyModel } from './penaltyModel';
124
124
  export { default as UserHasPenaltyModel } from './userHasPenaltyModel';
125
125
  export { default as StudentFeeTermsModel } from './studentFeeTermsModel';
126
+ export { default as FeeType1Model } from './feeType1Model';
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.OfferModel = exports.ModuleModel = exports.ModuleFeatureModel = exports.MasterLeaveModel = exports.LectureModel = exports.LectureHistoryModel = exports.InventoryModel = exports.InventoryHistoryModel = exports.InstituteSubscriptionPlanModel = exports.InstituteModel = exports.InstituteEntityTypeModel = exports.InstituteEntityModel = exports.HomeWorkModel = exports.GreetingsModel = exports.FloorManagementModel = exports.FileStorageModel = exports.FeesCollectionModel = exports.FeeTypeModel = exports.FeeTypeHasTermsModel = exports.FeeReminderSettingModel = exports.FeeReminderModel = exports.FeeHistoryModel = exports.FeeHistoryDetailsModel = exports.FeatureActionModel = exports.FacilityModel = exports.EntityGroupModel = exports.DriverModel = exports.CourseModel = exports.CourseHasVisitorsModel = exports.CountryModel = exports.ContactFeedBackModel = exports.CoinPurchaseOfferModel = exports.CloudStorageModel = exports.ClassRoomModel = exports.CityModel = exports.CategoriesModel = exports.BookAssessmentDateModel = exports.BatchSubjectProjectAssessmentModel = exports.BatchSubjectBookAssessmentModel = exports.BatchModel = exports.BannerModel = exports.BankAccountDetailsModel = exports.AreaModel = exports.AnnouncementModel = exports.AccountHasReceiptDetailsModel = exports.AcademicCalendarModel = exports.SubCategoriesModel = exports.Sequelize = exports.db = exports.sequelize = void 0;
7
7
  exports.VendorManagementModel = exports.VehicleModel = exports.UserRequiredStepsModel = exports.UserProjectAssessmentOptionModel = exports.UserPayoutModel = exports.UserPayoutHistoryModel = exports.UserPayoutDetailsModel = exports.UserModel = exports.UserLeaveRequestModel = exports.UserHasSubjectFeeModel = exports.UserHasStorageModel = exports.UserHasRollNumberModel = exports.UserHasRoleModel = exports.UserHasParentModel = exports.UserHasOfferModel = exports.UserHasLeaveModel = exports.UserHasLeaveHistoryModel = exports.UserHasInventoryModel = exports.UserHasInventoryHistoryModel = exports.UserHasHomeWorkModel = exports.UserHasFileModel = exports.UserHasFeeTermsModel = exports.UserHasDeviceModel = exports.UserHasCourseModel = exports.UserHasBatchModel = exports.UserHasAnnouncementModel = exports.UserFeeTypeModel = exports.UserFeeTypeByAccountModel = exports.UserBookAssessmentModel = exports.TypeManagementModel = exports.TripModel = exports.TokenModel = exports.ToDoModel = exports.TestimonialModel = exports.SyllabusModel = exports.SubjectHasPayFeeHistoryModel = exports.SubjectHasFeeModel = exports.StateModel = exports.SlotModel = exports.SendNotificationModel = exports.SchoolOfferModel = exports.SchoolFeeCollectionModel = exports.RulesRegulationModel = exports.RoleModel = exports.ProjectAssessmentOptionModel = exports.ProductModel = exports.PincodeModel = exports.PdcHistoryModel = exports.PdcChequeModel = exports.PaymentTermsModel = void 0;
8
- exports.StudentFeeTermsModel = exports.UserHasPenaltyModel = exports.PenaltyModel = exports.ClassRoomCollectionModel = exports.ClassRoomEventModel = exports.StudentFeeTypeCollectionModel = exports.SchoolFeeTermsModel = exports.StudentFeeHistoryModel = exports.StudentFeeCollectionModel = exports.UserDirectoryModel = exports.StudentLeaveRequestModel = exports.CloneListModel = exports.IncomeExpenseModel = exports.MaintenanceModel = exports.AdvertisementModel = exports.WorkOffDaysModel = exports.EntityWiseCalendarModel = exports.CampusModel = exports.LostFoundItemModel = exports.WorkingShiftModel = exports.WorkingDayModel = exports.WalletModel = exports.WalletHistoryModel = void 0;
8
+ exports.FeeType1Model = exports.StudentFeeTermsModel = exports.UserHasPenaltyModel = exports.PenaltyModel = exports.ClassRoomCollectionModel = exports.ClassRoomEventModel = exports.StudentFeeTypeCollectionModel = exports.SchoolFeeTermsModel = exports.StudentFeeHistoryModel = exports.StudentFeeCollectionModel = exports.UserDirectoryModel = exports.StudentLeaveRequestModel = exports.CloneListModel = exports.IncomeExpenseModel = exports.MaintenanceModel = exports.AdvertisementModel = exports.WorkOffDaysModel = exports.EntityWiseCalendarModel = exports.CampusModel = exports.LostFoundItemModel = exports.WorkingShiftModel = exports.WorkingDayModel = exports.WalletModel = exports.WalletHistoryModel = void 0;
9
9
  /* eslint-disable @typescript-eslint/no-explicit-any */
10
10
  const sequelize_1 = require("sequelize");
11
11
  Object.defineProperty(exports, "Sequelize", { enumerable: true, get: function () { return sequelize_1.Sequelize; } });
@@ -341,3 +341,5 @@ var userHasPenaltyModel_1 = require("./userHasPenaltyModel");
341
341
  Object.defineProperty(exports, "UserHasPenaltyModel", { enumerable: true, get: function () { return __importDefault(userHasPenaltyModel_1).default; } });
342
342
  var studentFeeTermsModel_1 = require("./studentFeeTermsModel");
343
343
  Object.defineProperty(exports, "StudentFeeTermsModel", { enumerable: true, get: function () { return __importDefault(studentFeeTermsModel_1).default; } });
344
+ var feeType1Model_1 = require("./feeType1Model");
345
+ Object.defineProperty(exports, "FeeType1Model", { enumerable: true, get: function () { return __importDefault(feeType1Model_1).default; } });
@@ -44,14 +44,14 @@ class StudentFeeCollectionModel extends sequelize_1.Model {
44
44
  foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id', allowNull: true },
45
45
  as: 'collectionHasCalendar',
46
46
  });
47
- StudentFeeCollectionModel.belongsTo(StudentFeeCollectionModel, {
48
- foreignKey: { name: 'oldId', field: 'old_id', allowNull: true },
49
- as: 'oldCollection',
50
- });
51
- StudentFeeCollectionModel.hasMany(StudentFeeCollectionModel, {
52
- foreignKey: { name: 'oldId', field: 'old_id', allowNull: true },
53
- as: 'collectionHasOldCollection',
54
- });
47
+ // StudentFeeCollectionModel.belongsTo(StudentFeeCollectionModel, {
48
+ // foreignKey: { name: 'oldId', field: 'old_id', allowNull: true },
49
+ // as: 'oldCollection',
50
+ // });
51
+ // StudentFeeCollectionModel.hasMany(StudentFeeCollectionModel, {
52
+ // foreignKey: { name: 'oldId', field: 'old_id', allowNull: true },
53
+ // as: 'collectionHasOldCollection',
54
+ // });
55
55
  StudentFeeCollectionModel.belongsTo(UserModel, {
56
56
  foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
57
57
  as: 'createdByUser',
@@ -6,7 +6,7 @@ const index_1 = require("./index");
6
6
  const constants_1 = require("../../constants");
7
7
  class StudentFeeHistoryModel extends sequelize_1.Model {
8
8
  static associate(models) {
9
- const { UserModel, InstituteModel, StudentFeeCollectionModel, FileStorageModel, BankAccountDetailsModel, AcademicCalendarModel, FeeTypeModel, BatchModel, InstituteEntityModel, } = models;
9
+ const { UserModel, InstituteModel, StudentFeeCollectionModel, FileStorageModel, BankAccountDetailsModel, AcademicCalendarModel, FeeType1Model, BatchModel, InstituteEntityModel, } = models;
10
10
  StudentFeeHistoryModel.belongsTo(StudentFeeCollectionModel, {
11
11
  foreignKey: { name: 'studentFeeCollectionId', field: 'student_fee_collection_id', allowNull: true },
12
12
  as: 'feeHistoryCollection',
@@ -63,11 +63,11 @@ class StudentFeeHistoryModel extends sequelize_1.Model {
63
63
  foreignKey: { name: 'academicCalendarId', field: 'academic_calendar_id' },
64
64
  as: 'acaCalStudentFeeHistory',
65
65
  });
66
- StudentFeeHistoryModel.belongsTo(FeeTypeModel, {
66
+ StudentFeeHistoryModel.belongsTo(FeeType1Model, {
67
67
  foreignKey: { name: 'feeTypeId', field: 'feeType_id' },
68
68
  as: 'studentFeeHistoryFeeType',
69
69
  });
70
- FeeTypeModel.hasMany(StudentFeeHistoryModel, {
70
+ FeeType1Model.hasMany(StudentFeeHistoryModel, {
71
71
  foreignKey: { name: 'feeTypeId', field: 'feeType_id' },
72
72
  as: 'feeTypeStudentFeeHistory',
73
73
  });
@@ -5,7 +5,7 @@ const sequelize_1 = require("sequelize");
5
5
  const index_1 = require("./index");
6
6
  class StudentFeeTermsModel extends sequelize_1.Model {
7
7
  static associate(models) {
8
- const { UserModel, InstituteModel, AcademicCalendarModel, FeeTypeModel, InstituteEntityModel, SchoolFeeCollectionModel } = models;
8
+ const { UserModel, InstituteModel, AcademicCalendarModel, FeeType1Model, InstituteEntityModel, SchoolFeeCollectionModel } = models;
9
9
  StudentFeeTermsModel.belongsTo(StudentFeeTermsModel, {
10
10
  foreignKey: { name: 'oldId', field: 'old_id', allowNull: true },
11
11
  as: 'studentOldFeeTerms',
@@ -14,11 +14,11 @@ class StudentFeeTermsModel extends sequelize_1.Model {
14
14
  foreignKey: { name: 'oldId', field: 'old_id', allowNull: true },
15
15
  as: 'studentTermsHasOldTerms',
16
16
  });
17
- StudentFeeTermsModel.belongsTo(FeeTypeModel, {
17
+ StudentFeeTermsModel.belongsTo(FeeType1Model, {
18
18
  foreignKey: { name: 'feeTypeId', field: 'fee_type_id', allowNull: true },
19
19
  as: 'studentFeeTermsFeeType',
20
20
  });
21
- FeeTypeModel.hasMany(StudentFeeTermsModel, {
21
+ FeeType1Model.hasMany(StudentFeeTermsModel, {
22
22
  foreignKey: { name: 'feeTypeId', field: 'fee_type_id', allowNull: true },
23
23
  as: 'studentTermsHasFeeType',
24
24
  });
@@ -6,7 +6,7 @@ const index_1 = require("./index");
6
6
  const constants_1 = require("../../constants");
7
7
  class StudentFeeTypeCollectionModel extends sequelize_1.Model {
8
8
  static associate(models) {
9
- const { UserModel, InstituteModel, StudentFeeCollectionModel, AcademicCalendarModel, FeeTypeModel, InstituteEntityModel, BatchModel } = models;
9
+ const { UserModel, InstituteModel, StudentFeeCollectionModel, AcademicCalendarModel, FeeType1Model, InstituteEntityModel, BatchModel } = models;
10
10
  StudentFeeTypeCollectionModel.belongsTo(StudentFeeCollectionModel, {
11
11
  foreignKey: { name: 'studentFeeCollectionId', field: 'student_fee_collection_id', allowNull: true },
12
12
  as: 'feeTypeCollection',
@@ -63,13 +63,13 @@ class StudentFeeTypeCollectionModel extends sequelize_1.Model {
63
63
  foreignKey: { name: 'batchId', field: 'batch_id' },
64
64
  as: 'batchFeeTypeCollection',
65
65
  });
66
- StudentFeeTypeCollectionModel.belongsTo(FeeTypeModel, {
66
+ StudentFeeTypeCollectionModel.belongsTo(FeeType1Model, {
67
67
  foreignKey: {
68
68
  name: 'feeTypeId',
69
69
  },
70
70
  as: 'feeTypeCollectionFeeType',
71
71
  });
72
- FeeTypeModel.hasMany(StudentFeeTypeCollectionModel, {
72
+ FeeType1Model.hasMany(StudentFeeTypeCollectionModel, {
73
73
  foreignKey: 'feeTypeId',
74
74
  as: 'feeTypeHasTypeCollection',
75
75
  });
@@ -165,3 +165,4 @@ export * from './classRoomCollectionType';
165
165
  export * from './penaltyType';
166
166
  export * from './userHasPenaltyType';
167
167
  export * from './studentFeeTermsType';
168
+ export * from './feeType1Type';
@@ -181,3 +181,4 @@ __exportStar(require("./classRoomCollectionType"), exports);
181
181
  __exportStar(require("./penaltyType"), exports);
182
182
  __exportStar(require("./userHasPenaltyType"), exports);
183
183
  __exportStar(require("./studentFeeTermsType"), exports);
184
+ __exportStar(require("./feeType1Type"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.214",
3
+ "version": "1.1.216",
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",