susee
This commit is contained in:
parent
0ad4a4f8d7
commit
74a23df6bb
@ -1,11 +1,14 @@
|
||||
const { sequelize,Test,GeneralSection ,FundRequirement , DetailsOfKeyShareHolder , BreifOfBusiness , FinancialInformation , PropertyInformationn , FinalRemarks , OfficerDetails , Photograph , InstitutionDetail , ProductInformation} = require('../models')
|
||||
const { sequelize,Test,CreditGeneralInformation,SizeAndGeographicalResearch,CreditProfile,ProductAndProcess,PortFolioHealth,TotalOverallDebit,OverallPlanOfAction,ValidationPoint,
|
||||
CreditLoanDetail,CreditFinalRemarks,CreditGeneralBusinessInformation,CreditKeyProductBusinessContribution,EmployeeStrength,CreditBusinessAndPersonalBankingDetails,CreditFinancialInformation,
|
||||
SupplierDetail ,ClientDetail,CreditFuturePlans,CreditExistingLoanObligation,FamilyMemberInvolvedInBusiness,CreditManager,CreditBorrowerAndGuarantorDetails,CreditFinancialAnalysis,CreditAddressDetail,
|
||||
CreditKeyShareholder,Covid19Questions,StockDetail,BusinessAsset} = require('../models')
|
||||
const { logMsg } = require('../services/logger.js');
|
||||
|
||||
|
||||
exports.Welcome = (req, res) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
{
|
||||
const Msg = "Welcome....!";
|
||||
console.log(Msg);
|
||||
logMsg.info("Api Call Success");
|
||||
@ -18,55 +21,88 @@ exports.Welcome = (req, res) =>
|
||||
|
||||
};
|
||||
|
||||
exports.SalesPd = async (req, res) =>
|
||||
exports.CreditPd = async (req, res) =>
|
||||
{
|
||||
|
||||
const tempData ={"section1":{"main_loan_applicant":"AKSHAR ENTERPRISE","company_name":"AKSHAR ENTERPRISE","person_met_during_visit":"SATWARA MANISH","address_visited":"SHED NO C 39 SURYAM INDUSTRIAL PARK NR TORRENT POWER SUBSTATION NICOL ","state":"Gujarat","city":"Ahmedabad","pincode":"382350"},"section2":{"loan_amount_applied":"25000000","total_fund_requirement":"30000000","loan_tenure":"36","loan_purpose":"Purchase of Business Assets"},"section3":[{"name":"SATHWARA MANISH","share_holding":"50","vintage_in_current_biz":"12"},{"name":"SATHWARA DHIRAJLAL HARDASBHAI","share_holding":"50","vintage_in_current_biz":"12"}],"section4":{"nature_of_business":"Trader","product_service_type":"LPG GAS TRADING","other_information":"RILIANCE LPG GAS"},"section5":{"0":{"fy":"2021-2022","sales_revenue":"59168882","net_profit":"2000000"},"income_considered":"2000000","income_assessment_program_recommended":"Vanilla","fixed_obligations":"1000000"},"section6":[{"property_address":"SHOP NO 601 TO 604 SUREEL BUSINESS HUB BS NARODA MUKTI DHAM SHALBI HOSPITAL ROAD NARODA","property_type":"SHOPS ","occupancy_status":"Vacant","permitted_property_usage":"Commercial","actual_property_usage":"Commercial","built_up_area":"6500","built_up_area_uom":"Sq Ft","approx_mkt_val":"40000000","Property_Ownership_Status":"PADMA ASSOCIATES "}],"section7":{"business_activity_seen":"Yes","location_workplace_suits_business":"Yes","overall_assessment":"Positive","recommended_roi":"13","any_other_remarks":""},"section8":{"name_of_sales_team_member":"Bhojak Krunalkumar Maheshkumar ","designation":"Sales Officer","date":"09-04-2022 2:01:16 PM"},"section9":{"selfie_with_person_met":"SAVED","approach_to_pd_location":["SAVED",""],"name_board_seen":["SAVED",""],"stock_image":["SAVED","SAVED","SAVED","SAVED",""],"workplace_interior_image":["SAVED","SAVED",""]}}
|
||||
// try
|
||||
// {
|
||||
const tempData = {"Address details":{"initiated_address":"Subhash Colony Plot No 21 A Bhagat K J Kothi Jodhpur, Jodhpur, Rajasthan - 342001","is_pd_done_on_initiated_address":"Yes","address_type":{"address_type_id":"2","address_type":"Clinic","isactive":"1","is_others":"0"},"pd_locality":{"locality_id":"5","locality_name":"Mix Use Area","isactive":"1","is_others":"1"},"pd_location":{"pd_location_approach_id":"2","description":"Easy to locate & Reach",
|
||||
"createdon":"2018-10-17 10:15:43","fk_createdby":"1","updatedon":"2019-02-04 07:11:14","fk_updatedby":"1",
|
||||
"isactive":"1","is_others":"0"},"comment_locality":{"comments_on_locality_id":"2","rating":"Good",
|
||||
"createdon":"2018-10-17 10:35:29","fk_createdby":"1","updatedon":null,"fk_updatedby":null,
|
||||
"isactive":"1","is_others":"0"},"business_estimated_area":"108","uom":"Square Yards",
|
||||
"uom_searchControl":null,"common_remarks":"nil","alternative_address":""} }
|
||||
|
||||
// var count = 0;
|
||||
// var generalInformation = [ ];
|
||||
// var storeData = [ ];
|
||||
// const len = Object.keys(tempData).length - 1;
|
||||
|
||||
|
||||
var count = 0;
|
||||
var generalSectionData = [ ];
|
||||
var storeId = [ ];
|
||||
const len = Object.keys(tempData).length - 1;
|
||||
for (const [keys, values] of Object.entries(tempData)) {
|
||||
count++
|
||||
if (Array.isArray(values) == true )
|
||||
{
|
||||
values.forEach(async(values) => {
|
||||
if (keys == 'section1') { generalSectionData = await GeneralSection.create( values ); storeId = await GeneralSection.findOne({ where : { pd_id : generalSectionData.pd_id , is_active : 1 }}); };
|
||||
if (keys == 'section2') { Object.assign(values, { pd_id: storeId.pd_id }); await FundRequirement.create( values ) };
|
||||
if (keys == 'section3') { Object.assign(values, { pd_id: storeId.pd_id }); await DetailsOfKeyShareHolder.create( values) };
|
||||
if (keys == 'section4') { Object.assign(values, { pd_id: storeId.pd_id }); await BreifOfBusiness.create( values) };
|
||||
if (keys == 'section5') { Object.assign(values, { pd_id: storeId.pd_id }); await FinancialInformation.create( values) };
|
||||
if (keys == 'section6') { Object.assign(values, { pd_id: storeId.pd_id }); await PropertyInformationn.create( values) };
|
||||
if (keys == 'section7') { Object.assign(values, { pd_id: storeId.pd_id }); await FinalRemarks.create( values) };
|
||||
if (keys == 'section8') { Object.assign(values, { pd_id: storeId.pd_id }); await OfficerDetails.create( values) };
|
||||
// if (keys == 'section9') { Object.assign(values, { pd_id: storeId.pd_id }); await Photograph.create( values) };
|
||||
if (keys == 'section10') { Object.assign(values, { pd_id: storeId.pd_id }); await InstitutionDetail.create( values) };
|
||||
if (keys == 'section11') { Object.assign(values, { pd_id: storeId.pd_id }); await ProductInformation.create( values) };
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
if (keys == 'section1') { id = await GeneralSection.create( values ); storeId = await GeneralSection.findOne({ where : { pd_id : id.pd_id , is_active : 1 }}); };
|
||||
if (keys == 'section2') { Object.assign(values, { pd_id: storeId.pd_id }); await FundRequirement.create( values ) };
|
||||
if (keys == 'section3') { Object.assign(values, { pd_id: storeId.pd_id }); await DetailsOfKeyShareHolder.create( values) };
|
||||
if (keys == 'section4') { Object.assign(values, { pd_id: storeId.pd_id }); await BreifOfBusiness.create( values) };
|
||||
if (keys == 'section5') { Object.assign(values, { pd_id: storeId.pd_id }); await FinancialInformation.create( values) };
|
||||
if (keys == 'section6') { Object.assign(values, { pd_id: storeId.pd_id }); await PropertyInformationn.create( values) };
|
||||
if (keys == 'section7') { Object.assign(values, { pd_id: storeId.pd_id }); await FinalRemarks.create( values) };
|
||||
if (keys == 'section8') { Object.assign(values, { pd_id: storeId.pd_id }); await OfficerDetails.create( values) };
|
||||
// if (keys == 'section9') { Object.assign(values, { pd_id: storeId.pd_id }); await Photograph.create( values) };
|
||||
if (keys == 'section10') { Object.assign(values, { pd_id: storeId.pd_id }); await InstitutionDetail.create( values) };
|
||||
if (keys == 'section11') { Object.assign(values, { pd_id: storeId.pd_id }); await ProductInformation.create( values) };
|
||||
}
|
||||
if (len == count - 1 )
|
||||
{
|
||||
var resData = await GeneralSection.findAll({ where : { pd_id : storeId.pd_id , is_active : 1 },
|
||||
include : [ {model: FundRequirement }, {model: DetailsOfKeyShareHolder }, {model: DetailsOfKeyShareHolder }, {model: BreifOfBusiness }, {model: FinancialInformation }, {model: PropertyInformationn }, {model: FinalRemarks }, {model: OfficerDetails }, {model: Photograph }, {model: InstitutionDetail }, {model: ProductInformation }]
|
||||
})
|
||||
res.send(resData)
|
||||
}
|
||||
}
|
||||
for (const [keys, values] of Object.entries(tempData)) {
|
||||
|
||||
Object.values(values).forEach( async (element) => {
|
||||
// Object.keys(element).forEach( async (elementKey) => {
|
||||
// if (typeof values.elementKey === "object" && values.elementKey !== null ) {
|
||||
// console.log("object" , element.elementKey);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// console.log("not a object" , element.elementKey);
|
||||
// }
|
||||
// });
|
||||
if (typeof element === "object" && element !== null ) {
|
||||
console.log("object" , element);
|
||||
}
|
||||
else
|
||||
{
|
||||
console.log("not a object" , element);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// if (keys == 'General Information') { generalInformation = await CreditGeneralInformation.create( values ); storeId = await CreditGeneralInformation.findOne({ where : { pd_id : generalInformation.pd_id , is_active : 1 }}); };
|
||||
// if (keys == 'Profile') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditProfile.create( values ) };
|
||||
// if (keys == 'Size and Geographical Reach') { Object.assign(values, { pd_id: storeId.pd_id }); await SizeAndGeographicalResearch.create( values) };
|
||||
// if (keys == 'Product and Process') { Object.assign(values, { pd_id: storeId.pd_id }); await ProductAndProcess.create( values) };
|
||||
// if (keys == 'Portfolio Health') { Object.assign(values, { pd_id: storeId.pd_id }); await PortFolioHealth.create( values) };
|
||||
// if (keys == 'Total Overall Debt/Equity Profile') { Object.assign(values, { pd_id: storeId.pd_id }); await TotalOverallDebit.create( values) };
|
||||
// if (keys == 'Financial analysis') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditFinancialAnalysis.create( values) };
|
||||
// if (keys == 'Overall Plan of Action') { Object.assign(values, { pd_id: storeId.pd_id }); await OverallPlanOfAction.create( values) };
|
||||
// if (keys == 'Validation Points vide Systems and Books at HQ and Branches') { Object.assign(values, { pd_id: storeId.pd_id }); await ValidationPoint.create( values) };
|
||||
// if (keys == 'Final remarks') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditFinalRemarks.create( values) };
|
||||
// if (keys == 'Address details') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditAddressDetail.create( values) };
|
||||
// if (keys == 'Loan details') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditLoanDetail.create( values ) };
|
||||
// if (keys == 'General Business Information') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditGeneralBusinessInformation.create( values) };
|
||||
// if (keys == 'Key Products and Business Contribution') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditKeyProductBusinessContribution.create( values) };
|
||||
// if (keys == 'Employee Strength') { Object.assign(values, { pd_id: storeId.pd_id }); await EmployeeStrength.create( values) };
|
||||
// if (keys == 'Business and Personal Banking') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditBusinessAndPersonalBankingDetails.create( values) };
|
||||
// if (keys == 'Financial Information') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditFinancialInformation.create( values) };
|
||||
// if (keys == 'Supplier details') { Object.assign(values, { pd_id: storeId.pd_id }); await SupplierDetail.create( values) };
|
||||
// if (keys == 'Clients details') { Object.assign(values, { pd_id: storeId.pd_id }); await ClientDetail.create( values) };
|
||||
// if (keys == 'Future Plans & Business Environments') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditFuturePlans.create( values) };
|
||||
// if (keys == 'Existing Loan Obligations') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditExistingLoanObligation.create( values) };
|
||||
// if (keys == 'Family Members Involved in Business') { Object.assign(values, { pd_id: storeId.pd_id }); await FamilyMemberInvolvedInBusiness.create( values ) };
|
||||
// if (keys == 'Credit manager specific queries') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditManager.create( values) };
|
||||
// if (keys == 'Borrower & Guarantor Details') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditBorrowerAndGuarantorDetails.create( values) };
|
||||
// if (keys == 'Key Stakeholders in Business') { Object.assign(values, { pd_id: storeId.pd_id }); await CreditKeyShareholder.create( values) };
|
||||
// if (keys == 'Covid 19 Questions') { Object.assign(values, { pd_id: storeId.pd_id }); await Covid19Questions.create( values) };
|
||||
// if (keys == 'Stock details') { Object.assign(values, { pd_id: storeId.pd_id }); await StockDetail.create( values) };
|
||||
// if (keys == 'Business Assets') { Object.assign(values, { pd_id: storeId.pd_id }); await BusinessAsset.create( values) };
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
40
app/models/BusinessAsset.js
Normal file
40
app/models/BusinessAsset.js
Normal file
@ -0,0 +1,40 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class BusinessAsset extends Model {
|
||||
|
||||
}
|
||||
BusinessAsset.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
initiated_address: { type: DataTypes.STRING },
|
||||
is_business_address: { type: DataTypes.STRING },
|
||||
business_months: { type: DataTypes.INTEGER },
|
||||
business_years: { type: DataTypes.INTEGER },
|
||||
business_is_pd_visited: { type: DataTypes.STRING },
|
||||
business_pd_visited_remark: { type: DataTypes.STRING },
|
||||
business_ownership_type: { type: DataTypes.STRING },
|
||||
business_approximate_market_value: { type: DataTypes.INTEGER },
|
||||
business_name_of_the_owner: { type: DataTypes.STRING },
|
||||
business_vintage: { type: DataTypes.INTEGER },
|
||||
business_purchase_year: { type: DataTypes.INTEGER },
|
||||
business_emi: { type: DataTypes.INTEGER },
|
||||
business_monthly_rented_amt: { type: DataTypes.INTEGER },
|
||||
asset_info_available: { type: DataTypes.STRING },
|
||||
business_assets_mode: { type: DataTypes.STRING },
|
||||
other_asset_description: { type: DataTypes.STRING },
|
||||
company_name: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_business_assets',
|
||||
modelName: 'BusinessAsset',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return BusinessAsset
|
||||
}
|
||||
@ -12,8 +12,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
product: { type: DataTypes.STRING },
|
||||
location: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
|
||||
29
app/models/CreditKeyProductBusinessContribution.js
Normal file
29
app/models/CreditKeyProductBusinessContribution.js
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class CreditKeyProductBusinessContribution extends Model {
|
||||
|
||||
}
|
||||
CreditKeyProductBusinessContribution.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
product_name: { type: DataTypes.STRING },
|
||||
contribution_business_product: { type: DataTypes.STRING },
|
||||
remarks: { type: DataTypes.STRING },
|
||||
company_name: { type: DataTypes.STRING },
|
||||
business_process: { type: DataTypes.STRING },
|
||||
common_remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_key_products_and_business_contribution',
|
||||
modelName: 'CreditKeyProductBusinessContribution',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return CreditKeyProductBusinessContribution
|
||||
}
|
||||
32
app/models/CreditKeyShareholder.js
Normal file
32
app/models/CreditKeyShareholder.js
Normal file
@ -0,0 +1,32 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class CreditKeyShareholder extends Model {
|
||||
|
||||
}
|
||||
CreditKeyShareholder.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
company_name: { type: DataTypes.STRING },
|
||||
stakeholder_length: { type: DataTypes.STRING },
|
||||
stakeholder_name: { type: DataTypes.STRING },
|
||||
share_holding: { type: DataTypes.STRING },
|
||||
vintage_in_current_biz: { type: DataTypes.STRING },
|
||||
previous_experience_details: { type: DataTypes.INTEGER },
|
||||
total_work_exp: { type: DataTypes.INTEGER },
|
||||
started_biz: { type: DataTypes.STRING },
|
||||
common_remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_key_stakeholders_in_business',
|
||||
modelName: 'CreditKeyShareholder',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return CreditKeyShareholder
|
||||
}
|
||||
43
app/models/CreditLoanDetail.js
Normal file
43
app/models/CreditLoanDetail.js
Normal file
@ -0,0 +1,43 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class CreditLoanDetail extends Model {
|
||||
|
||||
}
|
||||
CreditLoanDetail.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
loan_amount: { type: DataTypes.INTEGER },
|
||||
remarks_fund_source_balance: { type: DataTypes.STRING },
|
||||
loan_tenure: { type: DataTypes.INTEGER },
|
||||
sub_product: { type: DataTypes.STRING },
|
||||
end_use: { type: DataTypes.STRING },
|
||||
total_fund_requirement: { type: DataTypes.INTEGER },
|
||||
is_transfer: { type: DataTypes.STRING },
|
||||
balance_transfer_amount: { type: DataTypes.INTEGER },
|
||||
lender: { type: DataTypes.STRING },
|
||||
topup_amount: { type: DataTypes.INTEGER },
|
||||
property_type: { type: DataTypes.STRING },
|
||||
owner_name: { type: DataTypes.STRING },
|
||||
construction_status: { type: DataTypes.STRING },
|
||||
construction_stage: { type: DataTypes.STRING },
|
||||
emv_per_customer: { type: DataTypes.INTEGER },
|
||||
ltv_market_value_calculation: { type: DataTypes.INTEGER },
|
||||
address: { type: DataTypes.STRING },
|
||||
property_usage: { type: DataTypes.STRING },
|
||||
structure_type: { type: DataTypes.STRING },
|
||||
common_remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_loan_details',
|
||||
modelName: 'CreditLoanDetail',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return CreditLoanDetail
|
||||
}
|
||||
26
app/models/CreditManager.js
Normal file
26
app/models/CreditManager.js
Normal file
@ -0,0 +1,26 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class CreditManager extends Model {
|
||||
|
||||
}
|
||||
CreditManager.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
question: { type: DataTypes.STRING },
|
||||
answer: { type: DataTypes.STRING },
|
||||
common_remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'crredit_credit_manager_specific_queries',
|
||||
modelName: 'CreditManager',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return CreditManager
|
||||
}
|
||||
26
app/models/CreditProfile.js
Normal file
26
app/models/CreditProfile.js
Normal file
@ -0,0 +1,26 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class CreditProfile extends Model {
|
||||
|
||||
}
|
||||
CreditProfile.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
history_vintage: { type: DataTypes.STRING },
|
||||
primary_partners: { type: DataTypes.STRING },
|
||||
capital_details: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_profile',
|
||||
modelName: 'CreditProfile',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return CreditProfile
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class FinalRemarks extends Model {
|
||||
|
||||
}
|
||||
FinalRemarks.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
business_activity_seen: { type: DataTypes.STRING },
|
||||
location_workplace_suits_business: { type: DataTypes.STRING },
|
||||
overall_assessment: { type: DataTypes.STRING },
|
||||
recommended_roi: { type: DataTypes.INTEGER },
|
||||
future_business_expansion_plans: { type: DataTypes.STRING },
|
||||
any_other_remarks: { type: DataTypes.STRING },
|
||||
behaviour_call: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'sales_final_remarks_of_pd_officer',
|
||||
modelName: 'FinalRemarks',
|
||||
}
|
||||
)
|
||||
|
||||
return FinalRemarks
|
||||
}
|
||||
25
app/models/OverallPlanOfAction.js
Normal file
25
app/models/OverallPlanOfAction.js
Normal file
@ -0,0 +1,25 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class OverallPlanOfAction extends Model {
|
||||
|
||||
}
|
||||
OverallPlanOfAction.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
future_plan: { type: DataTypes.STRING },
|
||||
loan_amount: { type: DataTypes.INTEGER },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_overall_plan_of_action',
|
||||
modelName: 'OverallPlanOfAction',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return OverallPlanOfAction
|
||||
}
|
||||
28
app/models/PortFolioHealth.js
Normal file
28
app/models/PortFolioHealth.js
Normal file
@ -0,0 +1,28 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class PortFolioHealth extends Model {
|
||||
|
||||
}
|
||||
PortFolioHealth.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
par_book: { type: DataTypes.STRING },
|
||||
provisioning_resolution: { type: DataTypes.STRING },
|
||||
post_morotorium: { type: DataTypes.STRING },
|
||||
non_paying_customers: { type: DataTypes.STRING },
|
||||
par: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_portfolio_health',
|
||||
modelName: 'PortFolioHealth',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return PortFolioHealth
|
||||
}
|
||||
31
app/models/ProductAndProcess.js
Normal file
31
app/models/ProductAndProcess.js
Normal file
@ -0,0 +1,31 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class ProductAndProcess extends Model {
|
||||
|
||||
}
|
||||
ProductAndProcess.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
products: { type: DataTypes.STRING },
|
||||
policies: { type: DataTypes.STRING },
|
||||
credit_appraisal: { type: DataTypes.STRING },
|
||||
technology_credit: { type: DataTypes.STRING },
|
||||
collection_policy: { type: DataTypes.STRING },
|
||||
provisioning_policy: { type: DataTypes.STRING },
|
||||
restructuring_policy: { type: DataTypes.STRING },
|
||||
covid_policy: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_product_and_process',
|
||||
modelName: 'ProductAndProcess',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return ProductAndProcess
|
||||
}
|
||||
29
app/models/SizeAndGeographicalResearch.js
Normal file
29
app/models/SizeAndGeographicalResearch.js
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class SizeAndGeographicalResearch extends Model {
|
||||
|
||||
}
|
||||
SizeAndGeographicalResearch.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
aum_book: { type: DataTypes.STRING },
|
||||
geographical_details: { type: DataTypes.STRING },
|
||||
branches_employees: { type: DataTypes.STRING },
|
||||
portfolio_concentration: { type: DataTypes.STRING },
|
||||
business_competitors: { type: DataTypes.STRING },
|
||||
estimated_market: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_size_and_geographical_reach',
|
||||
modelName: 'SizeAndGeographicalResearch',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return SizeAndGeographicalResearch
|
||||
}
|
||||
34
app/models/StockDetail.js
Normal file
34
app/models/StockDetail.js
Normal file
@ -0,0 +1,34 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class StockDetail extends Model {
|
||||
|
||||
}
|
||||
StockDetail.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
stock_info_available: { type: DataTypes.STRING },
|
||||
stock_not_available_reason: { type: DataTypes.STRING },
|
||||
estimated_uom: { type: DataTypes.STRING },
|
||||
stock_type: { type: DataTypes.STRING },
|
||||
provider_name: { type: DataTypes.STRING },
|
||||
provider_observed: { type: DataTypes.STRING },
|
||||
estimated_quantity: { type: DataTypes.INTEGER },
|
||||
observed_estimated_uom: { type: DataTypes.STRING },
|
||||
estimated_stock_value: { type: DataTypes.INTEGER },
|
||||
company_name: { type: DataTypes.STRING },
|
||||
common_remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_stock_details',
|
||||
modelName: 'StockDetail',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return StockDetail
|
||||
}
|
||||
38
app/models/SupplierDetail.js
Normal file
38
app/models/SupplierDetail.js
Normal file
@ -0,0 +1,38 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class SupplierDetail extends Model {
|
||||
|
||||
}
|
||||
SupplierDetail.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
stock_info_available: { type: DataTypes.STRING },
|
||||
stock_not_available_reason: { type: DataTypes.STRING },
|
||||
provider_name: { type: DataTypes.STRING },
|
||||
supplier_name: { type: DataTypes.STRING },
|
||||
contact_person_name: { type: DataTypes.STRING },
|
||||
contact_person_designation: { type: DataTypes.STRING },
|
||||
contact_person_mobile_no: { type: DataTypes.INTEGER },
|
||||
person_stdcode: { type: DataTypes.INTEGER },
|
||||
person_landline: { type: DataTypes.INTEGER },
|
||||
payment_type: { type: DataTypes.STRING },
|
||||
payment_mode: { type: DataTypes.STRING },
|
||||
credit_period_no: { type: DataTypes.INTEGER },
|
||||
credit_total_purchase: { type: DataTypes.INTEGER },
|
||||
company_name: { type: DataTypes.STRING },
|
||||
common_remarks: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_supplier_details',
|
||||
modelName: 'SupplierDetail',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return SupplierDetail
|
||||
}
|
||||
27
app/models/TotalOverallDebit.js
Normal file
27
app/models/TotalOverallDebit.js
Normal file
@ -0,0 +1,27 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class TotalOverallDebit extends Model {
|
||||
|
||||
}
|
||||
TotalOverallDebit.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
dept_structures: { type: DataTypes.STRING },
|
||||
future_plan: { type: DataTypes.STRING },
|
||||
dfi_banks: { type: DataTypes.STRING },
|
||||
fresh_sanctions: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_total_overall_debt_or_equity_profile',
|
||||
modelName: 'TotalOverallDebit',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return TotalOverallDebit
|
||||
}
|
||||
36
app/models/ValidationPoint.js
Normal file
36
app/models/ValidationPoint.js
Normal file
@ -0,0 +1,36 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class ValidationPoint extends Model {
|
||||
|
||||
}
|
||||
ValidationPoint.init(
|
||||
{
|
||||
pd_id: { type: DataTypes.INTEGER },
|
||||
stock_validated: { type: DataTypes.STRING },
|
||||
collateral_coverage: { type: DataTypes.STRING },
|
||||
collection_efficiency: { type: DataTypes.STRING },
|
||||
loan_dox: { type: DataTypes.STRING },
|
||||
disbursement: { type: DataTypes.STRING },
|
||||
top20_exposure: { type: DataTypes.STRING },
|
||||
sanction_letters: { type: DataTypes.STRING },
|
||||
provisioning: { type: DataTypes.STRING },
|
||||
restructuring_loan: { type: DataTypes.STRING },
|
||||
emi_date: { type: DataTypes.STRING },
|
||||
cash_checked: { type: DataTypes.STRING },
|
||||
fd_details: { type: DataTypes.STRING },
|
||||
loan_management: { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER }
|
||||
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'credit_validation_points',
|
||||
modelName: 'ValidationPoint',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
return ValidationPoint
|
||||
}
|
||||
@ -22,7 +22,7 @@ module.exports = app => {
|
||||
router.get("/demo", Mycontroller.Welcome);
|
||||
|
||||
|
||||
router.get('/salespd',Mycontroller.SalesPd)
|
||||
router.get('/creditPd',Mycontroller.CreditPd)
|
||||
|
||||
|
||||
// routes started here
|
||||
|
||||
Loading…
Reference in New Issue
Block a user