smc_cet_workingnotes_backend/app/models/Workingnotes.js
2022-05-23 12:57:20 +05:30

37 lines
1.0 KiB
JavaScript

'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 },
module_name: { type: DataTypes.STRING },
entity_reference: { type: DataTypes.STRING },
notes: { 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
}