smc_cet_mainapp_backend/app/models/ApplicantsDetails.js
2023-10-11 12:29:18 +05:30

46 lines
1.5 KiB
JavaScript

'use strict'
const { Model } = require('sequelize')
module.exports = (sequelize, DataTypes) => {
class ApplicantsDetails extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*/
// define association here
// static associate({ Financials }) {
// this.hasMany(Financials, { foreignKey: 'entity_id', as: 'financialsData' })
// }
}
ApplicantsDetails.init(
{
loan_no_id: { type: DataTypes.INTEGER },
pan_no: { type: DataTypes.STRING },
losid: { type: DataTypes.STRING },
name: { type: DataTypes.STRING },
entity_type: { type: DataTypes.STRING },
designation: { type: DataTypes.STRING },
ownership_share_in_the_entity: { type: DataTypes.INTEGER },
applicant_type: { type: DataTypes.STRING },
key_promoter: { type: DataTypes.STRING },
bureau_name: { type: DataTypes.STRING },
bureau_score: { type: DataTypes.STRING },
heir_in_business_and_on_loan_struct: { type: DataTypes.STRING },
nri: { type: DataTypes.STRING },
is_data_from_los : { type: DataTypes.INTEGER },
is_active : { type: DataTypes.INTEGER },
createdby: { type: DataTypes.INTEGER },
updatedby: { type: DataTypes.INTEGER },
},
{
sequelize,
tableName: 'applicants',
modelName: 'ApplicantsDetails',
}
)
return ApplicantsDetails
}