@kipicore/dbcore 1.1.233 → 1.1.235

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, Sequelize: any): Promise<void>;
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+ const up = async (queryInterface, Sequelize) => {
3
+ const table = await queryInterface.describeTable('users');
4
+ // Check if column already exists
5
+ if (table.email) {
6
+ await queryInterface.changeColumn('users', 'email', {
7
+ type: Sequelize.STRING,
8
+ allowNull: true,
9
+ });
10
+ }
11
+ };
12
+ const down = async (queryInterface, Sequelize) => {
13
+ const table = await queryInterface.describeTable('users');
14
+ if (table.email) {
15
+ await queryInterface.changeColumn('users', 'email', {
16
+ type: Sequelize.STRING(50),
17
+ allowNull: true,
18
+ });
19
+ }
20
+ };
21
+ module.exports = {
22
+ up,
23
+ down,
24
+ };
@@ -1,6 +1,6 @@
1
1
  import { Document } from 'mongoose';
2
2
  import { IDefaultAttributes } from './commonInterface';
3
- import { ADMISSION_TYPE, BOOLEAN_STATUS, COMMAN_STATUS, EMPLOYMENT_TYPE, IS_PRINCIPAL, USER_INSTITUTE_META_STATUS, USER_TYPES } from '../constants/app';
3
+ import { ADMISSION_TYPE, BOOLEAN_STATUS, COMMAN_STATUS, EMPLOYMENT_TYPE, FEE_COLLECTION_TYPE, IS_PRINCIPAL, USER_INSTITUTE_META_STATUS, USER_TYPES } from '../constants/app';
4
4
  export interface IUserInstituteMetaSlots {
5
5
  slotId: string;
6
6
  isPrimary: boolean;
@@ -54,4 +54,5 @@ export interface IUserInstituteMetaAttributes extends IDefaultAttributes, Docume
54
54
  oldId?: string;
55
55
  previousEntities?: string[];
56
56
  studentFeeService?: IStudentFeeService[];
57
+ studentFeeType?: FEE_COLLECTION_TYPE;
57
58
  }
@@ -195,6 +195,10 @@ const userInstituteMetaSchema = new mongoose_1.Schema({
195
195
  default: [],
196
196
  required: false,
197
197
  },
198
+ studentFeeType: {
199
+ type: String,
200
+ required: false,
201
+ },
198
202
  sidNo: {
199
203
  type: String,
200
204
  required: false,
@@ -150,7 +150,7 @@ UserModel.init({
150
150
  firstName: { type: sequelize_1.DataTypes.STRING(25), allowNull: false, field: 'first_name' },
151
151
  lastName: { type: sequelize_1.DataTypes.STRING(25), allowNull: false, field: 'last_name' },
152
152
  middleName: { type: sequelize_1.DataTypes.STRING(25), allowNull: true, field: 'middle_name' },
153
- email: { type: sequelize_1.DataTypes.STRING(50), allowNull: false },
153
+ email: { type: sequelize_1.DataTypes.STRING, allowNull: false },
154
154
  mobile: { type: sequelize_1.DataTypes.STRING(10), allowNull: true },
155
155
  password: { type: sequelize_1.DataTypes.STRING, allowNull: true },
156
156
  emailVerification: { type: sequelize_1.DataTypes.STRING(30), allowNull: false, field: 'email_varification', defaultValue: app_1.EMAIL_VERIFICATION.PENDING },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kipicore/dbcore",
3
- "version": "1.1.233",
3
+ "version": "1.1.235",
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",