'use strict' const { Model } = require('sequelize') module.exports = (sequelize, DataTypes) => { class Workingnotes 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' }) // } } Workingnotes.init( { losid: { type: DataTypes.STRING }, notes: { type: DataTypes.STRING }, sheet_no: { type: DataTypes.STRING }, user_id: { type: DataTypes.INTEGER }, is_active: { type: DataTypes.INTEGER }, createdby: { type: DataTypes.INTEGER }, updatedby: { type: DataTypes.INTEGER }, }, { sequelize, tableName: 'working_notes', modelName: 'Workingnotes', } ) return Workingnotes }