'use strict' const { Model } = require('sequelize') module.exports = (sequelize, DataTypes) => { class OtherIncomeP extends Model { } OtherIncomeP.init( { losid: { type: DataTypes.STRING }, order_id: { type: DataTypes.INTEGER }, table_name: { type: DataTypes.STRING }, particulars: { type: DataTypes.STRING }, is_active: { type: DataTypes.INTEGER }, createdby: { type: DataTypes.INTEGER }, updatedby: { type: DataTypes.INTEGER } }, { sequelize, tableName: 'other_income_p', modelName: 'OtherIncomeP', } ) OtherIncomeP.associate = models => { OtherIncomeP.hasMany(models.OtherIncomeC, { foreignKey: 'other_income_id', sourceKey : 'id' }); } return OtherIncomeP }