@kipicore/dbcore 1.1.309 → 1.1.310

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.
@@ -0,0 +1,2 @@
1
+ export function up(queryInterface: any, Sequelize: any): Promise<void>;
2
+ export function down(queryInterface: any): Promise<void>;
@@ -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
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.309",
3
+ "version": "1.1.310",
4
4
  "description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",