40 lines
1.2 KiB
JavaScript
40 lines
1.2 KiB
JavaScript
'use strict'
|
|
const { Model } = require('sequelize')
|
|
module.exports = (sequelize, DataTypes) => {
|
|
class DscrLeverageGrid 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' })
|
|
// }
|
|
|
|
|
|
}
|
|
DscrLeverageGrid.init(
|
|
{
|
|
program_id : { type: DataTypes.INTEGER },
|
|
business_activity_id : { type: DataTypes.INTEGER },
|
|
leverage : { type: DataTypes.STRING },
|
|
dscr_min : { type: DataTypes.STRING },
|
|
dscr_max : { type: DataTypes.STRING },
|
|
result : { 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: 'dscr_leverage_grid',
|
|
modelName: 'DscrLeverageGrid',
|
|
}
|
|
)
|
|
return DscrLeverageGrid
|
|
}
|