@kipicore/dbcore 1.1.58 → 1.1.60
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/constants/errorMessages.d.ts +7 -0
- package/dist/constants/errorMessages.js +9 -1
- package/dist/constants/successMessages.d.ts +6 -0
- package/dist/constants/successMessages.js +8 -1
- package/dist/db/psql/migrations/20251009074217-institutes.js +12 -2
- package/dist/interfaces/campusInterface.d.ts +9 -0
- package/dist/interfaces/campusInterface.js +2 -0
- 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/models/psql/campusModel.d.ts +15 -0
- package/dist/models/psql/campusModel.js +63 -0
- package/dist/models/psql/index.d.ts +1 -0
- package/dist/models/psql/index.js +3 -1
- package/dist/models/psql/instituteModel.d.ts +1 -0
- package/dist/models/psql/instituteModel.js +14 -1
- package/dist/models/psql/lostFoundItemModel.js +9 -1
- package/dist/types/campusType.d.ts +2 -0
- package/dist/types/campusType.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
|
@@ -1067,3 +1067,10 @@ export declare enum CANTEEN_ERROR_MESSAGES {
|
|
|
1067
1067
|
DELETE_FAIL = "Unable to delete Data!",
|
|
1068
1068
|
NOT_FOUND = "Unable to find Canteen Data!"
|
|
1069
1069
|
}
|
|
1070
|
+
export declare enum CAMPUS_ERROR_MESSAGES {
|
|
1071
|
+
CREATE_FAIL = "Unable to save Campus Data!",
|
|
1072
|
+
GET_FAIL = "Unable to retrieve Campus Data!",
|
|
1073
|
+
UPDATE_FAIL = "Unable to update Campus Data!",
|
|
1074
|
+
DELETE_FAIL = "Unable to delete Campus Data!",
|
|
1075
|
+
NOT_FOUND = "Unable to find Campus Data!"
|
|
1076
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FILE_STORAGE_ERROR_MESSAGES = exports.EXAM_HAS_ANSWER_SHEET_ERROR_MESSAGES = exports.EXAM_ERROR_MESSAGES = exports.ANNOUCEMENT_ERROR_MESSAGES = exports.PARENTS_ERROR_MESSAGES = exports.USER_INSTITUTE_META_ERROR_MESSAGES = exports.INSTITUTE_ENTITY_ERROR_MESSAGES = exports.INSTITUTE_ENTITY_TYPE_ERROR_MESSAGES = exports.INSTITUTE_ERROR_MESSAGES = exports.MODULE_ERROR_MESSAGES = exports.ROLE_ERROR_MESSAGES = exports.TYPE_MANAGEMENT_ERROR_MESSAGES = exports.CLASSROOM_ERROR_MESSAGES = exports.BATCH_ERROR_MESSAGES = exports.ACADEMIC_CALENDAR_ERROR_MESSAGES = exports.EVENT_ERROR_MESSAGES = exports.HOLIDAY_ERROR_MESSAGES = exports.USER_HAS_ROLL_NUMBER_ERROR_MESSAGES = exports.USER_HAS_OFFER_ERROR_MESSAGES = exports.FEE_REMINDER_ERROR_MESSAGES = exports.FEE_REMINDER_SETTING_ERROR_MESSAGES = exports.FEEREMINDER_ERROR_MESSAGES = exports.FEESCOLLECTION_ERROR_MESSAGES = exports.USER_FEE_TYPE_ERROR_MESSAGES = exports.SCHOOL_FEE_ERROR_MESSAGES = exports.FEE_TYPE_ERROR_MESSAGES = exports.FACILITY_ERROR_MESSAGES = exports.OFFER_ERROR_MESSAGES = exports.INVENTORY_HISTORY_ERROR_MESSAGES = exports.PAYMENT_TERMS_ERROR_MESSAGES = exports.INVENTORY_ERROR_MESSAGES = exports.CATEGORY_ERROR_MESSAGES = exports.USER_HAS_INVENTORY_ERROR_MESSAGES = exports.SUBJECT_HAS_FEE_ERROR_MESSAGES = exports.FEE_HISTORY_ERROR_MESSAGES = exports.MASTER_LEAVE_ERROR_MESSAGES = exports.LEAVE_ERROR_MESSAGES = exports.SUBSCRIPTION_ERROR_MESSAGES = exports.FEEDBACK_ERROR_MESSAGES = exports.SCHOOL_FEES_COLLECTION_ERROR_MESSAGES = exports.ACCOUNT_RECEIPT_ERROR_MESSAGES = exports.SCHOOL_SHIFT_ERROR_MESSAGES = exports.BANK_ACCOUNT_DETAILS_ERROR_MESSAGES = exports.INFORMATION_SUPPORT_ERROR_MESSAGES = exports.INQUIRY_ERROR_MESSAGES = exports.APPROVE_REQUEST_ERROR_MESSAGES = exports.BANNER_ERROR_MESSAGES = exports.USER_FEE_TYPE_ACCOUNT_ERROR_MESSAGES = exports.USER_ERROR_MESSAGES = exports.ERROR_MESSAGES = void 0;
|
|
4
4
|
exports.WALLET_ERROR_MESSAGES = exports.REPLACE_TEACHER_ERROR_MESSAGES = exports.CERTIFICATES_HISTORY_ERROR_MESSAGES = exports.CERTIFICATES_MANAGEMENT_ERROR_MESSAGES = exports.DASHBOARD_MANAGEMENT_ERROR_MESSAGES = exports.PDC_HISTORY_ERROR_MESSAGES = exports.COLUMN_ERROR_MESSAGES = exports.INVOICE_ERROR_MESSAGES = exports.PRODUCT_ERROR_MESSAGES = exports.SUB_CATEGORY_ERROR_MESSAGES = exports.VENDOR_MANAGEMENT_ERROR_MESSAGES = exports.COIN_PURCHASE_OFFER_ERROR_MESSAGES = exports.SYLLABUS_ERROR_MESSAGES = exports.DAILY_BOOK_ERROR_MESSAGES = exports.USER_HAS_HOME_WORK_ERROR_MESSAGES = exports.HOME_WORK_ERROR_MESSAGES = exports.CLOUD_STORAGE_ERROR_MESSAGES = exports.SUBSCRIPTION_PLAN_ERROR_MESSAGES = exports.FLOOR_MANAGEMENT_ERROR_MESSAGES = exports.SIGNED_URL_ERROR_MESSAGES = exports.CAREER_ERROR_MESSAGES = exports.RULES_REGULATION_ERROR_MESSAGES = exports.NOTIFICATION_ERROR_MESSAGES = exports.PHOTO_GALLERY_ERROR_MESSAGES = exports.CONTACT_FEED_BACK_ERROR_MESSAGES = exports.GENERATE_ID_CARD_ERROR_MESSAGES = exports.VEHICLE_ERROR_MESSAGES = exports.BATCH_SUBJECT_PROJECT_ASSESSMENT_ERROR_MESSAGES = exports.USER_BOOK_ASSESSMENT_ERROR_MESSAGES = exports.BATCH_SUBJECT_BOOK_ASSESSMENT_ERROR_MESSAGES = exports.TASK_MANAGEMENT_ERROR_MESSAGES = exports.EXAM_GROUP_ERROR_MESSAGES = exports.USER_PAYOUT_HISTORY_ERROR_MESSAGES = exports.USER_PAYOUT_ERROR_MESSAGES = exports.SUBJECT_INDEX_ERROR_MESSAGES = exports.TESTIMONIAL_ERROR_MESSAGES = exports.DRIVER_ERROR_MESSAGES = exports.BLOG_ERROR_MESSAGES = exports.VIDEO_ANALYST_ERROR_MESSAGES = exports.PDC_CHEQUE_ERROR_MESSAGES = exports.GREETING_ERROR_MESSAGES = exports.USER_HAS_COURSE_ERROR_MESSAGES = exports.COURSE_ERROR_MESSAGES = exports.TO_DO_ERROR_MESSAGES = exports.SLOT_ERROR_MESSAGES = exports.TRIP_ERROR_MESSAGES = exports.LECTURE_ERROR_MESSAGES = exports.WORKING_DAYS_ERROR_MESSAGES = exports.USER_SCHOOL_METADATA_ERROR_MESSAGES = exports.ATTENDANCE_ERROR_MESSAGES = void 0;
|
|
5
|
-
exports.CANTEEN_ERROR_MESSAGES = exports.LOST_FOUND_ITEM_ERROR_MESSAGES = exports.PAYMENT_TRANSACTION_ERROR_MESSAGES = exports.USER_REQUIRED_STEPS_ERROR_MESSAGES = exports.JOB_APPLY_ERROR_MESSAGES = exports.ENTITY_GROUP_ERROR_MESSAGES = exports.USER_HAS_STORAGE_ERROR_MESSAGES = exports.INSTITUTE_SUBSCRIPTION_PLAN_ERROR_MESSAGES = exports.WALLET_TRANSACTION_ERROR_MESSAGES = exports.WALLET_HISTORY_ERROR_MESSAGES = void 0;
|
|
5
|
+
exports.CAMPUS_ERROR_MESSAGES = exports.CANTEEN_ERROR_MESSAGES = exports.LOST_FOUND_ITEM_ERROR_MESSAGES = exports.PAYMENT_TRANSACTION_ERROR_MESSAGES = exports.USER_REQUIRED_STEPS_ERROR_MESSAGES = exports.JOB_APPLY_ERROR_MESSAGES = exports.ENTITY_GROUP_ERROR_MESSAGES = exports.USER_HAS_STORAGE_ERROR_MESSAGES = exports.INSTITUTE_SUBSCRIPTION_PLAN_ERROR_MESSAGES = exports.WALLET_TRANSACTION_ERROR_MESSAGES = exports.WALLET_HISTORY_ERROR_MESSAGES = void 0;
|
|
6
6
|
var ERROR_MESSAGES;
|
|
7
7
|
(function (ERROR_MESSAGES) {
|
|
8
8
|
ERROR_MESSAGES["CREATE_FAIL"] = "Unable to save data in DB!";
|
|
@@ -1180,3 +1180,11 @@ var CANTEEN_ERROR_MESSAGES;
|
|
|
1180
1180
|
CANTEEN_ERROR_MESSAGES["DELETE_FAIL"] = "Unable to delete Data!";
|
|
1181
1181
|
CANTEEN_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find Canteen Data!";
|
|
1182
1182
|
})(CANTEEN_ERROR_MESSAGES || (exports.CANTEEN_ERROR_MESSAGES = CANTEEN_ERROR_MESSAGES = {}));
|
|
1183
|
+
var CAMPUS_ERROR_MESSAGES;
|
|
1184
|
+
(function (CAMPUS_ERROR_MESSAGES) {
|
|
1185
|
+
CAMPUS_ERROR_MESSAGES["CREATE_FAIL"] = "Unable to save Campus Data!";
|
|
1186
|
+
CAMPUS_ERROR_MESSAGES["GET_FAIL"] = "Unable to retrieve Campus Data!";
|
|
1187
|
+
CAMPUS_ERROR_MESSAGES["UPDATE_FAIL"] = "Unable to update Campus Data!";
|
|
1188
|
+
CAMPUS_ERROR_MESSAGES["DELETE_FAIL"] = "Unable to delete Campus Data!";
|
|
1189
|
+
CAMPUS_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find Campus Data!";
|
|
1190
|
+
})(CAMPUS_ERROR_MESSAGES || (exports.CAMPUS_ERROR_MESSAGES = CAMPUS_ERROR_MESSAGES = {}));
|
|
@@ -709,3 +709,9 @@ export declare enum CANTEEN_SUCCESS_MESSAGES {
|
|
|
709
709
|
UPDATE_SUCCESS = "Canteen updated successfully",
|
|
710
710
|
DELETE_SUCCESS = "Canteen deleted successfully"
|
|
711
711
|
}
|
|
712
|
+
export declare enum CAMPUS_SUCCESS_MESSAGES {
|
|
713
|
+
CREATE_SUCCESS = "Campus created successfully",
|
|
714
|
+
GET_SUCCESS = "Campus retrieved successfully",
|
|
715
|
+
UPDATE_SUCCESS = "Campus updated successfully",
|
|
716
|
+
DELETE_SUCCESS = "Campus deleted successfully"
|
|
717
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ANNOUCEMENT_SUCCESS_MESSAGES = exports.TYPE_MANAGEMENT_SUCCESS_MESSAGES = exports.PARENTS_SUCCESS_MESSAGES = exports.USER_INSTITUTE_META_SUCCESS_MESSAGES = exports.INSTITUTE_ENTITY_TYPE_SUCCESS_MESSAGES = exports.INSTITUTE_ENTITY_SUCCESS_MESSAGES = exports.WORKING_DAYS_SUCCESS_MESSAGES = exports.INSTITUTE_SUCCESS_MESSAGES = exports.MODULE_SUCCESS_MESSAGES = exports.ROLE_SUCCESS_MESSAGES = exports.CLASSROOM_SUCCESS_MESSAGES = exports.BATCH_SUCCESS_MESSAGES = exports.ACADEMIC_CALENDAR_SUCCESS_MESSAGES = exports.EVENT_SUCCESS_MESSAGES = exports.HOLIDAY_SUCCESS_MESSAGES = exports.USER_HAS_ROLL_NUMBER_SUCCESS_MESSAGES = exports.USER_HAS_OFFER_SUCCESS_MESSAGES = exports.FEE_REMINDER_SETTING_SUCCESS_MESSAGES = exports.FEEREMINDER_SUCCESS_MESSAGES = exports.FEESCOLLECTION_SUCCESS_MESSAGES = exports.OFFER_SUCCESS_MESSAGES = exports.CATEGORY_SUCCESS_MESSAGES = exports.INVENTORY_HISTORY_SUCCESS_MESSAGES = exports.INVENTORY_SUCCESS_MESSAGES = exports.USER_HAS_INVENTORY_HISTORY_SUCCESS_MESSAGES = exports.USER_HAS_INVENTORY_SUCCESS_MESSAGES = exports.SUBJECT_HAS_FEE_SUCCESS_MESSAGES = exports.FEE_HISTORY_SUCCESS_MESSAGES = exports.MASTER_LEAVE_SUCCESS_MESSAGES = exports.LEAVE_SUCCESS_MESSAGES = exports.PAYMENT_TERMS_SUCCESS_MESSAGES = exports.FACILITY_SUCCESS_MESSAGES = exports.FEE_REMINDER_SUCCESS_MESSAGES = exports.SCHOOL_SHIFT_SUCCESS_MESSAGES = exports.SUBSCRIPTION_SUCCESS_MESSAGES = exports.BANK_ACCOUNT_DETAILS_SUCCESS_MESSAGES = exports.ACCOUNT_RECEIPT_SUCCESS_MESSAGES = exports.FEE_TYPE_SUCCESS_MESSAGES = exports.FEEDBACK_SUCCESS_MESSAGES = exports.INFORMATION_SUPPORT_SUCCESS_MESSAGES = exports.INQUIRY_SUCCESS_MESSAGES = exports.FEE_SUCCESS_MESSAGES = exports.SCHOOL_FEES_COLLECTION_SUCCESS_MESSAGES = exports.USER_FEE_TYPE_SUCCESS_MESSAGES = exports.USER_FEE_TYPE_ACCOUNT_SUCCESS_MESSAGES = exports.ADMIN_SUCCESS_MESSAGES = exports.APPROVE_REQUEST_SUCCESS_MESSAGES = exports.BANNER_SUCCESS_MESSAGES = exports.USER_SUCCESS_MESSAGES = exports.SUCCESS_MESSAGES = void 0;
|
|
4
4
|
exports.CERTIFICATES_HISTORY_SUCCESS_MESSAGES = exports.CERTIFICATES_MANAGEMENT_SUCCESS_MESSAGES = exports.DASHBOARD_MANAGEMENT_SUCCESS_MESSAGES = exports.PDC_HISTORY_SUCCESS_MESSAGES = exports.COLUMN_SUCCESS_MESSAGES = exports.INVOICE_SUCCESS_MESSAGES = exports.PRODUCT_SUCCESS_MESSAGES = exports.SUB_CATEGORY_SUCCESS_MESSAGES = exports.VENDOR_MANAGEMENT_SUCCESS_MESSAGES = exports.COIN_PURCHASE_OFFER_SUCCESS_MESSAGES = exports.SYLLABUS_SUCCESS_MESSAGES = exports.DAILY_BOOK_SUCCESS_MESSAGES = exports.USER_HAS_HOME_WORK_SUCCESS_MESSAGES = exports.HOME_WORK_SUCCESS_MESSAGES = exports.CLOUD_STORAGE_SUCCESS_MESSAGES = exports.SUBSCRIPTION_PLAN_SUCCESS_MESSAGES = exports.FLOOR_MANAGEMENT_SUCCESS_MESSAGES = exports.CAREER_SUCCESS_MESSAGES = exports.RULE_REGULATION_SUCCESS_MESSAGES = exports.CUSTOME_NOTIFICATION_SUCCESS_MESSAGES = exports.NOTIFICATION_SUCCESS_MESSAGES = exports.PHOTO_GALLERY_SUCCESS_MESSAGES = exports.CONTACT_FEED_BACK_SUCCESS_MESSAGES = exports.GENERATE_ID_CARD_SUCCESS_MESSAGES = exports.VEHICLE_SUCCESS_MESSAGES = exports.BATCH_SUBJECT_PROJECT_ASSESSMENT_SUCCESS_MESSAGES = exports.USER_BOOK_ASSESSMENT_SUCCESS_MESSAGES = exports.BATCH_SUBJECT_BOOK_ASSESSMENT_SUCCESS_MESSAGES = exports.TASK_MANAGEMENT_SUCCESS_MESSAGES = exports.EXAM_GROUP_SUCCESS_MESSAGES = exports.PLANNER_SUCCESS_MESSAGES = exports.USER_PAYOUT_HISTORY_SUCCESS_MESSAGES = exports.USER_PAYOUT_SUCCESS_MESSAGES = exports.SUBJECT_INDEX_SUCCESS_MESSAGES = exports.DRIVER_SUCCESS_MESSAGES = exports.BLOG_SUCCESS_MESSAGES = exports.VIDEO_ANALYST_SUCCESS_MESSAGES = exports.TESTIMONIAL_SUCCESS_MESSAGES = exports.PDC_CHEQUE_SUCCESS_MESSAGES = exports.GREETING_SUCCESS_MESSAGES = exports.USER_HAS_COURSE_SUCCESS_MESSAGES = exports.COURSE_SUCCESS_MESSAGES = exports.TO_DO_SUCCESS_MESSAGES = exports.SLOT_SUCCESS_MESSAGES = exports.TRIP_SUCCESS_MESSAGES = exports.LECTURE_SUCCESS_MESSAGES = exports.USER_SCHOOL_METADATA_SUCCESS_MESSAGES = exports.ATTENDANCE_SUCCESS_MESSAGES = exports.EXAM_HAS_ANSWER_SHEET_SUCCESS_MESSAGES = exports.EXAM_SUCCESS_MESSAGES = void 0;
|
|
5
|
-
exports.CANTEEN_SUCCESS_MESSAGES = exports.LOST_FOUND_ITEM_SUCCESS_MESSAGES = exports.PAYMENT_TRANSACTION_SUCCESS_MESSAGES = exports.USER_REQUIRED_STEPS_SUCCESS_MESSAGES = exports.JOB_APPLY_SUCCESS_MESSAGES = exports.ENTITY_GROUP_SUCCESS_MESSAGES = exports.USER_HAS_STORAGE_SUCCESS_MESSAGES = exports.INSTITUTE_SUBSCRIPTION_PLAN_SUCCESS_MESSAGES = exports.WALLET_TRANSACTION_SUCCESS_MESSAGES = exports.WALLET_HISTORY_SUCCESS_MESSAGES = exports.WALLET_SUCCESS_MESSAGES = exports.REPLACE_TEACHER_SUCCESS_MESSAGES = void 0;
|
|
5
|
+
exports.CAMPUS_SUCCESS_MESSAGES = exports.CANTEEN_SUCCESS_MESSAGES = exports.LOST_FOUND_ITEM_SUCCESS_MESSAGES = exports.PAYMENT_TRANSACTION_SUCCESS_MESSAGES = exports.USER_REQUIRED_STEPS_SUCCESS_MESSAGES = exports.JOB_APPLY_SUCCESS_MESSAGES = exports.ENTITY_GROUP_SUCCESS_MESSAGES = exports.USER_HAS_STORAGE_SUCCESS_MESSAGES = exports.INSTITUTE_SUBSCRIPTION_PLAN_SUCCESS_MESSAGES = exports.WALLET_TRANSACTION_SUCCESS_MESSAGES = exports.WALLET_HISTORY_SUCCESS_MESSAGES = exports.WALLET_SUCCESS_MESSAGES = exports.REPLACE_TEACHER_SUCCESS_MESSAGES = void 0;
|
|
6
6
|
var SUCCESS_MESSAGES;
|
|
7
7
|
(function (SUCCESS_MESSAGES) {
|
|
8
8
|
SUCCESS_MESSAGES["CREATE_SUCCESS"] = "Resource created successfully";
|
|
@@ -825,3 +825,10 @@ var CANTEEN_SUCCESS_MESSAGES;
|
|
|
825
825
|
CANTEEN_SUCCESS_MESSAGES["UPDATE_SUCCESS"] = "Canteen updated successfully";
|
|
826
826
|
CANTEEN_SUCCESS_MESSAGES["DELETE_SUCCESS"] = "Canteen deleted successfully";
|
|
827
827
|
})(CANTEEN_SUCCESS_MESSAGES || (exports.CANTEEN_SUCCESS_MESSAGES = CANTEEN_SUCCESS_MESSAGES = {}));
|
|
828
|
+
var CAMPUS_SUCCESS_MESSAGES;
|
|
829
|
+
(function (CAMPUS_SUCCESS_MESSAGES) {
|
|
830
|
+
CAMPUS_SUCCESS_MESSAGES["CREATE_SUCCESS"] = "Campus created successfully";
|
|
831
|
+
CAMPUS_SUCCESS_MESSAGES["GET_SUCCESS"] = "Campus retrieved successfully";
|
|
832
|
+
CAMPUS_SUCCESS_MESSAGES["UPDATE_SUCCESS"] = "Campus updated successfully";
|
|
833
|
+
CAMPUS_SUCCESS_MESSAGES["DELETE_SUCCESS"] = "Campus deleted successfully";
|
|
834
|
+
})(CAMPUS_SUCCESS_MESSAGES || (exports.CAMPUS_SUCCESS_MESSAGES = CAMPUS_SUCCESS_MESSAGES = {}));
|
|
@@ -27,7 +27,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
27
27
|
subType: {
|
|
28
28
|
type: Sequelize.ENUM('BOYS', 'GIRLS', 'BOTH'),
|
|
29
29
|
allowNull: true,
|
|
30
|
-
field: 'sub_type'
|
|
30
|
+
field: 'sub_type',
|
|
31
31
|
},
|
|
32
32
|
area: { type: Sequelize.STRING, allowNull: true },
|
|
33
33
|
defaultDataCreate: {
|
|
@@ -69,6 +69,11 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
69
69
|
defaultValue: 'PENDING',
|
|
70
70
|
},
|
|
71
71
|
pdfId: { type: Sequelize.UUID, field: 'pdf_id', allowNull: true },
|
|
72
|
+
campusId: {
|
|
73
|
+
type: Sequelize.UUID,
|
|
74
|
+
field: 'campus_id',
|
|
75
|
+
allowNull: true,
|
|
76
|
+
},
|
|
72
77
|
createdBy: {
|
|
73
78
|
type: Sequelize.UUID,
|
|
74
79
|
allowNull: true,
|
|
@@ -124,7 +129,7 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
124
129
|
subType: {
|
|
125
130
|
type: Sequelize.ENUM('BOYS', 'GIRLS', 'BOTH'),
|
|
126
131
|
allowNull: true,
|
|
127
|
-
field: 'sub_type'
|
|
132
|
+
field: 'sub_type',
|
|
128
133
|
},
|
|
129
134
|
area: { type: Sequelize.STRING, allowNull: true },
|
|
130
135
|
defaultDataCreate: {
|
|
@@ -166,6 +171,11 @@ const up = async (queryInterface, Sequelize) => {
|
|
|
166
171
|
defaultValue: 'PENDING',
|
|
167
172
|
},
|
|
168
173
|
pdfId: { type: Sequelize.UUID, field: 'pdf_id', allowNull: true },
|
|
174
|
+
campusId: {
|
|
175
|
+
type: Sequelize.UUID,
|
|
176
|
+
field: 'campus_id',
|
|
177
|
+
allowNull: true,
|
|
178
|
+
},
|
|
169
179
|
createdBy: {
|
|
170
180
|
type: Sequelize.UUID,
|
|
171
181
|
allowNull: true,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { COMMAN_STATUS } from '../constants';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
export interface ICampusAttributes extends IDefaultAttributes {
|
|
4
|
+
id?: number;
|
|
5
|
+
title: string;
|
|
6
|
+
subTitle: string;
|
|
7
|
+
ownerId: string;
|
|
8
|
+
status: COMMAN_STATUS;
|
|
9
|
+
}
|
package/dist/interfaces/index.js
CHANGED
|
@@ -153,3 +153,4 @@ __exportStar(require("./workingDayInterface"), exports);
|
|
|
153
153
|
__exportStar(require("./workingShiftInterface"), exports);
|
|
154
154
|
__exportStar(require("./lostFoundItemInterface"), exports);
|
|
155
155
|
__exportStar(require("./canteenInterface"), exports);
|
|
156
|
+
__exportStar(require("./campusInterface"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { ICampusAttributes } from '../../interfaces/campusInterface';
|
|
3
|
+
import { COMMAN_STATUS } from '../../constants';
|
|
4
|
+
export declare class CampusModel extends Model<ICampusAttributes> implements ICampusAttributes {
|
|
5
|
+
id: number;
|
|
6
|
+
title: string;
|
|
7
|
+
subTitle: string;
|
|
8
|
+
ownerId: string;
|
|
9
|
+
status: COMMAN_STATUS;
|
|
10
|
+
readonly createdAt: Date;
|
|
11
|
+
readonly deletedAt: string;
|
|
12
|
+
readonly updatedAt: Date;
|
|
13
|
+
static associate(models: any): void;
|
|
14
|
+
}
|
|
15
|
+
export default CampusModel;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CampusModel = void 0;
|
|
4
|
+
const sequelize_1 = require("sequelize");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
const index_1 = require("./index");
|
|
7
|
+
class CampusModel extends sequelize_1.Model {
|
|
8
|
+
static associate(models) {
|
|
9
|
+
const { UserModel } = models;
|
|
10
|
+
CampusModel.belongsTo(UserModel, {
|
|
11
|
+
foreignKey: { name: 'createdBy', allowNull: true, field: 'created_by' },
|
|
12
|
+
as: 'createdByUser',
|
|
13
|
+
});
|
|
14
|
+
CampusModel.belongsTo(UserModel, {
|
|
15
|
+
foreignKey: { name: 'updatedBy', allowNull: true, field: 'updated_by' },
|
|
16
|
+
as: 'updatedByUser',
|
|
17
|
+
});
|
|
18
|
+
CampusModel.belongsTo(UserModel, {
|
|
19
|
+
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
20
|
+
as: 'deletedByUser',
|
|
21
|
+
});
|
|
22
|
+
CampusModel.belongsTo(UserModel, {
|
|
23
|
+
foreignKey: { name: 'ownerId', allowNull: true, field: 'owner_id' },
|
|
24
|
+
as: 'userDetailsOfCampus',
|
|
25
|
+
});
|
|
26
|
+
UserModel.hasMany(CampusModel, {
|
|
27
|
+
foreignKey: { name: 'ownerId', allowNull: true, field: 'owner_id' },
|
|
28
|
+
as: 'campusUserDetails',
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.CampusModel = CampusModel;
|
|
33
|
+
CampusModel.init({
|
|
34
|
+
id: {
|
|
35
|
+
type: sequelize_1.DataTypes.UUID,
|
|
36
|
+
allowNull: false,
|
|
37
|
+
primaryKey: true,
|
|
38
|
+
},
|
|
39
|
+
title: {
|
|
40
|
+
type: sequelize_1.DataTypes.STRING,
|
|
41
|
+
allowNull: false,
|
|
42
|
+
},
|
|
43
|
+
subTitle: {
|
|
44
|
+
type: sequelize_1.DataTypes.STRING,
|
|
45
|
+
allowNull: false,
|
|
46
|
+
field: 'country_code',
|
|
47
|
+
},
|
|
48
|
+
ownerId: {
|
|
49
|
+
type: sequelize_1.DataTypes.UUID,
|
|
50
|
+
allowNull: true,
|
|
51
|
+
field: 'owner_id', // this will be User Id;
|
|
52
|
+
},
|
|
53
|
+
status: {
|
|
54
|
+
type: sequelize_1.DataTypes.STRING,
|
|
55
|
+
defaultValue: constants_1.COMMAN_STATUS.ACTIVE
|
|
56
|
+
},
|
|
57
|
+
}, {
|
|
58
|
+
sequelize: index_1.sequelize,
|
|
59
|
+
modelName: 'CampusModel',
|
|
60
|
+
tableName: 'campus',
|
|
61
|
+
timestamps: true,
|
|
62
|
+
});
|
|
63
|
+
exports.default = CampusModel;
|
|
@@ -105,3 +105,4 @@ export { default as WalletModel } from './walletModel';
|
|
|
105
105
|
export { default as WorkingDayModel } from './workingDayModel';
|
|
106
106
|
export { default as WorkingShiftModel } from './workingShiftModel';
|
|
107
107
|
export { default as LostFoundItemModel } from './lostFoundItemModel';
|
|
108
|
+
export { default as CampusModel } from './campusModel';
|
|
@@ -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.LostFoundItemModel = exports.WorkingShiftModel = exports.WorkingDayModel = exports.WalletModel = exports.WalletHistoryModel = void 0;
|
|
8
|
+
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; } });
|
|
@@ -305,3 +305,5 @@ var workingShiftModel_1 = require("./workingShiftModel");
|
|
|
305
305
|
Object.defineProperty(exports, "WorkingShiftModel", { enumerable: true, get: function () { return __importDefault(workingShiftModel_1).default; } });
|
|
306
306
|
var lostFoundItemModel_1 = require("./lostFoundItemModel");
|
|
307
307
|
Object.defineProperty(exports, "LostFoundItemModel", { enumerable: true, get: function () { return __importDefault(lostFoundItemModel_1).default; } });
|
|
308
|
+
var campusModel_1 = require("./campusModel");
|
|
309
|
+
Object.defineProperty(exports, "CampusModel", { enumerable: true, get: function () { return __importDefault(campusModel_1).default; } });
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class InstituteModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { CountryModel, StateModel, CityModel, FileStorageModel, RulesRegulationModel, RoleModel, WorkingDayModel, UserModel } = models;
|
|
8
|
+
const { CountryModel, StateModel, CityModel, FileStorageModel, RulesRegulationModel, RoleModel, WorkingDayModel, UserModel, CampusModel } = models;
|
|
9
9
|
InstituteModel.belongsTo(CountryModel, { foreignKey: 'country', as: 'countryDetails' });
|
|
10
10
|
InstituteModel.belongsTo(StateModel, { foreignKey: 'state', as: 'stateDetails' });
|
|
11
11
|
InstituteModel.belongsTo(CityModel, { foreignKey: 'city', as: 'cityDetails' });
|
|
@@ -45,6 +45,14 @@ class InstituteModel extends sequelize_1.Model {
|
|
|
45
45
|
foreignKey: { name: 'deletedBy', allowNull: true, field: 'deleted_by' },
|
|
46
46
|
as: 'deletedByUser',
|
|
47
47
|
});
|
|
48
|
+
InstituteModel.belongsTo(CampusModel, {
|
|
49
|
+
foreignKey: { name: 'campusId', field: 'campus_id' },
|
|
50
|
+
as: 'campusDetails',
|
|
51
|
+
});
|
|
52
|
+
CampusModel.hasMany(InstituteModel, {
|
|
53
|
+
foreignKey: { name: 'campusId', field: 'campus_id' },
|
|
54
|
+
as: 'instituteCampus',
|
|
55
|
+
});
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
InstituteModel.init({
|
|
@@ -112,6 +120,11 @@ InstituteModel.init({
|
|
|
112
120
|
defaultValue: app_1.PLANNER_SYNC_STATUS.PENDING,
|
|
113
121
|
},
|
|
114
122
|
pdfId: { type: sequelize_1.DataTypes.UUID, field: 'pdf_id', allowNull: true },
|
|
123
|
+
campusId: {
|
|
124
|
+
type: sequelize_1.DataTypes.UUID,
|
|
125
|
+
field: 'campus_id',
|
|
126
|
+
allowNull: true,
|
|
127
|
+
},
|
|
115
128
|
}, {
|
|
116
129
|
modelName: 'InstituteModel',
|
|
117
130
|
tableName: 'institutes',
|
|
@@ -5,7 +5,7 @@ const index_1 = require("./index");
|
|
|
5
5
|
const app_1 = require("../../constants/app");
|
|
6
6
|
class LostFoundItemModel extends sequelize_1.Model {
|
|
7
7
|
static associate(models) {
|
|
8
|
-
const { UserModel, InstituteModel, AcademicCalendarModel } = models;
|
|
8
|
+
const { UserModel, InstituteModel, AcademicCalendarModel, FileStorageModel } = models;
|
|
9
9
|
LostFoundItemModel.belongsTo(UserModel, {
|
|
10
10
|
foreignKey: {
|
|
11
11
|
name: 'createdBy',
|
|
@@ -54,6 +54,14 @@ class LostFoundItemModel extends sequelize_1.Model {
|
|
|
54
54
|
foreignKey: 'academicCalendarId',
|
|
55
55
|
as: 'academicCalendarIdHasLostFound',
|
|
56
56
|
});
|
|
57
|
+
LostFoundItemModel.belongsTo(FileStorageModel, {
|
|
58
|
+
foreignKey: { name: 'fileStorageId', field: 'file_storage_id' },
|
|
59
|
+
as: 'lostFoundItemFileStorage',
|
|
60
|
+
});
|
|
61
|
+
FileStorageModel.hasMany(LostFoundItemModel, {
|
|
62
|
+
foreignKey: { name: 'fileStorageId', field: 'file_storage_id' },
|
|
63
|
+
as: 'lostFoundItemHasFileList',
|
|
64
|
+
});
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
67
|
LostFoundItemModel.init({
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -145,3 +145,4 @@ __exportStar(require("./workingDayType"), exports);
|
|
|
145
145
|
__exportStar(require("./workingShiftType"), exports);
|
|
146
146
|
__exportStar(require("./lostFoundItemType"), exports);
|
|
147
147
|
__exportStar(require("./canteenType"), exports);
|
|
148
|
+
__exportStar(require("./campusType"), exports);
|
package/package.json
CHANGED