99 lines
3.3 KiB
JavaScript
99 lines
3.3 KiB
JavaScript
'use strict'
|
|
const { Model } = require('sequelize')
|
|
//const { sequelize, GeneralSection ,FundRequirement , DetailsOfKeyShareHolder , BreifOfBusiness , FinancialInformation , PropertyInformationn , FinalRemarks , OfficerDetails , Photograph , InstitutionDetail , ProductInformation} = require('../models');
|
|
module.exports = (sequelize, DataTypes) => {
|
|
class GeneralSection extends Model {
|
|
|
|
}
|
|
GeneralSection.init(
|
|
{
|
|
pd_id: {
|
|
type: DataTypes.INTEGER,
|
|
autoIncrement : true,
|
|
primaryKey: true
|
|
},
|
|
ref_no: { type: DataTypes.INTEGER },
|
|
product: { type: DataTypes.STRING },
|
|
case_no: { type: DataTypes.STRING },
|
|
losid: { type: DataTypes.STRING },
|
|
sales_pd_type : { type: DataTypes.INTEGER },
|
|
application_id: { type: DataTypes.STRING },
|
|
main_loan_applicant: { type: DataTypes.STRING },
|
|
company_name: { type: DataTypes.STRING },
|
|
person_met_during_visit: { type: DataTypes.STRING },
|
|
person_met_designation: { type: DataTypes.STRING },
|
|
person_met_contact_no: { type: DataTypes.INTEGER },
|
|
address_visited: { type: DataTypes.STRING },
|
|
state: { type: DataTypes.STRING },
|
|
city: { type: DataTypes.STRING },
|
|
pincode: { type: DataTypes.INTEGER },
|
|
constitution: { type: DataTypes.STRING },
|
|
applicant_qualification: { type: DataTypes.STRING },
|
|
mother_name: { type: DataTypes.STRING },
|
|
official_emailid: { type: DataTypes.STRING },
|
|
current_residence_address: { type: DataTypes.STRING },
|
|
current_residence_ownership: { type: DataTypes.STRING },
|
|
business_office_address: { type: DataTypes.STRING },
|
|
remarks: { type: DataTypes.STRING },
|
|
createdby: { type: DataTypes.INTEGER },
|
|
updatedby: { type: DataTypes.INTEGER },
|
|
completed_date : {type : DataTypes.DATE},
|
|
sales_pd_type : { type: DataTypes.INTEGER },
|
|
landmark : { type: DataTypes.STRING },
|
|
employee_id : { type: DataTypes.STRING }
|
|
|
|
|
|
},
|
|
{
|
|
sequelize,
|
|
tableName: 'sales_general_section',
|
|
modelName: 'GeneralSection',
|
|
}
|
|
)
|
|
|
|
|
|
GeneralSection.associate = models => {
|
|
GeneralSection.hasMany(models.FundRequirement, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.DetailsOfKeyShareHolder, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.BriefOfBusiness, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.FinancialInformation, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.PropertyInformation, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.FinalRemarks, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.OfficerDetails, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.Photograph, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.InstitutionDetail, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
GeneralSection.hasMany(models.ProductInformation, {
|
|
foreignKey: 'pd_id',
|
|
sourceKey : 'pd_id'
|
|
});
|
|
}
|
|
|
|
return GeneralSection
|
|
} |