33 lines
897 B
JavaScript
33 lines
897 B
JavaScript
'use strict'
|
|
const { Model } = require('sequelize')
|
|
module.exports = (sequelize, DataTypes) => {
|
|
class EntityApplicantMaster 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' })
|
|
// }
|
|
|
|
|
|
}
|
|
EntityApplicantMaster.init(
|
|
{
|
|
master_name: { type: DataTypes.STRING },
|
|
value: { type: DataTypes.STRING },
|
|
sub_value: { type: DataTypes.STRING },
|
|
is_active: { type: DataTypes.INTEGER }
|
|
|
|
},
|
|
{
|
|
sequelize,
|
|
tableName: 'entity_applicant_master',
|
|
modelName: 'EntityApplicantMaster',
|
|
}
|
|
)
|
|
return EntityApplicantMaster
|
|
}
|