@kipicore/dbcore 1.1.309 → 1.1.311
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/20260313065122-ins_add_otp_clms.d.ts +2 -0
- package/dist/db/psql/migrations/20260313065122-ins_add_otp_clms.js +41 -0
- package/dist/interfaces/instituteInterface.d.ts +4 -1
- package/dist/interfaces/subjectIndexInterface.d.ts +1 -0
- package/dist/models/mongodb/subjectIndexModel.js +4 -0
- package/dist/models/psql/instituteModel.d.ts +4 -1
- package/dist/models/psql/instituteModel.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const up = async (queryInterface, Sequelize) => {
|
|
3
|
+
const table = await queryInterface.describeTable('institutes');
|
|
4
|
+
if (!table.otp) {
|
|
5
|
+
await queryInterface.addColumn('institutes', 'otp', {
|
|
6
|
+
type: Sequelize.STRING,
|
|
7
|
+
allowNull: true,
|
|
8
|
+
field: 'otp',
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
if (!table.email_verification) {
|
|
12
|
+
await queryInterface.addColumn('institutes', 'email_verification', {
|
|
13
|
+
type: Sequelize.STRING,
|
|
14
|
+
allowNull: true,
|
|
15
|
+
field: 'email_verification',
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (!table.mobile_verification) {
|
|
19
|
+
await queryInterface.addColumn('institutes', 'mobile_verification', {
|
|
20
|
+
type: Sequelize.STRING,
|
|
21
|
+
allowNull: true,
|
|
22
|
+
field: 'mobile_verification',
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const down = async (queryInterface) => {
|
|
27
|
+
const table = await queryInterface.describeTable('institutes');
|
|
28
|
+
if (table.otp) {
|
|
29
|
+
await queryInterface.removeColumn('institutes', 'otp');
|
|
30
|
+
}
|
|
31
|
+
if (table.email_verification) {
|
|
32
|
+
await queryInterface.removeColumn('institutes', 'email_verification');
|
|
33
|
+
}
|
|
34
|
+
if (table.mobile_verification) {
|
|
35
|
+
await queryInterface.removeColumn('institutes', 'mobile_verification');
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
module.exports = {
|
|
39
|
+
up,
|
|
40
|
+
down,
|
|
41
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INSTITUTE_STATUS, PLANNER_SYNC_STATUS, SCHOOL_SUB_TYPE, SCHOOL_TYPE } from '../constants/app';
|
|
1
|
+
import { EMAIL_VERIFICATION, INSTITUTE_STATUS, MOBILE_VERIFICATION, PLANNER_SYNC_STATUS, SCHOOL_SUB_TYPE, SCHOOL_TYPE } from '../constants/app';
|
|
2
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
3
3
|
export interface IInstituteAttributes extends IDefaultAttributes {
|
|
4
4
|
id: string;
|
|
@@ -36,4 +36,7 @@ export interface IInstituteAttributes extends IDefaultAttributes {
|
|
|
36
36
|
campusId?: string;
|
|
37
37
|
syncAcademicList?: string[];
|
|
38
38
|
establishmentYear?: number;
|
|
39
|
+
otp?: string;
|
|
40
|
+
emailVerification?: EMAIL_VERIFICATION;
|
|
41
|
+
mobileVerification?: MOBILE_VERIFICATION;
|
|
39
42
|
}
|
|
@@ -161,6 +161,10 @@ const ChapterIndexSchema = new mongoose_1.Schema({
|
|
|
161
161
|
type: Boolean,
|
|
162
162
|
default: false,
|
|
163
163
|
},
|
|
164
|
+
difficultyLevel: {
|
|
165
|
+
type: Number,
|
|
166
|
+
required: false,
|
|
167
|
+
},
|
|
164
168
|
}, { _id: false });
|
|
165
169
|
// Define the schema for ISubjectIndexModelAttributes
|
|
166
170
|
const SubjectIndexSchema = new mongoose_1.Schema({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Model } from 'sequelize';
|
|
2
|
-
import { INSTITUTE_STATUS, PLANNER_SYNC_STATUS, SCHOOL_SUB_TYPE, SCHOOL_TYPE } from '../../constants/app';
|
|
2
|
+
import { EMAIL_VERIFICATION, INSTITUTE_STATUS, MOBILE_VERIFICATION, PLANNER_SYNC_STATUS, SCHOOL_SUB_TYPE, SCHOOL_TYPE } from '../../constants/app';
|
|
3
3
|
import { IInstituteAttributes } from '../../interfaces/instituteInterface';
|
|
4
4
|
import { TInstituteCreationAttributes } from '../../types/instituteType';
|
|
5
5
|
declare class InstituteModel extends Model<IInstituteAttributes, TInstituteCreationAttributes> {
|
|
@@ -38,6 +38,9 @@ declare class InstituteModel extends Model<IInstituteAttributes, TInstituteCreat
|
|
|
38
38
|
taluka?: string;
|
|
39
39
|
syncAcademicList?: string[];
|
|
40
40
|
establishmentYear?: number;
|
|
41
|
+
otp?: string;
|
|
42
|
+
emailVerification?: EMAIL_VERIFICATION;
|
|
43
|
+
mobileVerification?: MOBILE_VERIFICATION;
|
|
41
44
|
createdBy: string;
|
|
42
45
|
updatedBy: string;
|
|
43
46
|
deletedBy: string;
|
|
@@ -117,6 +117,9 @@ InstituteModel.init({
|
|
|
117
117
|
brochure: { type: sequelize_1.DataTypes.UUID, allowNull: true },
|
|
118
118
|
coverImage: { type: sequelize_1.DataTypes.UUID, allowNull: true, field: 'cover_image' },
|
|
119
119
|
youtubeUrl: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'youtube_url' },
|
|
120
|
+
otp: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'otp' },
|
|
121
|
+
emailVerification: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'email_verification' },
|
|
122
|
+
mobileVerification: { type: sequelize_1.DataTypes.STRING, allowNull: true, field: 'mobile_verification' },
|
|
120
123
|
country: { type: sequelize_1.DataTypes.INTEGER, allowNull: false },
|
|
121
124
|
state: { type: sequelize_1.DataTypes.INTEGER, allowNull: false },
|
|
122
125
|
city: { type: sequelize_1.DataTypes.INTEGER, allowNull: false },
|
package/package.json
CHANGED