@kipicore/dbcore 1.1.704 → 1.1.705
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.
- package/dist/commonValidator/commandValidator.d.ts +27 -0
- package/dist/commonValidator/commandValidator.js +225 -0
- package/dist/commonValidator/index.d.ts +3 -0
- package/dist/commonValidator/index.js +24 -0
- package/dist/commonValidator/joiCommonValidator.d.ts +12 -0
- package/dist/commonValidator/joiCommonValidator.js +47 -0
- package/dist/commonValidator/joiSchemaBuilder.d.ts +6 -0
- package/dist/commonValidator/joiSchemaBuilder.js +70 -0
- package/dist/configs/env.d.ts +2 -0
- package/dist/configs/env.js +4 -0
- package/dist/configs/index.d.ts +2 -0
- package/dist/configs/index.js +2 -0
- package/dist/configs/logger.d.ts +2 -0
- package/dist/configs/logger.js +44 -0
- package/dist/configs/redisConfig.d.ts +4 -0
- package/dist/configs/redisConfig.js +32 -0
- package/dist/constants/app.d.ts +32 -3
- package/dist/constants/app.js +43 -7
- package/dist/constants/defaultModelAttributes.js +2 -1
- package/dist/constants/errorMessages.d.ts +20 -1
- package/dist/constants/errorMessages.js +22 -1
- package/dist/constants/successMessages.d.ts +14 -0
- package/dist/constants/successMessages.js +17 -1
- package/dist/db/psql/migrations/20260714111425-change_status_enum_to_string_in_institutes.d.ts +2 -0
- package/dist/db/psql/migrations/20260714111425-change_status_enum_to_string_in_institutes.js +46 -0
- package/dist/db/psql/migrations/20260714131500-add_note_to_institutes.d.ts +2 -0
- package/dist/db/psql/migrations/20260714131500-add_note_to_institutes.js +20 -0
- package/dist/db/psql/migrations/20260715150000-create-ai-model-keys.d.ts +2 -0
- package/dist/db/psql/migrations/20260715150000-create-ai-model-keys.js +156 -0
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20260717071354-add_type_to_categories.js +19 -0
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.d.ts +2 -0
- package/dist/db/psql/migrations/20260717072745-add_type_to_sub_categories.js +19 -0
- package/dist/db/psql/migrations/20260717095051-add_status_to_users.d.ts +2 -0
- package/dist/db/psql/migrations/20260717095051-add_status_to_users.js +19 -0
- package/dist/db/psql/migrations/20260721000001-add-deleted-at-to-rms-maintenance-activities.d.ts +2 -0
- package/dist/db/psql/migrations/20260721000001-add-deleted-at-to-rms-maintenance-activities.js +12 -0
- package/dist/db/psql/migrations/20260721000002-change-uploaded-from-enum-to-string-in-file-storage.d.ts +2 -0
- package/dist/db/psql/migrations/20260721000002-change-uploaded-from-enum-to-string-in-file-storage.js +42 -0
- package/dist/db/psql/migrations/20260722130134-add_portfolio_theme_to_users.d.ts +2 -0
- package/dist/db/psql/migrations/20260722130134-add_portfolio_theme_to_users.js +22 -0
- package/dist/db/psql/migrations/20260727123149-add_vendorCompanyId_to_institute_ownership_histories.d.ts +2 -0
- package/dist/db/psql/migrations/20260727123149-add_vendorCompanyId_to_institute_ownership_histories.js +23 -0
- package/dist/db/psql/migrations/20260727130802-add_vendorCompanyId_to_institute_partners.d.ts +2 -0
- package/dist/db/psql/migrations/20260727130802-add_vendorCompanyId_to_institute_partners.js +23 -0
- package/dist/db/psql/migrations/20260727132312-make_instituteId_and_vendorCompanyId_optional_in_institute_partners.d.ts +2 -0
- package/dist/db/psql/migrations/20260727132312-make_instituteId_and_vendorCompanyId_optional_in_institute_partners.js +28 -0
- package/dist/db/psql/migrations/20260727132747-make_instituteId_and_vendorCompanyId_optional_in_institute_ownership_histories.d.ts +2 -0
- package/dist/db/psql/migrations/20260727132747-make_instituteId_and_vendorCompanyId_optional_in_institute_ownership_histories.js +25 -0
- package/dist/db/psql/migrations/20260729055118-institutePartners.d.ts +2 -0
- package/dist/db/psql/migrations/20260729055118-institutePartners.js +28 -0
- package/dist/db/psql/migrations/20260729055121-instituteOwnershipHistory.d.ts +2 -0
- package/dist/db/psql/migrations/20260729055121-instituteOwnershipHistory.js +25 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.js +3 -0
- package/dist/helpers/sendEmail.d.ts +3 -0
- package/dist/helpers/sendEmail.js +117 -0
- package/dist/helpers/sendNotification.d.ts +4 -0
- package/dist/helpers/sendNotification.js +34 -0
- package/dist/helpers/sendSMS.d.ts +5 -0
- package/dist/helpers/sendSMS.js +34 -0
- package/dist/helpers/utils.d.ts +5 -3
- package/dist/helpers/utils.js +58 -31
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/interfaces/aiModelKeysInterface.d.ts +15 -0
- package/dist/interfaces/aiModelKeysInterface.js +2 -0
- package/dist/interfaces/categoriesInterface.d.ts +2 -1
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/instituteInterface.d.ts +1 -0
- package/dist/interfaces/instituteOwnershipHistoryInterface.d.ts +2 -1
- package/dist/interfaces/institutePartnersInterface.d.ts +2 -1
- package/dist/interfaces/kipiverseContactFormInterface.d.ts +4 -3
- package/dist/interfaces/subCategoriesInterface.d.ts +2 -1
- package/dist/interfaces/subscriptionPlanInterface.d.ts +2 -1
- package/dist/interfaces/userInstituteMetaInterface.d.ts +1 -0
- package/dist/interfaces/userInterface.d.ts +3 -1
- package/dist/interfaces/vendorCompanyMetaInterface.d.ts +5 -2
- package/dist/models/mongodb/additionalDetailsModel.js +1 -1
- package/dist/models/mongodb/advertisementModel.js +1 -1
- package/dist/models/mongodb/appAnalyticsEventModel.js +1 -1
- package/dist/models/mongodb/appointmentHistoryModel.js +1 -1
- package/dist/models/mongodb/appointmentModel.js +1 -1
- package/dist/models/mongodb/approvalRequestModel.js +1 -1
- package/dist/models/mongodb/assignFileModel.js +1 -1
- package/dist/models/mongodb/attendanceModel.js +1 -1
- package/dist/models/mongodb/bDayWishModel.js +1 -1
- package/dist/models/mongodb/blogModel.js +1 -1
- package/dist/models/mongodb/campusCarnivalModel.js +1 -1
- package/dist/models/mongodb/canteenModel.js +1 -1
- package/dist/models/mongodb/careerModel.js +1 -1
- package/dist/models/mongodb/certificatesHistoryModel.js +1 -1
- package/dist/models/mongodb/certificatesManagementModel.js +1 -1
- package/dist/models/mongodb/columnModel.js +1 -1
- package/dist/models/mongodb/communityGroupMemberModel.js +1 -1
- package/dist/models/mongodb/communityGroupModel.js +1 -1
- package/dist/models/mongodb/communityMessageModel.js +1 -1
- package/dist/models/mongodb/competitionGroupModel.js +1 -1
- package/dist/models/mongodb/competitionModel.js +1 -1
- package/dist/models/mongodb/competitionUsersModel.js +1 -1
- package/dist/models/mongodb/createPollModel.js +1 -1
- package/dist/models/mongodb/dailyBookModel.js +1 -1
- package/dist/models/mongodb/dashboardManagementModel.js +1 -1
- package/dist/models/mongodb/educationOfficerModel.js +1 -1
- package/dist/models/mongodb/eventModel.js +1 -1
- package/dist/models/mongodb/eventTemplatesModel.js +1 -1
- package/dist/models/mongodb/examGroupModel.js +1 -1
- package/dist/models/mongodb/examHasAnswerSheetModel.js +1 -1
- package/dist/models/mongodb/examModel.js +1 -1
- package/dist/models/mongodb/feeConfigModel.js +1 -1
- package/dist/models/mongodb/feeReminderTypeModel.js +1 -1
- package/dist/models/mongodb/feeSubmissionModel.js +1 -1
- package/dist/models/mongodb/feedBackModel.js +1 -1
- package/dist/models/mongodb/fileUploadUserDetailsModel.js +1 -1
- package/dist/models/mongodb/finalMarkSheetModel.js +1 -1
- package/dist/models/mongodb/generateIdCardModel.js +1 -1
- package/dist/models/mongodb/grantAndDonationModel.js +1 -1
- package/dist/models/mongodb/holidayModel.js +1 -1
- package/dist/models/mongodb/informationSupportModel.js +1 -1
- package/dist/models/mongodb/inquiryModel.js +1 -1
- package/dist/models/mongodb/instituteFeeModel.js +1 -1
- package/dist/models/mongodb/invoiceModel.js +1 -1
- package/dist/models/mongodb/jobApplyModel.js +1 -1
- package/dist/models/mongodb/kipiverseContactFormModel.js +9 -4
- package/dist/models/mongodb/markSheetConfigurationModel.js +1 -1
- package/dist/models/mongodb/modulePriceModel.js +1 -1
- package/dist/models/mongodb/offerAndDiscountModel.js +1 -1
- package/dist/models/mongodb/onlineLectureModel.js +1 -1
- package/dist/models/mongodb/pastYearRecordTopperModel.js +1 -1
- package/dist/models/mongodb/pdcChequeConfigurationModel.js +1 -1
- package/dist/models/mongodb/photosGalleryModel.js +1 -1
- package/dist/models/mongodb/plannerModel.js +1 -1
- package/dist/models/mongodb/pollSelectionModel.js +1 -1
- package/dist/models/mongodb/productMetaModel.js +10 -2
- package/dist/models/mongodb/replaceTeacherModel.js +1 -1
- package/dist/models/mongodb/rmsAmcContractModel.js +1 -1
- package/dist/models/mongodb/rmsAuditLogModel.js +1 -1
- package/dist/models/mongodb/rmsDigitalResourceAccessModel.js +1 -1
- package/dist/models/mongodb/rmsDigitalResourceModel.js +1 -1
- package/dist/models/mongodb/rmsResourceDetailsModel.d.ts +1 -7
- package/dist/models/mongodb/rmsResourceDetailsModel.js +1 -1
- package/dist/models/mongodb/roleHasPermissionModel.js +1 -1
- package/dist/models/mongodb/schoolFee1Model.js +1 -1
- package/dist/models/mongodb/seatingArrangementModel.js +1 -1
- package/dist/models/mongodb/sheetFieldModel.js +1 -1
- package/dist/models/mongodb/subjectIndexModel.js +1 -1
- package/dist/models/mongodb/subscriptionConfigurationModel.js +1 -1
- package/dist/models/mongodb/subscriptionPlanModel.js +6 -1
- package/dist/models/mongodb/taskManagementModel.js +1 -1
- package/dist/models/mongodb/themeModel.js +1 -1
- package/dist/models/mongodb/ticketRaiseModel.js +1 -1
- package/dist/models/mongodb/uniqueNumberCounterModel.js +1 -1
- package/dist/models/mongodb/userDetailsModel.js +1 -1
- package/dist/models/mongodb/userFinalResultModel.js +1 -1
- package/dist/models/mongodb/userInstituteMetaModel.js +1 -1
- package/dist/models/mongodb/userSchoolMetaModel.d.ts +1 -6
- package/dist/models/mongodb/userSchoolMetaModel.js +36 -3
- package/dist/models/mongodb/vendorCompanyMetaModel.js +16 -2
- package/dist/models/mongodb/videoAnalystModel.js +1 -1
- package/dist/models/mongodb/walletTransactionModel.js +1 -1
- package/dist/models/psql/SubCategoriesModel.d.ts +2 -1
- package/dist/models/psql/SubCategoriesModel.js +5 -0
- package/dist/models/psql/aiModelKeysModel.d.ts +20 -0
- package/dist/models/psql/aiModelKeysModel.js +70 -0
- package/dist/models/psql/categoriesModel.d.ts +2 -1
- package/dist/models/psql/categoriesModel.js +5 -0
- package/dist/models/psql/fileStorageModel.js +3 -4
- package/dist/models/psql/index.d.ts +1 -0
- package/dist/models/psql/index.js +4 -2
- package/dist/models/psql/instituteModel.d.ts +1 -0
- package/dist/models/psql/instituteModel.js +5 -2
- package/dist/models/psql/instituteOwnershipHistoryModel.d.ts +2 -1
- package/dist/models/psql/instituteOwnershipHistoryModel.js +8 -3
- package/dist/models/psql/institutePartnersModel.d.ts +2 -1
- package/dist/models/psql/institutePartnersModel.js +8 -3
- package/dist/models/psql/userModel.d.ts +3 -1
- package/dist/models/psql/userModel.js +2 -0
- package/dist/queues/emailQueue.d.ts +3 -0
- package/dist/queues/emailQueue.js +22 -0
- package/dist/queues/emailWorker.d.ts +3 -0
- package/dist/queues/emailWorker.js +33 -0
- package/dist/queues/index.d.ts +2 -0
- package/dist/queues/index.js +18 -0
- package/dist/types/aiModelKeysType.d.ts +3 -0
- package/dist/types/aiModelKeysType.js +2 -0
- package/dist/types/commonType.d.ts +28 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +10 -2
|
@@ -74,5 +74,5 @@ const modulePriceModelSchema = new mongoose_1.Schema({
|
|
|
74
74
|
timestamps: true,
|
|
75
75
|
versionKey: false,
|
|
76
76
|
});
|
|
77
|
-
const ModulePriceModel = mongoose_1.default.model('module_price', modulePriceModelSchema);
|
|
77
|
+
const ModulePriceModel = mongoose_1.default.models['module_price'] || mongoose_1.default.model('module_price', modulePriceModelSchema);
|
|
78
78
|
exports.default = ModulePriceModel;
|
|
@@ -157,5 +157,5 @@ const OfferAndDiscountSchema = new mongoose_1.Schema({
|
|
|
157
157
|
timestamps: true,
|
|
158
158
|
versionKey: false,
|
|
159
159
|
});
|
|
160
|
-
const OfferAndDiscountModel = mongoose_1.default.model('offerAndDiscounts', OfferAndDiscountSchema);
|
|
160
|
+
const OfferAndDiscountModel = mongoose_1.default.models['offerAndDiscounts'] || mongoose_1.default.model('offerAndDiscounts', OfferAndDiscountSchema);
|
|
161
161
|
exports.default = OfferAndDiscountModel;
|
|
@@ -92,5 +92,5 @@ const OnlineLectureSchema = new mongoose_1.Schema({
|
|
|
92
92
|
timestamps: true,
|
|
93
93
|
versionKey: false,
|
|
94
94
|
});
|
|
95
|
-
const OnlineLectureModel = mongoose_1.default.model('online_lecture', OnlineLectureSchema);
|
|
95
|
+
const OnlineLectureModel = mongoose_1.default.models['online_lecture'] || mongoose_1.default.model('online_lecture', OnlineLectureSchema);
|
|
96
96
|
exports.default = OnlineLectureModel;
|
|
@@ -81,5 +81,5 @@ const PastYearRecordTopperSchema = new mongoose_1.Schema({
|
|
|
81
81
|
timestamps: true,
|
|
82
82
|
versionKey: false,
|
|
83
83
|
});
|
|
84
|
-
const PastYearRecordTopperModel = mongoose_1.default.model('past_year_record_topper', PastYearRecordTopperSchema);
|
|
84
|
+
const PastYearRecordTopperModel = mongoose_1.default.models['past_year_record_topper'] || mongoose_1.default.model('past_year_record_topper', PastYearRecordTopperSchema);
|
|
85
85
|
exports.default = PastYearRecordTopperModel;
|
|
@@ -55,5 +55,5 @@ const pdcChequeConfigurationSchema = new mongoose_1.Schema({
|
|
|
55
55
|
timestamps: true,
|
|
56
56
|
versionKey: false,
|
|
57
57
|
});
|
|
58
|
-
const PdcChequeConfigurationModel = mongoose_1.default.model('pdc_cheque_configuration', pdcChequeConfigurationSchema);
|
|
58
|
+
const PdcChequeConfigurationModel = mongoose_1.default.models['pdc_cheque_configuration'] || mongoose_1.default.model('pdc_cheque_configuration', pdcChequeConfigurationSchema);
|
|
59
59
|
exports.default = PdcChequeConfigurationModel;
|
|
@@ -86,5 +86,5 @@ const PhotosGalleryModelSchema = new mongoose_1.Schema({
|
|
|
86
86
|
PhotosGalleryModelSchema.index({
|
|
87
87
|
instituteId: 1,
|
|
88
88
|
});
|
|
89
|
-
const PhotosGalleryModel = mongoose_1.default.model('photos_gallery', PhotosGalleryModelSchema);
|
|
89
|
+
const PhotosGalleryModel = mongoose_1.default.models['photos_gallery'] || mongoose_1.default.model('photos_gallery', PhotosGalleryModelSchema);
|
|
90
90
|
exports.default = PhotosGalleryModel;
|
|
@@ -167,7 +167,7 @@ plannerModelSchema.index({
|
|
|
167
167
|
workingDayId: 1,
|
|
168
168
|
date: 1,
|
|
169
169
|
});
|
|
170
|
-
const PlannerModel = mongoose_1.default.model('Planner', plannerModelSchema);
|
|
170
|
+
const PlannerModel = mongoose_1.default.models['Planner'] || mongoose_1.default.model('Planner', plannerModelSchema);
|
|
171
171
|
// (async () => {
|
|
172
172
|
// await PlannerModel.syncIndexes();
|
|
173
173
|
// })(); // Rebuilds indexes in DB based on schema
|
|
@@ -68,5 +68,5 @@ const PollSelectionSchema = new mongoose_1.Schema({
|
|
|
68
68
|
timestamps: true,
|
|
69
69
|
versionKey: false,
|
|
70
70
|
});
|
|
71
|
-
const PollSelectionModel = mongoose_1.default.model('poll_selection', PollSelectionSchema);
|
|
71
|
+
const PollSelectionModel = mongoose_1.default.models['poll_selection'] || mongoose_1.default.model('poll_selection', PollSelectionSchema);
|
|
72
72
|
exports.default = PollSelectionModel;
|
|
@@ -42,7 +42,7 @@ const ProductMetaSchema = new mongoose_1.Schema({
|
|
|
42
42
|
},
|
|
43
43
|
categoryId: {
|
|
44
44
|
type: String,
|
|
45
|
-
required:
|
|
45
|
+
required: false,
|
|
46
46
|
},
|
|
47
47
|
subCategoryId: {
|
|
48
48
|
type: String,
|
|
@@ -83,6 +83,14 @@ const ProductMetaSchema = new mongoose_1.Schema({
|
|
|
83
83
|
enum: Object.values(constants_1.PRODUCT_META_STATUS),
|
|
84
84
|
default: constants_1.PRODUCT_META_STATUS.ACTIVE,
|
|
85
85
|
},
|
|
86
|
+
description: {
|
|
87
|
+
type: String,
|
|
88
|
+
required: false,
|
|
89
|
+
},
|
|
90
|
+
shortDescription: {
|
|
91
|
+
type: String,
|
|
92
|
+
required: false,
|
|
93
|
+
},
|
|
86
94
|
createdBy: {
|
|
87
95
|
type: String,
|
|
88
96
|
},
|
|
@@ -96,5 +104,5 @@ const ProductMetaSchema = new mongoose_1.Schema({
|
|
|
96
104
|
timestamps: true,
|
|
97
105
|
versionKey: false,
|
|
98
106
|
});
|
|
99
|
-
const ProductMetaModel = mongoose_1.default.model('ProductMeta', ProductMetaSchema);
|
|
107
|
+
const ProductMetaModel = mongoose_1.default.models['ProductMeta'] || mongoose_1.default.model('ProductMeta', ProductMetaSchema);
|
|
100
108
|
exports.default = ProductMetaModel;
|
|
@@ -110,5 +110,5 @@ const ReplaceTeacherSchema = new mongoose_1.Schema({
|
|
|
110
110
|
timestamps: true,
|
|
111
111
|
versionKey: false,
|
|
112
112
|
});
|
|
113
|
-
const ReplaceTeacherModel = mongoose_1.default.model('replaceTeachers', ReplaceTeacherSchema);
|
|
113
|
+
const ReplaceTeacherModel = mongoose_1.default.models['replaceTeachers'] || mongoose_1.default.model('replaceTeachers', ReplaceTeacherSchema);
|
|
114
114
|
exports.default = ReplaceTeacherModel;
|
|
@@ -101,5 +101,5 @@ const RmsAmcContractSchema = new mongoose_1.Schema({
|
|
|
101
101
|
timestamps: true,
|
|
102
102
|
versionKey: false,
|
|
103
103
|
});
|
|
104
|
-
const RmsAmcContractModel = mongoose_1.default.model('rms_amc_contract', RmsAmcContractSchema);
|
|
104
|
+
const RmsAmcContractModel = mongoose_1.default.models['rms_amc_contract'] || mongoose_1.default.model('rms_amc_contract', RmsAmcContractSchema);
|
|
105
105
|
exports.default = RmsAmcContractModel;
|
|
@@ -95,5 +95,5 @@ const RmsAuditLogSchema = new mongoose_1.Schema({
|
|
|
95
95
|
timestamps: true,
|
|
96
96
|
versionKey: false,
|
|
97
97
|
});
|
|
98
|
-
const RmsAuditLogModel = mongoose_1.default.model('rms_audit_log', RmsAuditLogSchema);
|
|
98
|
+
const RmsAuditLogModel = mongoose_1.default.models['rms_audit_log'] || mongoose_1.default.model('rms_audit_log', RmsAuditLogSchema);
|
|
99
99
|
exports.default = RmsAuditLogModel;
|
|
@@ -67,5 +67,5 @@ const RmsDigitalResourceAccessSchema = new mongoose_1.Schema({
|
|
|
67
67
|
timestamps: true,
|
|
68
68
|
versionKey: false,
|
|
69
69
|
});
|
|
70
|
-
const RmsDigitalResourceAccessModel = mongoose_1.default.model('rms_digital_resource_access', RmsDigitalResourceAccessSchema);
|
|
70
|
+
const RmsDigitalResourceAccessModel = mongoose_1.default.models['rms_digital_resource_access'] || mongoose_1.default.model('rms_digital_resource_access', RmsDigitalResourceAccessSchema);
|
|
71
71
|
exports.default = RmsDigitalResourceAccessModel;
|
|
@@ -77,5 +77,5 @@ const RmsDigitalResourceSchema = new mongoose_1.Schema({
|
|
|
77
77
|
timestamps: true,
|
|
78
78
|
versionKey: false,
|
|
79
79
|
});
|
|
80
|
-
const RmsDigitalResourceModel = mongoose_1.default.model('rms_digital_resource', RmsDigitalResourceSchema);
|
|
80
|
+
const RmsDigitalResourceModel = mongoose_1.default.models['rms_digital_resource'] || mongoose_1.default.model('rms_digital_resource', RmsDigitalResourceSchema);
|
|
81
81
|
exports.default = RmsDigitalResourceModel;
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { IRmsResourceDetailsDocument } from '../../interfaces/rmsResourceDetailsInterface';
|
|
3
|
-
declare const RmsResourceDetailsModel: mongoose.Model<IRmsResourceDetailsDocument, {}, {}, {}, mongoose.Document<unknown, {}, IRmsResourceDetailsDocument, {}, {}> & IRmsResourceDetailsDocument & Required<{
|
|
4
|
-
_id: unknown;
|
|
5
|
-
}> & {
|
|
6
|
-
__v: number;
|
|
7
|
-
}, any>;
|
|
1
|
+
declare const RmsResourceDetailsModel: any;
|
|
8
2
|
export default RmsResourceDetailsModel;
|
|
@@ -54,5 +54,5 @@ const RmsResourceDetailsSchema = new mongoose_1.Schema({
|
|
|
54
54
|
timestamps: true,
|
|
55
55
|
collection: 'rms_resource_details',
|
|
56
56
|
});
|
|
57
|
-
const RmsResourceDetailsModel = mongoose_1.default.model('RmsResourceDetails', RmsResourceDetailsSchema);
|
|
57
|
+
const RmsResourceDetailsModel = mongoose_1.default.models['RmsResourceDetails'] || mongoose_1.default.model('RmsResourceDetails', RmsResourceDetailsSchema);
|
|
58
58
|
exports.default = RmsResourceDetailsModel;
|
|
@@ -45,5 +45,5 @@ const roleHasPermissionSchema = new mongoose_1.Schema({
|
|
|
45
45
|
timestamps: true,
|
|
46
46
|
versionKey: false,
|
|
47
47
|
});
|
|
48
|
-
const RoleHasPermissionModel = mongoose_1.default.model('roleHasPermission', roleHasPermissionSchema);
|
|
48
|
+
const RoleHasPermissionModel = mongoose_1.default.models['roleHasPermission'] || mongoose_1.default.model('roleHasPermission', roleHasPermissionSchema);
|
|
49
49
|
exports.default = RoleHasPermissionModel;
|
|
@@ -232,5 +232,5 @@ schoolFee1Schema.pre('save', async function (next) {
|
|
|
232
232
|
return next(error);
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
|
-
const SchoolFee1Model = mongoose_1.default.model('schoolFee1', schoolFee1Schema);
|
|
235
|
+
const SchoolFee1Model = mongoose_1.default.models['schoolFee1'] || mongoose_1.default.model('schoolFee1', schoolFee1Schema);
|
|
236
236
|
exports.default = SchoolFee1Model;
|
|
@@ -63,5 +63,5 @@ const SeatingArrangementSchema = new mongoose_1.Schema({
|
|
|
63
63
|
timestamps: true,
|
|
64
64
|
versionKey: false,
|
|
65
65
|
});
|
|
66
|
-
const SeatingArrangementModel = mongoose_1.default.model('seating_arrangements', SeatingArrangementSchema);
|
|
66
|
+
const SeatingArrangementModel = mongoose_1.default.models['seating_arrangements'] || mongoose_1.default.model('seating_arrangements', SeatingArrangementSchema);
|
|
67
67
|
exports.default = SeatingArrangementModel;
|
|
@@ -51,5 +51,5 @@ const sheetFieldMappingSchema = new mongoose_1.Schema({
|
|
|
51
51
|
timestamps: true,
|
|
52
52
|
versionKey: false,
|
|
53
53
|
});
|
|
54
|
-
const SheetFieldMappingModel = mongoose_1.default.model('sheet_field_mapping', sheetFieldMappingSchema);
|
|
54
|
+
const SheetFieldMappingModel = mongoose_1.default.models['sheet_field_mapping'] || mongoose_1.default.model('sheet_field_mapping', sheetFieldMappingSchema);
|
|
55
55
|
exports.default = SheetFieldMappingModel;
|
|
@@ -636,7 +636,7 @@ SubjectIndexSchema.index({
|
|
|
636
636
|
type: 1,
|
|
637
637
|
subject: 1,
|
|
638
638
|
});
|
|
639
|
-
const SubjectIndexModel = mongoose_1.default.model('subject_indexes', SubjectIndexSchema);
|
|
639
|
+
const SubjectIndexModel = mongoose_1.default.models['subject_indexes'] || mongoose_1.default.model('subject_indexes', SubjectIndexSchema);
|
|
640
640
|
// (async () => {
|
|
641
641
|
// await SubjectIndexModel.syncIndexes();
|
|
642
642
|
// })(); // Rebuilds indexes in DB based on schema
|
|
@@ -65,5 +65,5 @@ const subscriptionConfigurationModelSchema = new mongoose_1.Schema({
|
|
|
65
65
|
timestamps: true,
|
|
66
66
|
versionKey: false,
|
|
67
67
|
});
|
|
68
|
-
const SubscriptionConfigurationModel = mongoose_1.default.model('subscription_configuration', subscriptionConfigurationModelSchema);
|
|
68
|
+
const SubscriptionConfigurationModel = mongoose_1.default.models['subscription_configuration'] || mongoose_1.default.model('subscription_configuration', subscriptionConfigurationModelSchema);
|
|
69
69
|
exports.default = SubscriptionConfigurationModel;
|
|
@@ -153,9 +153,14 @@ const subscriptionPlanModelSchema = new mongoose_1.Schema({
|
|
|
153
153
|
type: Number,
|
|
154
154
|
required: false,
|
|
155
155
|
},
|
|
156
|
+
sellStatus: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: app_1.PLAN_SELL_STATUS.AVAILABLE,
|
|
159
|
+
required: false,
|
|
160
|
+
},
|
|
156
161
|
}, {
|
|
157
162
|
timestamps: true,
|
|
158
163
|
versionKey: false,
|
|
159
164
|
});
|
|
160
|
-
const SubscriptionPlanModel = mongoose_1.default.model('subscription_plans', subscriptionPlanModelSchema);
|
|
165
|
+
const SubscriptionPlanModel = mongoose_1.default.models['subscription_plans'] || mongoose_1.default.model('subscription_plans', subscriptionPlanModelSchema);
|
|
161
166
|
exports.default = SubscriptionPlanModel;
|
|
@@ -166,5 +166,5 @@ TaskManagementModelSchema.pre('updateMany', async function (next) {
|
|
|
166
166
|
throw error;
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
|
-
const TaskManagementModel = mongoose_1.default.model('task_managements', TaskManagementModelSchema);
|
|
169
|
+
const TaskManagementModel = mongoose_1.default.models['task_managements'] || mongoose_1.default.model('task_managements', TaskManagementModelSchema);
|
|
170
170
|
exports.default = TaskManagementModel;
|
|
@@ -64,5 +64,5 @@ const ThemeSchema = new mongoose_1.Schema({
|
|
|
64
64
|
timestamps: true,
|
|
65
65
|
versionKey: false,
|
|
66
66
|
});
|
|
67
|
-
const ThemeModel = mongoose_1.default.model('themes', ThemeSchema);
|
|
67
|
+
const ThemeModel = mongoose_1.default.models['themes'] || mongoose_1.default.model('themes', ThemeSchema);
|
|
68
68
|
exports.default = ThemeModel;
|
|
@@ -102,5 +102,5 @@ const TicketRaiseSchema = new mongoose_1.Schema({
|
|
|
102
102
|
timestamps: true,
|
|
103
103
|
versionKey: false,
|
|
104
104
|
});
|
|
105
|
-
const TicketRaiseModel = mongoose_1.default.model('ticket_raise', TicketRaiseSchema);
|
|
105
|
+
const TicketRaiseModel = mongoose_1.default.models['ticket_raise'] || mongoose_1.default.model('ticket_raise', TicketRaiseSchema);
|
|
106
106
|
exports.default = TicketRaiseModel;
|
|
@@ -79,5 +79,5 @@ const uniqueNumberCounterSchema = new mongoose_1.Schema({
|
|
|
79
79
|
timestamps: true,
|
|
80
80
|
versionKey: false,
|
|
81
81
|
});
|
|
82
|
-
const UniqueNumberCounterModel = mongoose_1.default.model('uniqueNumberCounter', uniqueNumberCounterSchema);
|
|
82
|
+
const UniqueNumberCounterModel = mongoose_1.default.models['uniqueNumberCounter'] || mongoose_1.default.model('uniqueNumberCounter', uniqueNumberCounterSchema);
|
|
83
83
|
exports.default = UniqueNumberCounterModel;
|
|
@@ -532,7 +532,7 @@ const userDetailsSchema = new mongoose_1.Schema({
|
|
|
532
532
|
userDetailsSchema.index({
|
|
533
533
|
userId: 1,
|
|
534
534
|
});
|
|
535
|
-
const userDetails = mongoose_1.default.model('userDetails', userDetailsSchema);
|
|
535
|
+
const userDetails = mongoose_1.default.models['userDetails'] || mongoose_1.default.model('userDetails', userDetailsSchema);
|
|
536
536
|
// (async () => {
|
|
537
537
|
// await userDetails.syncIndexes();
|
|
538
538
|
// })();
|
|
@@ -72,5 +72,5 @@ const userFinalResultSchema = new mongoose_1.Schema({
|
|
|
72
72
|
timestamps: true,
|
|
73
73
|
versionKey: false,
|
|
74
74
|
});
|
|
75
|
-
const UserFinalResultModel = mongoose_1.default.model('user_final_result', userFinalResultSchema);
|
|
75
|
+
const UserFinalResultModel = mongoose_1.default.models['user_final_result'] || mongoose_1.default.model('user_final_result', userFinalResultSchema);
|
|
76
76
|
exports.default = UserFinalResultModel;
|
|
@@ -271,7 +271,7 @@ userInstituteMetaSchema.index({
|
|
|
271
271
|
status: 1,
|
|
272
272
|
// entities: 1,
|
|
273
273
|
});
|
|
274
|
-
const UserInstituteMeta = mongoose_1.default.model('userInstituteMeta', userInstituteMetaSchema);
|
|
274
|
+
const UserInstituteMeta = mongoose_1.default.models['userInstituteMeta'] || mongoose_1.default.model('userInstituteMeta', userInstituteMetaSchema);
|
|
275
275
|
// (async () => {
|
|
276
276
|
// await UserInstituteMeta.syncIndexes();
|
|
277
277
|
// })(); // Rebuilds indexes in DB based on schema
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const UserSchoolMetaModel: import("mongoose").Model<IUserSchoolMetaModelAttributes, {}, {}, {}, import("mongoose").Document<unknown, {}, IUserSchoolMetaModelAttributes, {}, {}> & IUserSchoolMetaModelAttributes & Required<{
|
|
3
|
-
_id: unknown;
|
|
4
|
-
}> & {
|
|
5
|
-
__v: number;
|
|
6
|
-
}, any>;
|
|
1
|
+
declare const UserSchoolMetaModel: any;
|
|
7
2
|
export default UserSchoolMetaModel;
|
|
@@ -1,9 +1,42 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const mongoose_1 = require("mongoose");
|
|
39
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
7
40
|
const app_1 = require("../../constants/app");
|
|
8
41
|
const errorMessages_1 = require("../../constants/errorMessages");
|
|
9
42
|
const countryModel_1 = __importDefault(require("../psql/countryModel"));
|
|
@@ -142,7 +175,7 @@ const schoolInformationSchema = new mongoose_1.Schema({
|
|
|
142
175
|
affiliationNo: {
|
|
143
176
|
type: String,
|
|
144
177
|
required: false,
|
|
145
|
-
}
|
|
178
|
+
},
|
|
146
179
|
}, { _id: false });
|
|
147
180
|
const trustInformationSchema = new mongoose_1.Schema({
|
|
148
181
|
// id: {
|
|
@@ -588,5 +621,5 @@ userSchoolMetaModelSchema.pre('save', async function (next) {
|
|
|
588
621
|
// );
|
|
589
622
|
// }
|
|
590
623
|
// }
|
|
591
|
-
const UserSchoolMetaModel = (0, mongoose_1.model)('UserSchoolMeta', userSchoolMetaModelSchema);
|
|
624
|
+
const UserSchoolMetaModel = mongoose_1.default.models['UserSchoolMeta'] || (0, mongoose_1.model)('UserSchoolMeta', userSchoolMetaModelSchema);
|
|
592
625
|
exports.default = UserSchoolMetaModel;
|
|
@@ -137,7 +137,7 @@ const vendorCompanyMetaSchema = new mongoose_1.Schema({
|
|
|
137
137
|
},
|
|
138
138
|
address2: {
|
|
139
139
|
type: String,
|
|
140
|
-
required:
|
|
140
|
+
required: false,
|
|
141
141
|
},
|
|
142
142
|
area: {
|
|
143
143
|
type: String,
|
|
@@ -180,11 +180,25 @@ const vendorCompanyMetaSchema = new mongoose_1.Schema({
|
|
|
180
180
|
type: bankDetailsSchema,
|
|
181
181
|
required: true,
|
|
182
182
|
},
|
|
183
|
+
partnersIds: {
|
|
184
|
+
type: [String],
|
|
185
|
+
required: false,
|
|
186
|
+
},
|
|
183
187
|
status: {
|
|
184
188
|
type: String,
|
|
185
189
|
enum: Object.values(constants_1.VENDOR_COMPANY_META_STATUS),
|
|
186
190
|
default: constants_1.VENDOR_COMPANY_META_STATUS.PENDING,
|
|
187
191
|
},
|
|
192
|
+
type: {
|
|
193
|
+
type: String,
|
|
194
|
+
enum: Object.values(constants_1.VENDOR_COMPANY_TYPE),
|
|
195
|
+
required: true
|
|
196
|
+
},
|
|
197
|
+
isActive: {
|
|
198
|
+
type: Boolean,
|
|
199
|
+
required: false,
|
|
200
|
+
default: true,
|
|
201
|
+
},
|
|
188
202
|
createdBy: {
|
|
189
203
|
type: String,
|
|
190
204
|
},
|
|
@@ -198,5 +212,5 @@ const vendorCompanyMetaSchema = new mongoose_1.Schema({
|
|
|
198
212
|
timestamps: true,
|
|
199
213
|
versionKey: false,
|
|
200
214
|
});
|
|
201
|
-
const VendorCompanyMetaModel = mongoose_1.default.model('vendorCompanyMeta', vendorCompanyMetaSchema);
|
|
215
|
+
const VendorCompanyMetaModel = mongoose_1.default.models['vendorCompanyMeta'] || mongoose_1.default.model('vendorCompanyMeta', vendorCompanyMetaSchema);
|
|
202
216
|
exports.default = VendorCompanyMetaModel;
|
|
@@ -91,5 +91,5 @@ const VideoAnalystSchema = new mongoose_1.Schema({
|
|
|
91
91
|
timestamps: false,
|
|
92
92
|
versionKey: false,
|
|
93
93
|
});
|
|
94
|
-
const VideoAnalystModel = mongoose_1.default.model('video_analyst', VideoAnalystSchema);
|
|
94
|
+
const VideoAnalystModel = mongoose_1.default.models['video_analyst'] || mongoose_1.default.model('video_analyst', VideoAnalystSchema);
|
|
95
95
|
exports.default = VideoAnalystModel;
|
|
@@ -163,5 +163,5 @@ const walletTransactionSchema = new mongoose_1.Schema({
|
|
|
163
163
|
versionKey: false,
|
|
164
164
|
});
|
|
165
165
|
// --- Model ---
|
|
166
|
-
const WalletTransactionModel = mongoose_1.default.model('wallet_transactions', walletTransactionSchema);
|
|
166
|
+
const WalletTransactionModel = mongoose_1.default.models['wallet_transactions'] || mongoose_1.default.model('wallet_transactions', walletTransactionSchema);
|
|
167
167
|
exports.default = WalletTransactionModel;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { ISubCategoriesModelAttributes } from '../../interfaces/subCategoriesInterface';
|
|
3
3
|
import { TSubCategoriesModelCreationAttributes } from '../../types/subCategoryType';
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app';
|
|
4
|
+
import { CATEGORY_TYPE, COMMAN_STATUS } from '../../constants/app';
|
|
5
5
|
declare class SubCategoriesModel extends Model<ISubCategoriesModelAttributes, TSubCategoriesModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
8
|
status: COMMAN_STATUS;
|
|
9
9
|
instituteId?: string;
|
|
10
|
+
type?: CATEGORY_TYPE;
|
|
10
11
|
createdBy: string;
|
|
11
12
|
updatedBy: string;
|
|
12
13
|
deletedBy: string;
|
|
@@ -90,6 +90,11 @@ SubCategoriesModel.init({
|
|
|
90
90
|
allowNull: true,
|
|
91
91
|
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
92
92
|
},
|
|
93
|
+
type: {
|
|
94
|
+
type: sequelize_1.DataTypes.STRING,
|
|
95
|
+
allowNull: true,
|
|
96
|
+
defaultValue: app_1.CATEGORY_TYPE.INVENTORY,
|
|
97
|
+
}
|
|
93
98
|
}, {
|
|
94
99
|
modelName: 'SubCategoriesModel',
|
|
95
100
|
tableName: 'sub_categories',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { AI_MODEL_KEYS, AI_MODEL_KEY_TYPES } from '../../constants';
|
|
3
|
+
import { IAiModelKeyAttributes } from '../../interfaces/aiModelKeysInterface';
|
|
4
|
+
import { TAiModelKeyCreationAttributes } from '../../types/aiModelKeysType';
|
|
5
|
+
declare class AiModelKeyModel extends Model<IAiModelKeyAttributes, TAiModelKeyCreationAttributes> {
|
|
6
|
+
id: string;
|
|
7
|
+
key: AI_MODEL_KEYS;
|
|
8
|
+
hasValue: string;
|
|
9
|
+
type: AI_MODEL_KEY_TYPES;
|
|
10
|
+
description: string;
|
|
11
|
+
version: number;
|
|
12
|
+
createdBy?: string;
|
|
13
|
+
updatedBy?: string;
|
|
14
|
+
deletedBy?: string;
|
|
15
|
+
readonly createdAt?: Date;
|
|
16
|
+
readonly updatedAt?: Date;
|
|
17
|
+
readonly deletedAt?: Date;
|
|
18
|
+
static associate(models: any): void;
|
|
19
|
+
}
|
|
20
|
+
export default AiModelKeyModel;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sequelize_1 = require("sequelize");
|
|
4
|
+
const index_1 = require("./index");
|
|
5
|
+
class AiModelKeyModel extends sequelize_1.Model {
|
|
6
|
+
static associate(models) {
|
|
7
|
+
const { UserModel } = models;
|
|
8
|
+
AiModelKeyModel.belongsTo(UserModel, {
|
|
9
|
+
foreignKey: {
|
|
10
|
+
name: 'createdBy',
|
|
11
|
+
allowNull: true,
|
|
12
|
+
field: 'created_by',
|
|
13
|
+
},
|
|
14
|
+
as: 'createdByUser',
|
|
15
|
+
});
|
|
16
|
+
AiModelKeyModel.belongsTo(UserModel, {
|
|
17
|
+
foreignKey: {
|
|
18
|
+
name: 'updatedBy',
|
|
19
|
+
allowNull: true,
|
|
20
|
+
field: 'updated_by',
|
|
21
|
+
},
|
|
22
|
+
as: 'updatedByUser',
|
|
23
|
+
});
|
|
24
|
+
AiModelKeyModel.belongsTo(UserModel, {
|
|
25
|
+
foreignKey: {
|
|
26
|
+
name: 'deletedBy',
|
|
27
|
+
allowNull: true,
|
|
28
|
+
field: 'deleted_by',
|
|
29
|
+
},
|
|
30
|
+
as: 'deletedByUser',
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
AiModelKeyModel.init({
|
|
35
|
+
id: {
|
|
36
|
+
type: sequelize_1.DataTypes.UUID,
|
|
37
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
38
|
+
primaryKey: true,
|
|
39
|
+
allowNull: false,
|
|
40
|
+
},
|
|
41
|
+
key: {
|
|
42
|
+
type: sequelize_1.DataTypes.STRING,
|
|
43
|
+
allowNull: false,
|
|
44
|
+
unique: true,
|
|
45
|
+
},
|
|
46
|
+
hasValue: {
|
|
47
|
+
type: sequelize_1.DataTypes.STRING,
|
|
48
|
+
allowNull: false,
|
|
49
|
+
field: 'has_value',
|
|
50
|
+
},
|
|
51
|
+
type: {
|
|
52
|
+
type: sequelize_1.DataTypes.STRING,
|
|
53
|
+
allowNull: false,
|
|
54
|
+
},
|
|
55
|
+
description: {
|
|
56
|
+
type: sequelize_1.DataTypes.TEXT,
|
|
57
|
+
allowNull: false,
|
|
58
|
+
},
|
|
59
|
+
version: {
|
|
60
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
61
|
+
allowNull: false,
|
|
62
|
+
defaultValue: 1,
|
|
63
|
+
},
|
|
64
|
+
}, {
|
|
65
|
+
sequelize: index_1.sequelize,
|
|
66
|
+
modelName: 'AiModelKeyModel',
|
|
67
|
+
tableName: 'ai_model_keys',
|
|
68
|
+
timestamps: true,
|
|
69
|
+
});
|
|
70
|
+
exports.default = AiModelKeyModel;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { ICategoriesModelAttributes } from '../../interfaces/categoriesInterface';
|
|
3
3
|
import { TCategoriesModelCreationAttributes } from '../../types/categoriesType';
|
|
4
|
-
import { COMMAN_STATUS } from '../../constants/app';
|
|
4
|
+
import { CATEGORY_TYPE, COMMAN_STATUS } from '../../constants/app';
|
|
5
5
|
export declare class CategoriesModel extends Model<ICategoriesModelAttributes, TCategoriesModelCreationAttributes> {
|
|
6
6
|
id: string;
|
|
7
7
|
name: string;
|
|
8
8
|
status: COMMAN_STATUS;
|
|
9
9
|
instituteId?: string;
|
|
10
|
+
type?: CATEGORY_TYPE;
|
|
10
11
|
createdBy: string;
|
|
11
12
|
updatedBy: string;
|
|
12
13
|
deletedBy: string;
|
|
@@ -51,6 +51,11 @@ CategoriesModel.init({
|
|
|
51
51
|
allowNull: false,
|
|
52
52
|
defaultValue: app_1.COMMAN_STATUS.ACTIVE,
|
|
53
53
|
},
|
|
54
|
+
type: {
|
|
55
|
+
type: sequelize_1.DataTypes.STRING,
|
|
56
|
+
allowNull: true,
|
|
57
|
+
defaultValue: app_1.CATEGORY_TYPE.INVENTORY,
|
|
58
|
+
},
|
|
54
59
|
}, {
|
|
55
60
|
modelName: 'CategoriesModel',
|
|
56
61
|
tableName: 'categories',
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const sequelize_1 = require("sequelize");
|
|
4
4
|
const index_1 = require("./index");
|
|
5
|
-
const app_1 = require("../../constants/app");
|
|
6
5
|
class FileStorageModel extends sequelize_1.Model {
|
|
7
6
|
static associate(models) {
|
|
8
7
|
const { UserModel, UserDirectoryModel } = models;
|
|
@@ -72,9 +71,9 @@ FileStorageModel.init({
|
|
|
72
71
|
allowNull: true,
|
|
73
72
|
},
|
|
74
73
|
uploadedFrom: {
|
|
75
|
-
type: sequelize_1.DataTypes.
|
|
76
|
-
|
|
77
|
-
allowNull:
|
|
74
|
+
type: sequelize_1.DataTypes.STRING,
|
|
75
|
+
field: 'uploaded_from',
|
|
76
|
+
allowNull: true,
|
|
78
77
|
},
|
|
79
78
|
instituteId: {
|
|
80
79
|
type: sequelize_1.DataTypes.UUID,
|
|
@@ -140,6 +140,7 @@ export { default as CertificateRequestModel } from './certificateRequestModel';
|
|
|
140
140
|
export { default as DynamicVariableModel } from './dynamicVariableModel';
|
|
141
141
|
export { default as DynamicVariableLabelModel } from './dynamicVariableLabelModel';
|
|
142
142
|
export { default as ModuleDocsModel } from './moduleDocsModel';
|
|
143
|
+
export { default as AiModelKeyModel } from './aiModelKeysModel';
|
|
143
144
|
export { default as RmsDepartmentModel } from './rmsDepartmentModel';
|
|
144
145
|
export { default as RmsLocationModel } from './rmsLocationModel';
|
|
145
146
|
export { default as RmsResourceModel } from './rmsResourceModel';
|