This commit is contained in:
suseendhiran17 2022-06-08 18:14:30 +05:30
parent 7f207916bd
commit 98c2d88f39
10 changed files with 357 additions and 5 deletions

View File

@ -1,4 +1,4 @@
const { sequelize,Test} = require('../models')
const { sequelize,Test,DeviationMaster} = require('../models')
const { logMsg } = require('../services/logger.js');
exports.Welcome = (req, res) =>
@ -17,4 +17,3 @@ exports.Welcome = (req, res) =>
};

View File

@ -0,0 +1,28 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class DeviationMaster extends Model {
}
DeviationMaster.init(
{
master_name : { type: DataTypes.STRING },
value : { type: DataTypes.STRING },
is_active : { type: DataTypes.INTEGER },
createdAt : { type: DataTypes.DATE },
createdby : { type: DataTypes.INTEGER },
updatedAt : { type: DataTypes.DATE },
updatedby : { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'deviation_master',
modelName: 'DeviationMaster',
}
)
return DeviationMaster
}

View File

@ -0,0 +1,30 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class OutEnquiryAmountC extends Model {
}
OutEnquiryAmountC.init(
{
enquiry_amount_id : { type: DataTypes.INTEGER },
months_range : { type: DataTypes.STRING },
amt : { type: DataTypes.INTEGER },
count : { type: DataTypes.INTEGER },
is_active : { type: DataTypes.INTEGER },
createdAt : { type: DataTypes.DATE },
createdby : { type: DataTypes.INTEGER },
updatedAt : { type: DataTypes.DATE },
updatedby : { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'out_enquiry_amount_c',
modelName: 'OutEnquiryAmountC',
}
)
return OutEnquiryAmountC
}

View File

@ -0,0 +1,33 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class OutSanctionAmt_C extends Model {
}
OutSanctionAmt_C.init(
{
sanction_amt_id : { type: DataTypes.INTEGER },
months_range : { type: DataTypes.STRING },
amt : { type: DataTypes.INTEGER },
count : { type: DataTypes.INTEGER },
opening_amt : { type: DataTypes.INTEGER },
opening_count : { type: DataTypes.INTEGER },
closing_amt : { type: DataTypes.INTEGER },
closing_count : { type: DataTypes.INTEGER },
createdAt : { type: DataTypes.DATE },
createdby : { type: DataTypes.INTEGER },
updatedAt : { type: DataTypes.DATE },
updatedby : { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'out_sanction_amt_and_replacement_of_debt_c',
modelName: 'OutSanctionAmt_C',
}
)
return OutSanctionAmt_C
}

View File

@ -0,0 +1,29 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class OutSanctionAmt_P extends Model {
}
OutSanctionAmt_P.init(
{
losid : { type: DataTypes.STRING },
ref_no : { type: DataTypes.STRING },
facility_type : { type: DataTypes.STRING },
total : { type: DataTypes.INTEGER },
createdAt : { type: DataTypes.DATE },
createdby : { type: DataTypes.INTEGER },
updatedAt : { type: DataTypes.DATE },
updatedby : { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'out_sanction_amt_and_replacement_of_debt_p',
modelName: 'OutSanctionAmt_P',
}
)
return OutSanctionAmt_P
}

View File

@ -0,0 +1,44 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class OutputActiveAndClosedLoans extends Model {
}
OutputActiveAndClosedLoans.init(
{
losid : { type: DataTypes.STRING },
ref_no : { type: DataTypes.STRING },
account_type : { type: DataTypes.STRING },
consumer_name : { type: DataTypes.STRING },
ownership : { type: DataTypes.STRING },
reported_and_certified_date : { type: DataTypes.DATE },
opened_date : { type: DataTypes.DATE },
sanctioned_amount : { type: DataTypes.INTEGER },
current_balance : { type: DataTypes.INTEGER },
repayment_tenure : { type: DataTypes.STRING },
emi_amount : { type: DataTypes.INTEGER },
overdue_amount : { type: DataTypes.INTEGER },
status : { type: DataTypes.STRING },
current_dpd : { type: DataTypes.STRING },
highest_dpd_month_wise_bucket_or_count_0_to_6 : { type: DataTypes.STRING },
highest_dpd_month_wise_bucket_or_count_07_to_12 : { type: DataTypes.STRING },
highest_dpd_month_wise_bucket_or_count_13_to_24 : { type: DataTypes.STRING },
highest_dpd_month_wise_bucket_or_count_25_to_36 : { type: DataTypes.STRING },
is_active : { type: DataTypes.INTEGER },
createdAt : { type: DataTypes.DATE },
createdby : { type: DataTypes.INTEGER },
updatedAt : { type: DataTypes.DATE },
updatedby : { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'out_active_and_closed_loans_details',
modelName: 'OutputActiveAndClosedLoans',
}
)
return OutputActiveAndClosedLoans
}

View File

@ -0,0 +1,30 @@
'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class OutEnquiryAmountP extends Model {
}
OutEnquiryAmountP.init(
{
losid : { type: DataTypes.STRING },
ref_no : { type: DataTypes.STRING },
facility_type : { type: DataTypes.STRING },
total : { type: DataTypes.INTEGER },
is_active : { type: DataTypes.INTEGER },
createdAt : { type: DataTypes.DATE },
createdby : { type: DataTypes.INTEGER },
updatedAt : { type: DataTypes.DATE },
updatedby : { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'out_enquity_amount_p',
modelName: 'OutEnquiryAmountP',
}
)
return OutEnquiryAmountP
}

View File

@ -22,7 +22,9 @@ module.exports = app => {
router.get("/demo", Mycontroller.Welcome);
// routes started here
app.use('/api', router);
};

158
package-lock.json generated
View File

@ -20,7 +20,8 @@
"swagger-jsdoc": "^6.1.0",
"swagger-ui-express": "^4.1.6",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.5.5"
"winston-daily-rotate-file": "^4.5.5",
"xlsx": "^0.18.5"
},
"devDependencies": {
"nodemon": "^2.0.12"
@ -715,6 +716,14 @@
"safe-buffer": "^5.0.1"
}
},
"node_modules/adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
@ -1231,6 +1240,18 @@
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"node_modules/cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"dependencies": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@ -1346,6 +1367,14 @@
"node": ">=0.10.0"
}
},
"node_modules/codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/color": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
@ -1499,6 +1528,17 @@
"node": ">= 0.10"
}
},
"node_modules/crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
"bin": {
"crc32": "bin/crc32.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/crypto-random-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
@ -1924,6 +1964,14 @@
"node": ">= 0.6"
}
},
"node_modules/frac": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
@ -3956,6 +4004,17 @@
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
"integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug=="
},
"node_modules/ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"dependencies": {
"frac": "~1.1.2"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/sshpk": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
@ -4678,6 +4737,22 @@
"@types/node": "*"
}
},
"node_modules/wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/word": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
"engines": {
"node": ">=0.8"
}
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
@ -4765,6 +4840,26 @@
"node": ">=8"
}
},
"node_modules/xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"dependencies": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
},
"bin": {
"xlsx": "bin/xlsx.njs"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
@ -5411,6 +5506,11 @@
}
}
},
"adler-32": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
"integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A=="
},
"agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
@ -5812,6 +5912,15 @@
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"cfb": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
"integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
"requires": {
"adler-32": "~1.3.0",
"crc-32": "~1.2.0"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
@ -5896,6 +6005,11 @@
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"optional": true
},
"codepage": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
"integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA=="
},
"color": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
@ -6027,6 +6141,11 @@
"vary": "^1"
}
},
"crc-32": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
"integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="
},
"crypto-random-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
@ -6353,6 +6472,11 @@
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
},
"frac": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
"integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA=="
},
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
@ -7880,6 +8004,14 @@
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz",
"integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug=="
},
"ssf": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
"integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
"requires": {
"frac": "~1.1.2"
}
},
"sshpk": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz",
@ -8435,6 +8567,16 @@
"@types/node": "*"
}
},
"wmf": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
"integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw=="
},
"word": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
"integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA=="
},
"wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
@ -8503,6 +8645,20 @@
"integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==",
"dev": true
},
"xlsx": {
"version": "0.18.5",
"resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
"integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
"requires": {
"adler-32": "~1.3.0",
"cfb": "~1.2.1",
"codepage": "~1.15.0",
"crc-32": "~1.2.1",
"ssf": "~0.11.2",
"wmf": "~1.0.1",
"word": "~0.3.0"
}
},
"xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",

View File

@ -21,7 +21,8 @@
"swagger-jsdoc": "^6.1.0",
"swagger-ui-express": "^4.1.6",
"winston": "^3.3.3",
"winston-daily-rotate-file": "^4.5.5"
"winston-daily-rotate-file": "^4.5.5",
"xlsx": "^0.18.5"
},
"devDependencies": {
"nodemon": "^2.0.12"