susee , formula master api
This commit is contained in:
parent
56064ffb46
commit
c627ed8e7d
@ -1,5 +1,5 @@
|
||||
const { raw } = require('body-parser');
|
||||
const { sequelize , LoanDetail , EntityDetails , ApplicantsDetails , ApplicantsRelationship , ResidenceAddressDetails , PropertyOwnershipIncomeConsidered , DueDiligenceCheck , TradeReferences , CheckTypeMaster , EnquiriesAndDisbursements , PropertyAndLtv , ATNWrelatedInputs , SalesPD , ATNWrelatedInputMaster ,ATNWrelationship , OtherParameterMaster ,OtherParameterMasterValue , OtherParameterRelationship , OtherParameters , ATNErelatedInputSubVal , DataFromLos } = require('../models')
|
||||
const { sequelize , LoanDetail , EntityDetails , ApplicantsDetails , ApplicantsRelationship , ResidenceAddressDetails , PropertyOwnershipIncomeConsidered , DueDiligenceCheck , TradeReferences , CheckTypeMaster , EnquiriesAndDisbursements , PropertyAndLtv , ATNWrelatedInputs , SalesPD , ATNWrelatedInputMaster ,ATNWrelationship , OtherParameterMaster ,OtherParameterMasterValue , OtherParameterRelationship , OtherParameters , ATNErelatedInputSubVal , DataFromLos , FormulaMaster } = require('../models')
|
||||
const { logMsg } = require('../services/logger.js');
|
||||
|
||||
|
||||
@ -1155,6 +1155,37 @@ exports.DataFromLos = async (req, res) =>
|
||||
|
||||
|
||||
|
||||
// Formula Master List Api
|
||||
exports.FormulaMasterList = async (req, res) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
FormulaMaster.findAll({raw: true , where : { is_active : 1}}).then(data =>
|
||||
{
|
||||
if(data.length > 0)
|
||||
{
|
||||
res.send({'status':200,'message':"success",'data':data});
|
||||
}
|
||||
else {
|
||||
res.send({'status':404,'message':"failed",'data':"No data"});
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
res.send({'status':404,
|
||||
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
|
||||
});
|
||||
|
||||
} catch(err) {
|
||||
res.send({'status':404,message: err.message || "Some error occurred while inserting statements." ,'data': "No data" });
|
||||
} //end of try catch
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
const { sequelize,EntityApplicantMaster,StateMaster,CityMaster,PinMaster,ChecktypeCheckresultRelationMaster
|
||||
,DueDiligenceCheck,CheckResultMaster,CheckTypeMaster,LoanAndLtvMaster , ATNWrelatedInputMaster ,
|
||||
ATNWrelatedInputMasterValues ,ATNWrelatedInputs, ATNWrelationship ,
|
||||
OtherParameterMaster ,OtherParameterMasterValue , OtherParameterRelationship} = require('../models')
|
||||
const { sequelize,EntityApplicantMaster,StateMaster,CityMaster,PinMaster,ChecktypeCheckresultRelationMaster,DueDiligenceCheck,CheckResultMaster,CheckTypeMaster,LoanAndLtvMaster , ATNWrelatedInputMaster ,ATNWrelatedInputMasterValues ,ATNWrelatedInputs, ATNWrelationship , OtherParameterMaster ,OtherParameterMasterValue , OtherParameterRelationship} = require('../models')
|
||||
const { logMsg } = require('../services/logger.js');
|
||||
|
||||
|
||||
|
||||
27
app/models/FormulaMaster.js
Normal file
27
app/models/FormulaMaster.js
Normal file
@ -0,0 +1,27 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class FormulaMaster extends Model {
|
||||
|
||||
}
|
||||
FormulaMaster.init(
|
||||
{
|
||||
table_name : { type: DataTypes.STRING },
|
||||
column_name : { type: DataTypes.STRING },
|
||||
formula : { type: DataTypes.STRING },
|
||||
createdby: { type: DataTypes.INTEGER },
|
||||
updatedby: { type: DataTypes.INTEGER },
|
||||
is_active: {type : DataTypes.INTEGER}
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'formula_master',
|
||||
modelName: 'FormulaMaster',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
return FormulaMaster
|
||||
}
|
||||
@ -2406,6 +2406,23 @@ router.get("/DataFromLos", Entitycontroller.DataFromLos);
|
||||
|
||||
|
||||
|
||||
// Formula Master List api
|
||||
/**
|
||||
* @swagger
|
||||
* /api/FormulaMasterList:
|
||||
* get:
|
||||
* summary: Formula Master List
|
||||
* description: Formula Master List
|
||||
* responses:
|
||||
* 200:
|
||||
* description: success
|
||||
*/
|
||||
router.get("/FormulaMasterList", Entitycontroller.FormulaMasterList);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// routes started here
|
||||
|
||||
Loading…
Reference in New Issue
Block a user