@kipicore/dbcore 1.1.579 → 1.1.581
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/app.d.ts +13 -0
- package/dist/constants/app.js +16 -1
- package/dist/helpers/utils.d.ts +9 -0
- package/dist/helpers/utils.js +43 -1
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/userFinalResultInterface.d.ts +30 -0
- package/dist/interfaces/userFinalResultInterface.js +2 -0
- package/dist/models/mongodb/index.d.ts +1 -0
- package/dist/models/mongodb/index.js +3 -1
- package/dist/models/mongodb/userFinalResultModel.d.ts +4 -0
- package/dist/models/mongodb/userFinalResultModel.js +68 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/studentFeeHistoryType.d.ts +15 -0
- package/dist/types/studentFeeTypeCollectionType.d.ts +13 -0
- package/dist/types/typeManagementType.d.ts +9 -0
- package/dist/types/userFinalResultType.d.ts +2 -0
- package/dist/types/userFinalResultType.js +2 -0
- package/dist/types/userHasBatchType.d.ts +5 -0
- package/dist/types/userHasParentType.d.ts +8 -0
- package/dist/types/userHasRollNumberType.d.ts +11 -0
- package/dist/types/visitorBookType.d.ts +8 -1
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -1560,3 +1560,16 @@ export declare enum RMS_ENTITY_TYPE {
|
|
|
1560
1560
|
PURCHASE_ORDER = "PURCHASE_ORDER",
|
|
1561
1561
|
GRN = "GRN"
|
|
1562
1562
|
}
|
|
1563
|
+
export declare enum GRADE {
|
|
1564
|
+
'A+' = "A+",
|
|
1565
|
+
A = "A",
|
|
1566
|
+
'B+' = "B+",
|
|
1567
|
+
B = "B",
|
|
1568
|
+
C = "C",
|
|
1569
|
+
D = "D",
|
|
1570
|
+
E = "E"
|
|
1571
|
+
}
|
|
1572
|
+
export declare enum FINAL_RESULT {
|
|
1573
|
+
PASS = "Pass",
|
|
1574
|
+
FAIL = "Fail"
|
|
1575
|
+
}
|
package/dist/constants/app.js
CHANGED
|
@@ -5,7 +5,7 @@ exports.CHAPTER_INDEX_TYPE = exports.IMAGE__NAME = exports.INQUIRY_STATUS = expo
|
|
|
5
5
|
exports.DISCOUNT_TYPE = exports.CONTACT_FEED_BACK_TYPE = exports.PLANNER_SYNC_STATUS = exports.NOTIFICATION_ACTION = exports.ONLINE_EXAM_NOTIFICATION_TYPE = exports.NOTIFICATION_MODULE_TYPE = exports.NOTIFICATION_STATUS = exports.NOTIFICATION_TYPE = exports.PROJECT_ASSESSMENT_OPTION_STATUS = exports.USER_BOOK_ASSESSMENT_STATUS = exports.BOOK_ASSESSMENT_DATE_STATUS = exports.TASK_MANAGEMENT_STATUS = exports.USER_DETAILS_FILED = exports.DEVICE_TYPE = exports.templateKeyWord = exports.bankAccountRegexMap = exports.EMAIL_SUBJECTS = exports.PDF_TEMPLATES = exports.EMAIL_TEMPLATES = exports.PINCODE_API_URL = exports.APPLE_AUTH = exports.META_AUTH = exports.GOOGLE_AUTH = exports.API_URL = exports.DEFAULT_USER_LOGO = exports.DEFAULT_INSTITUTED_LOGO = exports.UPLOAD_PATH = exports.SVG_URL_PATH = exports.TO_DO_STATUS = exports.LECTURE_TITLE = exports.LECTURE_STATUS = exports.SCHOOL_INFORMATION_STEP = exports.CASTE = exports.RELIGION_CASTE = exports.NATIONALITY = exports.CATEGORY = exports.IS_PRINCIPAL = exports.FEE_TYPE = exports.BOOLEAN_STATUS = exports.PROPERTY_STATUS = exports.DESIGNATION_OF_PERSON = exports.TRUST_REGISTERED_UNDER = exports.TRUST_TYPE = exports.SVA_NAME = exports.QDC_NAME = exports.USER_PAYOUT_TYPE = exports.PARENTS_CHILDREN_CURRENT = exports.CHAPTER_INDEX_FILE_TYPE = exports.FEE_HISTORY_STATUS = exports.USER_CHAPTER_INDEX_STATUS = void 0;
|
|
6
6
|
exports.CERTIFICATE_FOR = exports.SHEET_TYPE = exports.COMPETITION_USER_ROLE = exports.RESULT_STATUS = exports.COMPETITION_STATUS = exports.STATUS_BY_PARENTS = exports.COMPETITION_TYPE = exports.CAMPUS_CARNIVAL_STATUS = exports.COMPETITION_TYPE_CATEGORY = exports.COMPETITION_EVENTS = exports.PAYMENT_STATUS = exports.INCOME_EXPENSE_SOURCE = exports.INCOME_EXPENSE_TYPE = exports.APPOINTMENT_STATUS = exports.MAINTENANCE_MODULE_NAME = exports.MAINTENANCE_TYPE = exports.MAINTENANCE_MODE = exports.ASSIGN_FILE_TYPE = exports.LOST_FOUND_ITEM_STATUS = exports.PAYMENT_PROCESSING_CALLBACK_URL = exports.PAYMENT_PROCESSING_PAGE_URL = exports.PAYMENT_PROCESSING_STATUS_URL = exports.WALLET_TRANSACTION_VALID_DATE_FOR_OTP_IN_MINUTES = exports.WALLET_TRANSACTION_VALID_DATE_IN_MINUTES = exports.PAYMENT_METHODS = exports.PAYMENT_GATEWAY_TYPES = exports.JOB_ACTION = exports.ONE_GB_BYTES = exports.CHARGE_PER_TRANSACTION_ITEM_UNIT = exports.INSTITUTE_SUBSCRIPTION_PLAN_STATUS = exports.WALLET_TRANSACTION_USERS_TYPE = exports.WALLET_HISTORY_STATUS = exports.WALLET_HISTORY_ACTION = exports.WALLET_HISTORY_ITEM_TYPE = exports.WALLET_HISTORY_TYPE = exports.REPLACE_TEACHER_STATUS = exports.TEACHER_TYPE = exports.INVOICE_TYPE = exports.PURCHASE_STATUS = exports.COLUMN_LIST_TITLE = exports.INVOICE_PAYMENT_TYPE = exports.PDF_CHEQUE_FREQUENCY = exports.PDF_CHEQUE_STATUS = exports.LANGUAGES = exports.HOME_WORK_STATUS = exports.SOCKET_EVENTS = exports.SUBSCRIPTION_PLAN_FILES_TYPE = exports.VALID_CURRENCY = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_PLAN_CHARGE_INTERVAL = void 0;
|
|
7
7
|
exports.RMS_STOCK_SCOPE = exports.RMS_AUDIT_ACTION = exports.RMS_EXPENSE_TYPE = exports.RMS_DIGITAL_STATUS = exports.RMS_BOOKING_STATUS = exports.RMS_TICKET_STATUS = exports.RMS_BOOK_COPY_STATUS = exports.RMS_ASSET_LIFECYCLE = exports.RMS_PO_FULFILLMENT_STATUS = exports.RMS_DECISION = exports.RMS_PRIORITY = exports.RMS_APPROVAL_STATUS = exports.RMS_TRANSACTION_TYPE = exports.RMS_RESOURCE_UNIT = exports.RMS_RESOURCE_TYPE = exports.CERTIFICATE_REQUEST_TYPE = exports.CERTIFICATE_REQUEST_STATUS = exports.FEE_SUBMISSION_STATUS = exports.VIDEO_DIRECTION_TYPE = exports.VIDEO_EVENT_TYPE = exports.USER_HAS_PENALTY_TITLE = exports.USER_HAS_PENALTY_TYPE = exports.PAYOUT_STATUS = exports.NOTICEBOARD_STATUS = exports.NOTICEBOARD_TYPE = exports.PERMISSION_TYPE = exports.NOTIFICATION_SEND_STATUS = exports.MEMBERSHIP_STATUS = exports.COMMUNITY_TYPE = exports.DESIGNATION_TYPE = exports.ADDITIONAL_PAYOUT_TYPE = exports.POSTAL_DISPATCH_STATUS = exports.CALL_TYPE = exports.SEARCH_TYPE = exports.REPORT_TYPE = exports.DEVICE_TYPE_APP_ANALYTICS = exports.APP_ANALYTICS_EVENT_TYPE = exports.EXPORT_SHEET_TYPE = exports.GRANT_AND_DONATION_TYPE = exports.TICKET_RAISE_PRIORITY = exports.TICKET_RAISE_STATUS = exports.TERM_AND_CONDITION_STATUS = exports.EDUCATION_OFFICER_TYPE = exports.HOME_WORK_TYPE = exports.STUDENT_FEE_PROCESS_STATUS = exports.FEE_COLLECTION_TYPE = exports.BANK_ACCOUNT_TYPE = exports.STUDENT_LEAVE_TYPE = exports.STUDENT_LEAVE_STATUS = exports.CERTIFICATE_TYPE = void 0;
|
|
8
|
-
exports.RMS_ENTITY_TYPE = void 0;
|
|
8
|
+
exports.FINAL_RESULT = exports.GRADE = exports.RMS_ENTITY_TYPE = void 0;
|
|
9
9
|
const env_1 = require("../configs/env");
|
|
10
10
|
exports.SIXTY = 60;
|
|
11
11
|
exports.ONE_HUNDRED = 100;
|
|
@@ -1878,3 +1878,18 @@ var RMS_ENTITY_TYPE;
|
|
|
1878
1878
|
RMS_ENTITY_TYPE["PURCHASE_ORDER"] = "PURCHASE_ORDER";
|
|
1879
1879
|
RMS_ENTITY_TYPE["GRN"] = "GRN";
|
|
1880
1880
|
})(RMS_ENTITY_TYPE || (exports.RMS_ENTITY_TYPE = RMS_ENTITY_TYPE = {}));
|
|
1881
|
+
var GRADE;
|
|
1882
|
+
(function (GRADE) {
|
|
1883
|
+
GRADE["A+"] = "A+";
|
|
1884
|
+
GRADE["A"] = "A";
|
|
1885
|
+
GRADE["B+"] = "B+";
|
|
1886
|
+
GRADE["B"] = "B";
|
|
1887
|
+
GRADE["C"] = "C";
|
|
1888
|
+
GRADE["D"] = "D";
|
|
1889
|
+
GRADE["E"] = "E";
|
|
1890
|
+
})(GRADE || (exports.GRADE = GRADE = {}));
|
|
1891
|
+
var FINAL_RESULT;
|
|
1892
|
+
(function (FINAL_RESULT) {
|
|
1893
|
+
FINAL_RESULT["PASS"] = "Pass";
|
|
1894
|
+
FINAL_RESULT["FAIL"] = "Fail";
|
|
1895
|
+
})(FINAL_RESULT || (exports.FINAL_RESULT = FINAL_RESULT = {}));
|
package/dist/helpers/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GRADE } from '../constants/app';
|
|
1
2
|
import Joi from 'joi';
|
|
2
3
|
import { OrderItem } from 'sequelize';
|
|
3
4
|
export declare const pick: <T extends object, K extends keyof T>(objOrArray: T | T[], keys: K[]) => Pick<T, K> | Pick<T, K>[];
|
|
@@ -171,4 +172,12 @@ export declare const verifyHmacSHA256: (data: string, secret: string, signature:
|
|
|
171
172
|
export declare const generateVoucherCode: (format?: string) => string;
|
|
172
173
|
export declare const getCityAreas: (cityName?: string) => Promise<Partial<TAeraModelCreationAttributes>[]>;
|
|
173
174
|
export declare const getNextLetter: (current: string) => string;
|
|
175
|
+
export declare const calculateGrade: (subject: {
|
|
176
|
+
total: number;
|
|
177
|
+
pass: number;
|
|
178
|
+
obtained: number;
|
|
179
|
+
}) => string;
|
|
180
|
+
export declare const getOverallGrade: (subjects: {
|
|
181
|
+
grade: GRADE;
|
|
182
|
+
}[]) => GRADE;
|
|
174
183
|
export {};
|
package/dist/helpers/utils.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getNextLetter = exports.getCityAreas = exports.generateVoucherCode = exports.verifyHmacSHA256 = exports.generateHmacSHA256 = exports.customPagination = exports.uuidIdAlternatives = exports.objectIdAlternatives = exports.enumAlternatives = exports.fromSnakeCaseToNormalText = exports.normalizeToArray = exports.capitalizeFirst = exports.parseOrderOptions = exports.isValidUUID = exports.removeFalsyValues = exports.flattenNestedStructure = exports.buildNestedStructure = exports.getParentsByChildrenId = exports.getChildrenByParentId = exports.sortArray = exports.groupByFields = exports.endOfDay = exports.generateUuidToNumber = exports.startOfDay = exports.isDateWithinRange = exports.isTimeWithinRange = exports.keyByFieldOrFields = exports.getUniqueArrayByFields = exports.generateTempPassword = exports.generateAlphaNumericCode = exports.generateOtp = exports.ensureDirectoryExists = exports.omit = exports.isValidMongoDbId = exports.pick = void 0;
|
|
39
|
+
exports.getOverallGrade = exports.calculateGrade = exports.getNextLetter = exports.getCityAreas = exports.generateVoucherCode = exports.verifyHmacSHA256 = exports.generateHmacSHA256 = exports.customPagination = exports.uuidIdAlternatives = exports.objectIdAlternatives = exports.enumAlternatives = exports.fromSnakeCaseToNormalText = exports.normalizeToArray = exports.capitalizeFirst = exports.parseOrderOptions = exports.isValidUUID = exports.removeFalsyValues = exports.flattenNestedStructure = exports.buildNestedStructure = exports.getParentsByChildrenId = exports.getChildrenByParentId = exports.sortArray = exports.groupByFields = exports.endOfDay = exports.generateUuidToNumber = exports.startOfDay = exports.isDateWithinRange = exports.isTimeWithinRange = exports.keyByFieldOrFields = exports.getUniqueArrayByFields = exports.generateTempPassword = exports.generateAlphaNumericCode = exports.generateOtp = exports.ensureDirectoryExists = exports.omit = exports.isValidMongoDbId = exports.pick = void 0;
|
|
40
40
|
exports.groupByFieldOrFields = groupByFieldOrFields;
|
|
41
41
|
exports.slugify = slugify;
|
|
42
42
|
exports.assignNonNull = assignNonNull;
|
|
@@ -719,3 +719,45 @@ const getNextLetter = (current) => {
|
|
|
719
719
|
return code >= 90 ? 'A' : String.fromCharCode(code + 1);
|
|
720
720
|
};
|
|
721
721
|
exports.getNextLetter = getNextLetter;
|
|
722
|
+
const calculateGrade = (subject) => {
|
|
723
|
+
const percentage = (subject.obtained / subject.total) * 100;
|
|
724
|
+
if (subject.obtained < subject.pass) {
|
|
725
|
+
return app_1.GRADE.E;
|
|
726
|
+
}
|
|
727
|
+
if (percentage >= 90) {
|
|
728
|
+
return app_1.GRADE['A+'];
|
|
729
|
+
}
|
|
730
|
+
if (percentage >= 80 && percentage < 90) {
|
|
731
|
+
return app_1.GRADE.A;
|
|
732
|
+
}
|
|
733
|
+
if (percentage >= 70 && percentage < 80) {
|
|
734
|
+
return app_1.GRADE['B+'];
|
|
735
|
+
}
|
|
736
|
+
if (percentage >= 60 && percentage < 70) {
|
|
737
|
+
return app_1.GRADE.B;
|
|
738
|
+
}
|
|
739
|
+
if (percentage >= 50 && percentage < 60) {
|
|
740
|
+
return app_1.GRADE.C;
|
|
741
|
+
}
|
|
742
|
+
return app_1.GRADE.D;
|
|
743
|
+
};
|
|
744
|
+
exports.calculateGrade = calculateGrade;
|
|
745
|
+
const gradePriority = {
|
|
746
|
+
[app_1.GRADE['A+']]: 1,
|
|
747
|
+
[app_1.GRADE.A]: 2,
|
|
748
|
+
[app_1.GRADE['B+']]: 3,
|
|
749
|
+
[app_1.GRADE.B]: 4,
|
|
750
|
+
[app_1.GRADE.C]: 5,
|
|
751
|
+
[app_1.GRADE.D]: 6,
|
|
752
|
+
[app_1.GRADE.E]: 7,
|
|
753
|
+
};
|
|
754
|
+
const getOverallGrade = (subjects) => {
|
|
755
|
+
let worstGrade = app_1.GRADE['A+'];
|
|
756
|
+
subjects.forEach(sub => {
|
|
757
|
+
if (gradePriority[sub.grade] > gradePriority[worstGrade]) {
|
|
758
|
+
worstGrade = sub.grade;
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
return worstGrade;
|
|
762
|
+
};
|
|
763
|
+
exports.getOverallGrade = getOverallGrade;
|
package/dist/interfaces/index.js
CHANGED
|
@@ -245,3 +245,4 @@ __exportStar(require("./rmsAssetInterface"), exports);
|
|
|
245
245
|
__exportStar(require("./rmsStorageInterface"), exports);
|
|
246
246
|
__exportStar(require("./rmsAssetTransactionInterface"), exports);
|
|
247
247
|
__exportStar(require("./rmsResourceDetailsInterface"), exports);
|
|
248
|
+
__exportStar(require("./userFinalResultInterface"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Document, Types } from 'mongoose';
|
|
2
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
+
import { FINAL_RESULT, GRADE } from '../constants';
|
|
4
|
+
export interface IUserFinalResultSubjectSchema {
|
|
5
|
+
name: string;
|
|
6
|
+
total: number;
|
|
7
|
+
pass: number;
|
|
8
|
+
obtained: number;
|
|
9
|
+
grade: GRADE;
|
|
10
|
+
grMarks?: number;
|
|
11
|
+
disMarks?: number;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
export interface IUserFinalResultModelAttributes extends IDefaultAttributes, Document {
|
|
15
|
+
totalMarks: number;
|
|
16
|
+
passMarks: number;
|
|
17
|
+
obtainedMarks: number;
|
|
18
|
+
percentage: number;
|
|
19
|
+
overallGrade: GRADE;
|
|
20
|
+
rank: number;
|
|
21
|
+
result: FINAL_RESULT;
|
|
22
|
+
userId: string;
|
|
23
|
+
userInstituteMetaId: Types.ObjectId;
|
|
24
|
+
subjects: IUserFinalResultSubjectSchema[];
|
|
25
|
+
standard: string;
|
|
26
|
+
standardId: string;
|
|
27
|
+
batchId: string;
|
|
28
|
+
instituteId: string;
|
|
29
|
+
academicCalendarId: string;
|
|
30
|
+
}
|
|
@@ -72,3 +72,4 @@ export { default as PastYearRecordTopperModel } from './pastYearRecordTopperMode
|
|
|
72
72
|
export { default as OnlineLectureModel } from './onlineLectureModel';
|
|
73
73
|
export { default as RmsAuditLogModel } from './rmsAuditLogModel';
|
|
74
74
|
export { default as RmsResourceDetailsModel } from './rmsResourceDetailsModel';
|
|
75
|
+
export { default as UserFinalResultModel } from './userFinalResultModel';
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.PollSelectionModel = exports.CreatePollModel = exports.SheetFieldMappingModel = exports.FileUploadUserDetails = exports.CompetitionUsersModel = exports.CompetitionGroupModel = exports.CompetitionModel = exports.CampusCarnivalModel = exports.AppointmentHistoryModel = exports.AppointmentModel = exports.SeatingArrangementModel = exports.AssignFileModel = exports.ThemeModel = exports.BDayWishModel = exports.AdditionalDetailModel = exports.CanteenModel = exports.WalletTransactionModel = exports.VideoAnalystModel = exports.UserSchoolMetaModel = exports.UserInstituteMetaModel = exports.UserDetailsModel = exports.UniqueNumberCounterModel = exports.TaskManagementModel = exports.SubscriptionPlanModel = exports.SubjectIndexModel = exports.ReplaceTeacherModel = exports.PlannerModel = exports.PhotosGalleryModel = exports.JobApplyModel = exports.InvoiceModel = exports.InquiryModel = exports.InformationSupportModel = exports.HolidayModel = exports.GenerateIdCardModel = exports.FeedBackModel = exports.FeeReminderTypeModel = exports.ExamModel = exports.ExamHasAnswerSheetModel = exports.ExamGroupModel = exports.EventModel = exports.DashboardManagementModel = exports.DailyBookModel = exports.ColumnModel = exports.CertificatesManagementModel = exports.CertificatesHistoryModel = exports.CareerModel = exports.BlogModel = exports.AttendanceModel = exports.ApprovalRequestModel = exports.connectMongoDb = void 0;
|
|
7
|
-
exports.RmsResourceDetailsModel = exports.RmsAuditLogModel = exports.OnlineLectureModel = exports.PastYearRecordTopperModel = exports.FeeSubmissionModel = exports.AdvertisementModel = exports.RoleHasPermissionModel = exports.CommunityMessageModel = exports.CommunityGroupMemberModel = exports.CommunityGroupModel = exports.OfferAndDiscountModel = exports.SubscriptionConfigurationModel = exports.ModulePriceModel = exports.PdcChequeConfigurationModel = exports.FinalMarkSheetModel = exports.MarkSheetConfigurationModel = exports.AppAnalyticsEventModel = exports.GrantAndDonationModel = exports.TicketRaiseModel = exports.EducationOfficerModel = exports.InstituteFeeModel = exports.SchoolFee1Model = exports.FeeConfigModel = exports.EventTemplatesModel = void 0;
|
|
7
|
+
exports.UserFinalResultModel = exports.RmsResourceDetailsModel = exports.RmsAuditLogModel = exports.OnlineLectureModel = exports.PastYearRecordTopperModel = exports.FeeSubmissionModel = exports.AdvertisementModel = exports.RoleHasPermissionModel = exports.CommunityMessageModel = exports.CommunityGroupMemberModel = exports.CommunityGroupModel = exports.OfferAndDiscountModel = exports.SubscriptionConfigurationModel = exports.ModulePriceModel = exports.PdcChequeConfigurationModel = exports.FinalMarkSheetModel = exports.MarkSheetConfigurationModel = exports.AppAnalyticsEventModel = exports.GrantAndDonationModel = exports.TicketRaiseModel = exports.EducationOfficerModel = exports.InstituteFeeModel = exports.SchoolFee1Model = exports.FeeConfigModel = exports.EventTemplatesModel = void 0;
|
|
8
8
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
9
9
|
const env_1 = require("../../configs/env");
|
|
10
10
|
const transformIdInQueryPlugin_1 = __importDefault(require("./plugin/transformIdInQueryPlugin"));
|
|
@@ -171,3 +171,5 @@ var rmsAuditLogModel_1 = require("./rmsAuditLogModel");
|
|
|
171
171
|
Object.defineProperty(exports, "RmsAuditLogModel", { enumerable: true, get: function () { return __importDefault(rmsAuditLogModel_1).default; } });
|
|
172
172
|
var rmsResourceDetailsModel_1 = require("./rmsResourceDetailsModel");
|
|
173
173
|
Object.defineProperty(exports, "RmsResourceDetailsModel", { enumerable: true, get: function () { return __importDefault(rmsResourceDetailsModel_1).default; } });
|
|
174
|
+
var userFinalResultModel_1 = require("./userFinalResultModel");
|
|
175
|
+
Object.defineProperty(exports, "UserFinalResultModel", { enumerable: true, get: function () { return __importDefault(userFinalResultModel_1).default; } });
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
+
const constants_1 = require("../../constants");
|
|
38
|
+
const subjectSchema = new mongoose_1.Schema({
|
|
39
|
+
name: { type: String, required: true },
|
|
40
|
+
total: { type: Number, required: true },
|
|
41
|
+
pass: { type: Number, required: true },
|
|
42
|
+
obtained: { type: Number, required: true },
|
|
43
|
+
grade: { type: String, enum: Object.values(constants_1.GRADE), required: true },
|
|
44
|
+
grMarks: { type: Number, required: false },
|
|
45
|
+
disMarks: { type: Number, required: false },
|
|
46
|
+
}, { _id: false, strict: false });
|
|
47
|
+
const userFinalResultSchema = new mongoose_1.Schema({
|
|
48
|
+
totalMarks: { type: Number, required: true },
|
|
49
|
+
passMarks: { type: Number, required: true },
|
|
50
|
+
obtainedMarks: { type: Number, required: true },
|
|
51
|
+
percentage: { type: Number, required: true },
|
|
52
|
+
overallGrade: { type: String, enum: Object.values(constants_1.GRADE), required: true },
|
|
53
|
+
rank: { type: Number, required: true },
|
|
54
|
+
result: { type: String, enum: Object.values(constants_1.FINAL_RESULT), required: true },
|
|
55
|
+
userId: { type: String, required: true },
|
|
56
|
+
userInstituteMetaId: { type: mongoose_1.Schema.Types.ObjectId, required: true },
|
|
57
|
+
subjects: { type: [subjectSchema], required: true },
|
|
58
|
+
standard: { type: String, required: true },
|
|
59
|
+
standardId: { type: String, required: true },
|
|
60
|
+
batchId: { type: String, required: true },
|
|
61
|
+
instituteId: { type: String, required: true },
|
|
62
|
+
academicCalendarId: { type: String, required: true },
|
|
63
|
+
}, {
|
|
64
|
+
timestamps: true,
|
|
65
|
+
versionKey: false,
|
|
66
|
+
});
|
|
67
|
+
const UserFinalResultModel = mongoose_1.default.model('user_final_result', userFinalResultSchema);
|
|
68
|
+
exports.default = UserFinalResultModel;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -235,3 +235,4 @@ __exportStar(require("./userHasGraceMarksType"), exports);
|
|
|
235
235
|
__exportStar(require("./rmsStorageType"), exports);
|
|
236
236
|
__exportStar(require("./rmsAssetTransactionType"), exports);
|
|
237
237
|
__exportStar(require("./rmsResourceDetailsType"), exports);
|
|
238
|
+
__exportStar(require("./userFinalResultType"), exports);
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
2
|
import { IStudentFeeHistoryModelAttributes } from '../interfaces/studentFeeHistoryInterface';
|
|
3
|
+
import { IAcademicCalendarModelAttributes, IBankAccountDetailsInterfaceModelAttributes, IBatchModelAttributes, IFeeType1ModelAttributes, IFileStorageAttributes, IInstituteAttributes, IInstituteEntityAttributes, IStudentFeeCollectionModelAttributes, IUserAttributes } from '../interfaces';
|
|
3
4
|
export type TStudentFeeHistoryModelCreationAttributes = Optional<IStudentFeeHistoryModelAttributes, 'id'>;
|
|
5
|
+
export type TStudentFeeHistoryCreationWithAssociation = IStudentFeeHistoryModelAttributes & {
|
|
6
|
+
feeHistoryCollection?: IStudentFeeCollectionModelAttributes;
|
|
7
|
+
studentFeeHistoryInvoice?: IFileStorageAttributes;
|
|
8
|
+
studentFeeHistoryAccount?: IBankAccountDetailsInterfaceModelAttributes;
|
|
9
|
+
studentFeeHistoryInstitute?: IInstituteAttributes;
|
|
10
|
+
studentFeeHistoryUser?: IUserAttributes;
|
|
11
|
+
studentFeeHistoryAcaCal?: IAcademicCalendarModelAttributes;
|
|
12
|
+
studentFeeHistoryFeeType?: IFeeType1ModelAttributes;
|
|
13
|
+
createdByUser?: IUserAttributes;
|
|
14
|
+
updatedByUser?: IUserAttributes;
|
|
15
|
+
deletedByUser?: IUserAttributes;
|
|
16
|
+
studentHistorySubject?: IInstituteEntityAttributes;
|
|
17
|
+
studentHistoryBatch?: IBatchModelAttributes;
|
|
18
|
+
};
|
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
2
|
import { IStudentFeeTypeCollectionModelAttributes } from '../interfaces/studentFeeTypeCollectionInterface';
|
|
3
|
+
import { IAcademicCalendarModelAttributes, IBatchModelAttributes, IFeeType1ModelAttributes, IInstituteAttributes, IInstituteEntityAttributes, IStudentFeeCollectionModelAttributes, IUserAttributes } from '../interfaces';
|
|
3
4
|
export type TStudentFeeTypeCollectionModelCreationAttributes = Optional<IStudentFeeTypeCollectionModelAttributes, 'id'>;
|
|
5
|
+
export type TStudentFeeTypeCreationWithAssociation = IStudentFeeTypeCollectionModelAttributes & {
|
|
6
|
+
feeTypeCollection?: IStudentFeeCollectionModelAttributes;
|
|
7
|
+
feeTypeCollectionInstitute?: IInstituteAttributes;
|
|
8
|
+
feeTypeCollectionUser?: IUserAttributes;
|
|
9
|
+
feeTypeCollectionAcaCal?: IAcademicCalendarModelAttributes;
|
|
10
|
+
feeTypeCollectionSubject?: IInstituteEntityAttributes;
|
|
11
|
+
feeTypeCollectionBatch?: IBatchModelAttributes;
|
|
12
|
+
feeTypeCollectionFeeType?: IFeeType1ModelAttributes;
|
|
13
|
+
createdByUser?: IUserAttributes;
|
|
14
|
+
updatedByUser?: IUserAttributes;
|
|
15
|
+
deletedByUser?: IUserAttributes;
|
|
16
|
+
};
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
2
|
import { ITypeManagementModelAttributes } from '../interfaces/typeManagementInterface';
|
|
3
|
+
import { IAcademicCalendarModelAttributes, IInstituteAttributes, IUserAttributes } from '../interfaces';
|
|
3
4
|
export type TTypeManagementModelCreationAttributes = Optional<ITypeManagementModelAttributes, 'id'>;
|
|
5
|
+
export type TTypeManagementWithAssociation = ITypeManagementModelAttributes & {
|
|
6
|
+
institute?: IInstituteAttributes;
|
|
7
|
+
typeManagementAcaCal?: IAcademicCalendarModelAttributes;
|
|
8
|
+
typeManagementParent?: ITypeManagementModelAttributes;
|
|
9
|
+
createdByUser?: IUserAttributes;
|
|
10
|
+
updatedByUser?: IUserAttributes;
|
|
11
|
+
deletedByUser?: IUserAttributes;
|
|
12
|
+
};
|
|
@@ -2,8 +2,13 @@ import { Optional } from 'sequelize';
|
|
|
2
2
|
import { IUserHasBatchModelAttributes } from '../interfaces/userHasBatchInterface';
|
|
3
3
|
import { IUserAttributes } from '../interfaces/userInterface';
|
|
4
4
|
import { IBatchModelAttributes } from '../interfaces/batchInterface';
|
|
5
|
+
import { IAcademicCalendarModelAttributes } from '../interfaces';
|
|
5
6
|
export type TUserHasBatchModelCreationAttributes = Optional<IUserHasBatchModelAttributes, 'id'>;
|
|
6
7
|
export type TUserHasBatchModelAttributesWithassociate = IUserHasBatchModelAttributes & {
|
|
7
8
|
user?: IUserAttributes;
|
|
8
9
|
batch?: IBatchModelAttributes;
|
|
10
|
+
userHBAcademicCal?: IAcademicCalendarModelAttributes;
|
|
11
|
+
createdByUser?: IUserAttributes;
|
|
12
|
+
updatedByUser?: IUserAttributes;
|
|
13
|
+
deletedByUser?: IUserAttributes;
|
|
9
14
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
2
|
import { IUserHasParentAttributes } from '../interfaces/userHasParentInterface';
|
|
3
|
+
import { IUserAttributes } from '../interfaces';
|
|
3
4
|
export type TUserHasParentCreationAttributes = Optional<IUserHasParentAttributes, 'id'>;
|
|
4
5
|
export type TCreateParentUserType = {
|
|
5
6
|
id: string;
|
|
@@ -8,3 +9,10 @@ export type TCreateParentUserType = {
|
|
|
8
9
|
export type TCreateParentType = IUserHasParentAttributes & {
|
|
9
10
|
users: TCreateParentUserType[];
|
|
10
11
|
};
|
|
12
|
+
export type TUserHasParentWithAssociation = IUserHasParentAttributes & {
|
|
13
|
+
user?: IUserAttributes;
|
|
14
|
+
parent?: IUserAttributes;
|
|
15
|
+
createdByUser?: IUserAttributes;
|
|
16
|
+
updatedByUser?: IUserAttributes;
|
|
17
|
+
deletedByUser?: IUserAttributes;
|
|
18
|
+
};
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
2
|
import { IUserHasRollNumberModelAttributes } from '../interfaces/userHasRollNumberInterface';
|
|
3
|
+
import { IAcademicCalendarModelAttributes, IBatchModelAttributes, IInstituteAttributes, IUserAttributes } from '../interfaces';
|
|
3
4
|
export type TUserHasRollNumberModelCreationAttributes = Optional<IUserHasRollNumberModelAttributes, 'id'>;
|
|
5
|
+
export type TUserHasRollNumberWithAssociation = IUserHasRollNumberModelAttributes & {
|
|
6
|
+
rollNumberHasInstitute?: IInstituteAttributes;
|
|
7
|
+
rollNumberHasBatch?: IBatchModelAttributes;
|
|
8
|
+
batchHasRollNumber?: IUserHasRollNumberModelAttributes;
|
|
9
|
+
createdByUser?: IUserAttributes;
|
|
10
|
+
updatedByUser?: IUserAttributes;
|
|
11
|
+
deletedByUser?: IUserAttributes;
|
|
12
|
+
userRollNumber?: IUserAttributes;
|
|
13
|
+
userHRollNAcaCal?: IAcademicCalendarModelAttributes;
|
|
14
|
+
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { Optional } from 'sequelize';
|
|
2
|
-
import { IVisitorBookAttributes } from '../interfaces';
|
|
2
|
+
import { IAcademicCalendarModelAttributes, IInstituteAttributes, IUserAttributes, IVisitorBookAttributes } from '../interfaces';
|
|
3
3
|
export type TVisitorBookCreationAttributes = Optional<IVisitorBookAttributes, 'id'>;
|
|
4
|
+
export type TVisitorBookCreationWithAssociation = IVisitorBookAttributes & {
|
|
5
|
+
createdByUser?: IUserAttributes;
|
|
6
|
+
updatedByUser?: IUserAttributes;
|
|
7
|
+
deletedByUser?: IUserAttributes;
|
|
8
|
+
visitorBookInstitute?: IInstituteAttributes;
|
|
9
|
+
visitorBookAcaCal?: IAcademicCalendarModelAttributes;
|
|
10
|
+
};
|
package/package.json
CHANGED