susee
This commit is contained in:
parent
ece5bf1fb1
commit
aa90979106
@ -1,5 +1,5 @@
|
||||
const { sequelize,EntityApplicantMaster,StateMaster,CityMaster,PinMaster,ChecktypeCheckresultRelationMaster
|
||||
,DueDiligenceCheck,CheckResultMaster,CheckTypeMaster} = require('../models')
|
||||
,DueDiligenceCheck,CheckResultMaster,CheckTypeMaster,LoanAndLtvMaster} = require('../models')
|
||||
const { logMsg } = require('../services/logger.js');
|
||||
|
||||
|
||||
@ -193,6 +193,30 @@ const { logMsg } = require('../services/logger.js');
|
||||
|
||||
};
|
||||
|
||||
// select pin master data
|
||||
exports.loanAndLtvMaster = async (req, res) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
await LoanAndLtvMaster.findAll({ where : { "is_active" : 1 }})
|
||||
.then(data =>
|
||||
{
|
||||
res.send({'status':200,'message':"success",'data':data});
|
||||
|
||||
})
|
||||
.catch(err => {
|
||||
res.send({'status':404,
|
||||
message: err.message || "Some error occurred while fetching masterdata." ,'data': "No data" });
|
||||
});
|
||||
|
||||
} catch(err) {
|
||||
res.send({'status':404,
|
||||
message: err.message || "Some error occurred while fetching masterdata." ,'data': "No data"
|
||||
});
|
||||
} //end of try catch
|
||||
|
||||
};
|
||||
|
||||
// // select pin master data
|
||||
// exports.PinMasterData = async (req, res) =>
|
||||
// {
|
||||
|
||||
24
app/models/LoanAndLtvMaster.js
Normal file
24
app/models/LoanAndLtvMaster.js
Normal file
@ -0,0 +1,24 @@
|
||||
'use strict'
|
||||
const { Model } = require('sequelize')
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
class LoanAndLtvMaster extends Model {
|
||||
|
||||
}
|
||||
LoanAndLtvMaster.init(
|
||||
{
|
||||
master_name : { type: DataTypes.STRING },
|
||||
value: { type: DataTypes.STRING },
|
||||
is_active: { type: DataTypes.INTEGER }
|
||||
},
|
||||
{
|
||||
sequelize,
|
||||
tableName: 'loan_details_master',
|
||||
modelName: 'LoanAndLtvMaster',
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
return LoanAndLtvMaster
|
||||
}
|
||||
@ -20,6 +20,7 @@ module.exports = app => {
|
||||
*/
|
||||
router.get("/demo", Testcontroller.Welcome);
|
||||
|
||||
|
||||
// router.get("/excel", Testcontroller.excel);
|
||||
|
||||
// entity_applicant_name list for banking module
|
||||
@ -2229,6 +2230,21 @@ router.post("/createLoanDetail", Entitycontroller.createLoanDetail);
|
||||
*/
|
||||
router.post("/updateLoanDetail", Entitycontroller.updateLoanDetail);
|
||||
|
||||
|
||||
// loan and ltv select api
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/loanAndLtvMaster:
|
||||
* get:
|
||||
* summary: Dropdown loan And property & Ltv Master Api
|
||||
* description: All master data for dropdown value
|
||||
* responses:
|
||||
* 200:
|
||||
* description: success
|
||||
*/
|
||||
router.get("/loanAndLtvMaster", Mastercontroller.loanAndLtvMaster);
|
||||
|
||||
// routes started here
|
||||
app.use('/api', router);
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user