@kipicore/dbcore 1.1.361 → 1.1.363
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/db/psql/migrations/20260331052704-subject_internal_marks_model.d.ts +2 -0
- package/dist/db/psql/migrations/20260331052704-subject_internal_marks_model.js +162 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/subjectInternalMarkInterface.d.ts +9 -0
- package/dist/interfaces/subjectInternalMarkInterface.js +2 -0
- package/dist/models/psql/index.d.ts +1 -0
- package/dist/models/psql/index.js +3 -1
- package/dist/models/psql/subjectInternalMarkModel.d.ts +19 -0
- package/dist/models/psql/subjectInternalMarkModel.js +97 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/subjectInternalMarkType.d.ts +9 -0
- package/dist/types/subjectInternalMarkType.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const tableName = 'subject_internal_marks';
|
|
4
|
+
const tableExists = await queryInterface
|
|
5
|
+
.describeTable(tableName)
|
|
6
|
+
.then(() => true)
|
|
7
|
+
.catch(() => false);
|
|
8
|
+
if (!tableExists) {
|
|
9
|
+
await queryInterface.createTable(tableName, {
|
|
10
|
+
id: {
|
|
11
|
+
type: Sequelize.UUID,
|
|
12
|
+
defaultValue: Sequelize.UUIDV4,
|
|
13
|
+
allowNull: false,
|
|
14
|
+
primaryKey: true,
|
|
15
|
+
},
|
|
16
|
+
academicCalendarId: {
|
|
17
|
+
type: Sequelize.UUID,
|
|
18
|
+
field: 'academic_calendar_id',
|
|
19
|
+
allowNull: true,
|
|
20
|
+
},
|
|
21
|
+
instituteId: {
|
|
22
|
+
type: Sequelize.UUID,
|
|
23
|
+
field: 'institute_id',
|
|
24
|
+
allowNull: true,
|
|
25
|
+
},
|
|
26
|
+
subjectId: {
|
|
27
|
+
type: Sequelize.UUID,
|
|
28
|
+
field: 'subject_id',
|
|
29
|
+
allowNull: true,
|
|
30
|
+
},
|
|
31
|
+
standardId: {
|
|
32
|
+
type: Sequelize.UUID,
|
|
33
|
+
field: 'standard_id',
|
|
34
|
+
allowNull: true,
|
|
35
|
+
},
|
|
36
|
+
totalMark: {
|
|
37
|
+
type: Sequelize.INTEGER,
|
|
38
|
+
field: 'total_mark',
|
|
39
|
+
allowNull: true,
|
|
40
|
+
defaultValue: 0,
|
|
41
|
+
},
|
|
42
|
+
createdBy: {
|
|
43
|
+
type: Sequelize.UUID,
|
|
44
|
+
allowNull: true,
|
|
45
|
+
field: 'created_by',
|
|
46
|
+
},
|
|
47
|
+
updatedBy: {
|
|
48
|
+
type: Sequelize.UUID,
|
|
49
|
+
allowNull: true,
|
|
50
|
+
field: 'updated_by',
|
|
51
|
+
},
|
|
52
|
+
deletedBy: {
|
|
53
|
+
type: Sequelize.UUID,
|
|
54
|
+
allowNull: true,
|
|
55
|
+
field: 'deleted_by',
|
|
56
|
+
},
|
|
57
|
+
createdAt: {
|
|
58
|
+
type: Sequelize.DATE,
|
|
59
|
+
allowNull: false,
|
|
60
|
+
field: 'created_at',
|
|
61
|
+
},
|
|
62
|
+
updatedAt: {
|
|
63
|
+
type: Sequelize.DATE,
|
|
64
|
+
allowNull: false,
|
|
65
|
+
field: 'updated_at',
|
|
66
|
+
},
|
|
67
|
+
deletedAt: {
|
|
68
|
+
type: Sequelize.DATE,
|
|
69
|
+
allowNull: true,
|
|
70
|
+
field: 'deleted_at',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const tableDefinition = await queryInterface.describeTable(tableName);
|
|
76
|
+
const columnsToAdd = {
|
|
77
|
+
id: {
|
|
78
|
+
type: Sequelize.UUID,
|
|
79
|
+
defaultValue: Sequelize.UUIDV4,
|
|
80
|
+
allowNull: false,
|
|
81
|
+
primaryKey: true,
|
|
82
|
+
},
|
|
83
|
+
academicCalendarId: {
|
|
84
|
+
type: Sequelize.UUID,
|
|
85
|
+
field: 'academic_calendar_id',
|
|
86
|
+
allowNull: true,
|
|
87
|
+
},
|
|
88
|
+
instituteId: {
|
|
89
|
+
type: Sequelize.UUID,
|
|
90
|
+
field: 'institute_id',
|
|
91
|
+
allowNull: true,
|
|
92
|
+
},
|
|
93
|
+
subjectId: {
|
|
94
|
+
type: Sequelize.UUID,
|
|
95
|
+
field: 'subject_id',
|
|
96
|
+
allowNull: true,
|
|
97
|
+
},
|
|
98
|
+
standardId: {
|
|
99
|
+
type: Sequelize.UUID,
|
|
100
|
+
field: 'standard_id',
|
|
101
|
+
allowNull: true,
|
|
102
|
+
},
|
|
103
|
+
totalMark: {
|
|
104
|
+
type: Sequelize.INTEGER,
|
|
105
|
+
field: 'total_mark',
|
|
106
|
+
allowNull: true,
|
|
107
|
+
defaultValue: 0,
|
|
108
|
+
},
|
|
109
|
+
createdBy: {
|
|
110
|
+
type: Sequelize.UUID,
|
|
111
|
+
allowNull: true,
|
|
112
|
+
field: 'created_by',
|
|
113
|
+
},
|
|
114
|
+
updatedBy: {
|
|
115
|
+
type: Sequelize.UUID,
|
|
116
|
+
allowNull: true,
|
|
117
|
+
field: 'updated_by',
|
|
118
|
+
},
|
|
119
|
+
deletedBy: {
|
|
120
|
+
type: Sequelize.UUID,
|
|
121
|
+
allowNull: true,
|
|
122
|
+
field: 'deleted_by',
|
|
123
|
+
},
|
|
124
|
+
createdAt: {
|
|
125
|
+
type: Sequelize.DATE,
|
|
126
|
+
allowNull: false,
|
|
127
|
+
field: 'created_at',
|
|
128
|
+
},
|
|
129
|
+
updatedAt: {
|
|
130
|
+
type: Sequelize.DATE,
|
|
131
|
+
allowNull: false,
|
|
132
|
+
field: 'updated_at',
|
|
133
|
+
},
|
|
134
|
+
deletedAt: {
|
|
135
|
+
type: Sequelize.DATE,
|
|
136
|
+
allowNull: true,
|
|
137
|
+
field: 'deleted_at',
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
for (const column of Object.keys(columnsToAdd)) {
|
|
141
|
+
const columnToAdd = columnsToAdd[column];
|
|
142
|
+
const tableColumn = columnToAdd.field || column;
|
|
143
|
+
if (!tableDefinition[tableColumn]) {
|
|
144
|
+
await queryInterface.addColumn(tableName, tableColumn, columnToAdd);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
const down = async (queryInterface) => {
|
|
150
|
+
const tableName = 'subject_internal_marks';
|
|
151
|
+
const tableExists = await queryInterface
|
|
152
|
+
.describeTable(tableName)
|
|
153
|
+
.then(() => true)
|
|
154
|
+
.catch(() => false);
|
|
155
|
+
if (tableExists) {
|
|
156
|
+
await queryInterface.dropTable(tableName);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
module.exports = {
|
|
160
|
+
up,
|
|
161
|
+
down,
|
|
162
|
+
};
|
package/dist/interfaces/index.js
CHANGED
|
@@ -199,3 +199,4 @@ __exportStar(require("./appAnalyticsEventInterface"), exports);
|
|
|
199
199
|
__exportStar(require("./markSheetConfigurationInterface"), exports);
|
|
200
200
|
__exportStar(require("./internalMarkInterface"), exports);
|
|
201
201
|
__exportStar(require("./finalMarkSheetInterface"), exports);
|
|
202
|
+
__exportStar(require("./subjectInternalMarkInterface"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IDefaultAttributes } from './commonInterface';
|
|
2
|
+
export interface ISubjectInternalMarkModelAttributes extends IDefaultAttributes {
|
|
3
|
+
id: string;
|
|
4
|
+
instituteId: string;
|
|
5
|
+
academicCalendarId: string;
|
|
6
|
+
subjectId: string;
|
|
7
|
+
totalMark: number;
|
|
8
|
+
standardId: string;
|
|
9
|
+
}
|
|
@@ -126,3 +126,4 @@ export { default as StudentFeeTermsModel } from './studentFeeTermsModel';
|
|
|
126
126
|
export { default as FeeType1Model } from './feeType1Model';
|
|
127
127
|
export { default as TermsAndConditionModel } from './termsAndConditionModel';
|
|
128
128
|
export { default as InternalMarkModel } from './internalMarkModel';
|
|
129
|
+
export { default as SubjectInternalMarkModel } from './subjectInternalMarkModel';
|
|
@@ -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.InternalMarkModel = exports.TermsAndConditionModel = exports.FeeType1Model = exports.StudentFeeTermsModel = exports.UserHasPenaltyModel = exports.PenaltyModel = exports.ClassRoomCollectionModel = exports.ClassRoomEventModel = exports.StudentFeeTypeCollectionModel = exports.SchoolFeeTermsModel = exports.StudentFeeHistoryModel = exports.StudentFeeCollectionModel = exports.UserDirectoryModel = exports.StudentLeaveRequestModel = exports.CloneListModel = exports.IncomeExpenseModel = exports.MaintenanceModel = exports.AdvertisementModel = exports.WorkOffDaysModel = exports.EntityWiseCalendarModel = exports.CampusModel = exports.LostFoundItemModel = exports.WorkingShiftModel = exports.WorkingDayModel = exports.WalletModel = exports.WalletHistoryModel = void 0;
|
|
8
|
+
exports.SubjectInternalMarkModel = exports.InternalMarkModel = exports.TermsAndConditionModel = exports.FeeType1Model = exports.StudentFeeTermsModel = exports.UserHasPenaltyModel = exports.PenaltyModel = exports.ClassRoomCollectionModel = exports.ClassRoomEventModel = exports.StudentFeeTypeCollectionModel = exports.SchoolFeeTermsModel = exports.StudentFeeHistoryModel = exports.StudentFeeCollectionModel = exports.UserDirectoryModel = exports.StudentLeaveRequestModel = exports.CloneListModel = exports.IncomeExpenseModel = exports.MaintenanceModel = exports.AdvertisementModel = exports.WorkOffDaysModel = exports.EntityWiseCalendarModel = exports.CampusModel = exports.LostFoundItemModel = exports.WorkingShiftModel = exports.WorkingDayModel = exports.WalletModel = exports.WalletHistoryModel = void 0;
|
|
9
9
|
const sequelize_1 = require("sequelize");
|
|
10
10
|
Object.defineProperty(exports, "Sequelize", { enumerable: true, get: function () { return sequelize_1.Sequelize; } });
|
|
11
11
|
const postgresConfig = require('../../configs/postgresConfig');
|
|
@@ -346,3 +346,5 @@ var termsAndConditionModel_1 = require("./termsAndConditionModel");
|
|
|
346
346
|
Object.defineProperty(exports, "TermsAndConditionModel", { enumerable: true, get: function () { return __importDefault(termsAndConditionModel_1).default; } });
|
|
347
347
|
var internalMarkModel_1 = require("./internalMarkModel");
|
|
348
348
|
Object.defineProperty(exports, "InternalMarkModel", { enumerable: true, get: function () { return __importDefault(internalMarkModel_1).default; } });
|
|
349
|
+
var subjectInternalMarkModel_1 = require("./subjectInternalMarkModel");
|
|
350
|
+
Object.defineProperty(exports, "SubjectInternalMarkModel", { enumerable: true, get: function () { return __importDefault(subjectInternalMarkModel_1).default; } });
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Model } from 'sequelize';
|
|
2
|
+
import { ISubjectInternalMarkModelAttributes } from '../../interfaces/subjectInternalMarkInterface';
|
|
3
|
+
import { TSubjectInternalMarkModelCreationAttributes } from '../../types/subjectInternalMarkType';
|
|
4
|
+
declare class SubjectInternalMarkModel extends Model<ISubjectInternalMarkModelAttributes, TSubjectInternalMarkModelCreationAttributes> {
|
|
5
|
+
id: string;
|
|
6
|
+
instituteId?: string;
|
|
7
|
+
academicCalendarId: string;
|
|
8
|
+
subjectId: string;
|
|
9
|
+
totalMark: number;
|
|
10
|
+
standardId: string;
|
|
11
|
+
createdBy: string;
|
|
12
|
+
updatedBy: string;
|
|
13
|
+
deletedBy: string;
|
|
14
|
+
readonly createdAt: Date;
|
|
15
|
+
readonly updatedAt: Date;
|
|
16
|
+
readonly deletedAt?: Date;
|
|
17
|
+
static associate(models: any): void;
|
|
18
|
+
}
|
|
19
|
+
export default SubjectInternalMarkModel;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const sequelize_1 = require("sequelize");
|
|
4
|
+
const index_1 = require("./index");
|
|
5
|
+
class SubjectInternalMarkModel extends sequelize_1.Model {
|
|
6
|
+
static associate(models) {
|
|
7
|
+
const { UserModel, InstituteModel, InstituteEntityModel } = models;
|
|
8
|
+
SubjectInternalMarkModel.belongsTo(UserModel, {
|
|
9
|
+
foreignKey: {
|
|
10
|
+
name: 'createdBy',
|
|
11
|
+
allowNull: true,
|
|
12
|
+
field: 'created_by',
|
|
13
|
+
},
|
|
14
|
+
as: 'createdByUser',
|
|
15
|
+
});
|
|
16
|
+
SubjectInternalMarkModel.belongsTo(UserModel, {
|
|
17
|
+
foreignKey: {
|
|
18
|
+
name: 'updatedBy',
|
|
19
|
+
allowNull: true,
|
|
20
|
+
field: 'updated_by',
|
|
21
|
+
},
|
|
22
|
+
as: 'updatedByUser',
|
|
23
|
+
});
|
|
24
|
+
SubjectInternalMarkModel.belongsTo(UserModel, {
|
|
25
|
+
foreignKey: {
|
|
26
|
+
name: 'deletedBy',
|
|
27
|
+
allowNull: true,
|
|
28
|
+
field: 'deleted_by',
|
|
29
|
+
},
|
|
30
|
+
as: 'deletedByUser',
|
|
31
|
+
});
|
|
32
|
+
SubjectInternalMarkModel.belongsTo(InstituteModel, {
|
|
33
|
+
foreignKey: 'instituteId',
|
|
34
|
+
as: 'subjectSubjectInternalMarkInstitute',
|
|
35
|
+
});
|
|
36
|
+
InstituteModel.hasMany(SubjectInternalMarkModel, {
|
|
37
|
+
foreignKey: 'instituteId',
|
|
38
|
+
as: 'instituteHasSubjectInternalMark',
|
|
39
|
+
});
|
|
40
|
+
SubjectInternalMarkModel.belongsTo(InstituteEntityModel, {
|
|
41
|
+
foreignKey: 'subjectId',
|
|
42
|
+
as: 'subjectSubjectInternalMark',
|
|
43
|
+
});
|
|
44
|
+
InstituteEntityModel.hasMany(SubjectInternalMarkModel, {
|
|
45
|
+
foreignKey: 'subjectId',
|
|
46
|
+
as: 'subjectHasInternalMark',
|
|
47
|
+
});
|
|
48
|
+
SubjectInternalMarkModel.belongsTo(InstituteEntityModel, {
|
|
49
|
+
foreignKey: 'standardId',
|
|
50
|
+
as: 'standardSubjectInternalMark',
|
|
51
|
+
});
|
|
52
|
+
InstituteEntityModel.hasMany(SubjectInternalMarkModel, {
|
|
53
|
+
foreignKey: 'standardId',
|
|
54
|
+
as: 'standardHasInternalMark',
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
SubjectInternalMarkModel.init({
|
|
59
|
+
id: {
|
|
60
|
+
type: sequelize_1.DataTypes.UUID,
|
|
61
|
+
defaultValue: sequelize_1.DataTypes.UUIDV4,
|
|
62
|
+
allowNull: false,
|
|
63
|
+
primaryKey: true,
|
|
64
|
+
},
|
|
65
|
+
academicCalendarId: {
|
|
66
|
+
type: sequelize_1.DataTypes.UUID,
|
|
67
|
+
field: 'academic_calendar_id',
|
|
68
|
+
allowNull: true,
|
|
69
|
+
},
|
|
70
|
+
instituteId: {
|
|
71
|
+
type: sequelize_1.DataTypes.UUID,
|
|
72
|
+
field: 'institute_id',
|
|
73
|
+
allowNull: true,
|
|
74
|
+
},
|
|
75
|
+
subjectId: {
|
|
76
|
+
type: sequelize_1.DataTypes.UUID,
|
|
77
|
+
field: 'subject_id',
|
|
78
|
+
allowNull: true,
|
|
79
|
+
},
|
|
80
|
+
totalMark: {
|
|
81
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
82
|
+
field: 'total_mark',
|
|
83
|
+
allowNull: true,
|
|
84
|
+
defaultValue: 0,
|
|
85
|
+
},
|
|
86
|
+
standardId: {
|
|
87
|
+
type: sequelize_1.DataTypes.UUID,
|
|
88
|
+
field: 'standard_id',
|
|
89
|
+
allowNull: true,
|
|
90
|
+
},
|
|
91
|
+
}, {
|
|
92
|
+
modelName: 'SubjectInternalMarkModel',
|
|
93
|
+
tableName: 'subject_internal_marks',
|
|
94
|
+
timestamps: true,
|
|
95
|
+
sequelize: index_1.sequelize,
|
|
96
|
+
});
|
|
97
|
+
exports.default = SubjectInternalMarkModel;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -190,3 +190,4 @@ __exportStar(require("./appAnalyticsEventType"), exports);
|
|
|
190
190
|
__exportStar(require("./markSheetConfigurationType"), exports);
|
|
191
191
|
__exportStar(require("./internalMarkType"), exports);
|
|
192
192
|
__exportStar(require("./finalMarkSheetType"), exports);
|
|
193
|
+
__exportStar(require("./subjectInternalMarkType"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBatchModelAttributes, IInstituteAttributes, IInstituteEntityAttributes, IUserAttributes } from '../interfaces';
|
|
2
|
+
import { ISubjectInternalMarkModelAttributes } from '../interfaces/subjectInternalMarkInterface';
|
|
3
|
+
export type TSubjectInternalMarkModelCreationAttributes = Partial<ISubjectInternalMarkModelAttributes>;
|
|
4
|
+
export type TSubjectInternalMarkWithAssociation = ISubjectInternalMarkModelAttributes & {
|
|
5
|
+
subjectSubjectInternalMarkBatch?: IBatchModelAttributes;
|
|
6
|
+
subjectSubjectInternalMarkSubject?: IInstituteEntityAttributes;
|
|
7
|
+
subjectSubjectInternalMarkUser?: IUserAttributes;
|
|
8
|
+
subjectSubjectInternalMarkInstitute?: IInstituteAttributes;
|
|
9
|
+
};
|
package/package.json
CHANGED