@kipicore/dbcore 1.1.577 → 1.1.579
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 +4 -1
- package/dist/constants/app.js +3 -0
- package/dist/db/psql/migrations/20260615165435-add_required_marks_to_user_has_grace_marks.d.ts +2 -0
- package/dist/db/psql/migrations/20260615165435-add_required_marks_to_user_has_grace_marks.js +31 -0
- package/dist/interfaces/userHasGraceMarksInterface.d.ts +3 -0
- package/dist/models/psql/userHasGraceMarksModel.d.ts +3 -0
- package/dist/models/psql/userHasGraceMarksModel.js +12 -0
- package/package.json +1 -1
package/dist/constants/app.d.ts
CHANGED
|
@@ -1544,7 +1544,10 @@ export declare enum RMS_AUDIT_ACTION {
|
|
|
1544
1544
|
POST = "POST",
|
|
1545
1545
|
CLOSE = "CLOSE",
|
|
1546
1546
|
ASSIGN = "ASSIGN",
|
|
1547
|
-
RETURN = "RETURN"
|
|
1547
|
+
RETURN = "RETURN",
|
|
1548
|
+
INWARD = "INWARD",
|
|
1549
|
+
OUTWARD = "OUTWARD",
|
|
1550
|
+
TRANSFER = "TRANSFER"
|
|
1548
1551
|
}
|
|
1549
1552
|
export declare enum RMS_STOCK_SCOPE {
|
|
1550
1553
|
GLOBAL = "GLOBAL",
|
package/dist/constants/app.js
CHANGED
|
@@ -1861,6 +1861,9 @@ var RMS_AUDIT_ACTION;
|
|
|
1861
1861
|
RMS_AUDIT_ACTION["CLOSE"] = "CLOSE";
|
|
1862
1862
|
RMS_AUDIT_ACTION["ASSIGN"] = "ASSIGN";
|
|
1863
1863
|
RMS_AUDIT_ACTION["RETURN"] = "RETURN";
|
|
1864
|
+
RMS_AUDIT_ACTION["INWARD"] = "INWARD";
|
|
1865
|
+
RMS_AUDIT_ACTION["OUTWARD"] = "OUTWARD";
|
|
1866
|
+
RMS_AUDIT_ACTION["TRANSFER"] = "TRANSFER";
|
|
1864
1867
|
})(RMS_AUDIT_ACTION || (exports.RMS_AUDIT_ACTION = RMS_AUDIT_ACTION = {}));
|
|
1865
1868
|
var RMS_STOCK_SCOPE;
|
|
1866
1869
|
(function (RMS_STOCK_SCOPE) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('user_has_grace_marks');
|
|
4
|
+
if (!table.required_marks) {
|
|
5
|
+
await queryInterface.addColumn('user_has_grace_marks', 'required_marks', {
|
|
6
|
+
type: Sequelize.INTEGER,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
defaultValue: 0,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!table.status) {
|
|
12
|
+
await queryInterface.addColumn('user_has_grace_marks', 'status', {
|
|
13
|
+
type: Sequelize.STRING,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
defaultValue: 'ACTIVE',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const down = async (queryInterface) => {
|
|
20
|
+
const table = await queryInterface.describeTable('user_has_grace_marks');
|
|
21
|
+
if (table.required_marks) {
|
|
22
|
+
await queryInterface.removeColumn('user_has_grace_marks', 'required_marks');
|
|
23
|
+
}
|
|
24
|
+
if (table.status) {
|
|
25
|
+
await queryInterface.removeColumn('user_has_grace_marks', 'status');
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
module.exports = {
|
|
29
|
+
up,
|
|
30
|
+
down,
|
|
31
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IDefaultAttributes } from './commonInterface';
|
|
2
|
+
import { COMMAN_STATUS } from '../constants';
|
|
2
3
|
export interface IUserHasGraceMarksModelAttributes extends IDefaultAttributes {
|
|
3
4
|
id: string;
|
|
4
5
|
academicCalendarId: string;
|
|
@@ -7,4 +8,6 @@ export interface IUserHasGraceMarksModelAttributes extends IDefaultAttributes {
|
|
|
7
8
|
subjectId: string;
|
|
8
9
|
graceMarks: number;
|
|
9
10
|
additionalGraceMarks: number;
|
|
11
|
+
requiredMarks: number;
|
|
12
|
+
status?: COMMAN_STATUS;
|
|
10
13
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
2
|
import { IUserHasGraceMarksModelAttributes } from '../../interfaces';
|
|
3
3
|
import { TUserHasGraceMarksModelCreationAttributes } from '../../types';
|
|
4
|
+
import { COMMAN_STATUS } from '../../constants';
|
|
4
5
|
declare class UserHasGraceMarksModel extends Model<IUserHasGraceMarksModelAttributes, TUserHasGraceMarksModelCreationAttributes> {
|
|
5
6
|
id: string;
|
|
6
7
|
academicCalendarId: string;
|
|
@@ -9,6 +10,8 @@ declare class UserHasGraceMarksModel extends Model<IUserHasGraceMarksModelAttrib
|
|
|
9
10
|
subjectId: string;
|
|
10
11
|
graceMarks: number;
|
|
11
12
|
additionalGraceMarks: number;
|
|
13
|
+
requiredMarks: number;
|
|
14
|
+
status: COMMAN_STATUS;
|
|
12
15
|
createdBy: string;
|
|
13
16
|
updatedBy: string;
|
|
14
17
|
deletedBy: string;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const sequelize_1 = require("sequelize");
|
|
4
4
|
const index_1 = require("./index");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
5
6
|
class UserHasGraceMarksModel extends sequelize_1.Model {
|
|
6
7
|
static associate(models) {
|
|
7
8
|
const { UserModel, InstituteModel, AcademicCalendarModel, InstituteEntityModel } = models;
|
|
@@ -90,6 +91,17 @@ UserHasGraceMarksModel.init({
|
|
|
90
91
|
defaultValue: 0,
|
|
91
92
|
field: 'additional_grace_marks',
|
|
92
93
|
},
|
|
94
|
+
requiredMarks: {
|
|
95
|
+
type: sequelize_1.DataTypes.INTEGER,
|
|
96
|
+
allowNull: true,
|
|
97
|
+
defaultValue: 0,
|
|
98
|
+
field: 'required_marks',
|
|
99
|
+
},
|
|
100
|
+
status: {
|
|
101
|
+
type: sequelize_1.DataTypes.STRING,
|
|
102
|
+
allowNull: true,
|
|
103
|
+
defaultValue: constants_1.COMMAN_STATUS.ACTIVE,
|
|
104
|
+
},
|
|
93
105
|
}, {
|
|
94
106
|
modelName: 'UserHasGraceMarksModel',
|
|
95
107
|
tableName: 'user_has_grace_marks',
|
package/package.json
CHANGED