From a44a719c0563e8de0cb267acabbfaea9fa59e457 Mon Sep 17 00:00:00 2001 From: amol Date: Wed, 13 Dec 2023 12:34:43 +0530 Subject: [PATCH] change data type of scheme_name --- controller/getAllInvestor.js | 2 +- ...P_Liquiloans_Inv_Summarys.js => investorSummary.js} | 10 +++++----- utils/db_config.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename model/{P2P_Liquiloans_Inv_Summarys.js => investorSummary.js} (90%) diff --git a/controller/getAllInvestor.js b/controller/getAllInvestor.js index 1b7ef4a..6e8d850 100644 --- a/controller/getAllInvestor.js +++ b/controller/getAllInvestor.js @@ -38,7 +38,7 @@ const getAllInvstorDataStore = async (body) => { if (item.length) { for (let i = 0; i < item?.length; i++) { let data = {}; - data.investor_id = item[i].investor_id, + data.investor_id = item[i].investor_id, data.name = item[i].name, data.entity_type = item[i].entity_type, data.pan = item[i].pan, diff --git a/model/P2P_Liquiloans_Inv_Summarys.js b/model/investorSummary.js similarity index 90% rename from model/P2P_Liquiloans_Inv_Summarys.js rename to model/investorSummary.js index 2c8880c..961714f 100644 --- a/model/P2P_Liquiloans_Inv_Summarys.js +++ b/model/investorSummary.js @@ -1,10 +1,10 @@ module.exports = function (sequelize, DataTypes) { const getInvestorSummary = sequelize.define('P2P_Liquiloans_Inv_Summarys', { - transaction_id: { type: DataTypes.INTEGER, allowNull: true, unique: true }, - investor_id: { type: DataTypes.INTEGER, allowNull: true, unique: true }, - scheme_id: { type: DataTypes.INTEGER, allowNull: true, unique: true }, - investment_roi: { type: DataTypes.INTEGER, allowNull: true, unique: true }, + transaction_id: { type: DataTypes.INTEGER, allowNull: true}, + investor_id: { type: DataTypes.INTEGER, allowNull: true }, + scheme_id: { type: DataTypes.INTEGER, allowNull: true }, + investment_roi: { type: DataTypes.INTEGER, allowNull: true }, return_type: { type: DataTypes.STRING, allowNull: true }, payout_type: { type: DataTypes.STRING, allowNull: true }, lockin_tenure: { type: DataTypes.INTEGER, allowNull: true }, @@ -18,7 +18,7 @@ module.exports = function (sequelize, DataTypes) { name: { type: DataTypes.STRING, allowNull: true }, transaction_date: { type: DataTypes.STRING, allowNull: true }, invested_amount: { type: DataTypes.INTEGER, allowNull: true }, - scheme_name: { type: DataTypes.STRING, allowNull: true }, + scheme_name: { type: DataTypes.INTEGER, allowNull: true }, lockin_type: { type: DataTypes.STRING, allowNull: true }, display_scheme: { type: DataTypes.STRING, allowNull: true }, scheme_details: { type: DataTypes.STRING, allowNull: true }, diff --git a/utils/db_config.js b/utils/db_config.js index 2b762e5..a8bdb8e 100644 --- a/utils/db_config.js +++ b/utils/db_config.js @@ -38,7 +38,7 @@ db.sequelize = sequelize; db.liquiloansInvestors = require('../model/liquiloansInvestors')(sequelize, Sequelize); -db.P2P_Liquiloans_Inv_Summarys = require('../model/P2P_Liquiloans_Inv_Summarys')(sequelize, Sequelize); +db.investorSummary = require('../model/investorSummary')(sequelize, Sequelize); module.exports = db;