'use strict'; const { Model } = require('sequelize'); module.exports = (sequelize, DataTypes) => { class prescription 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. */ static associate(models) { models.prescription.hasOne(models.users); } } prescription.init({ storeId: DataTypes.INTEGER, prescription: DataTypes.STRING, status: DataTypes.INTEGER, date:DataTypes.DATE, userId:DataTypes.INTEGER, createdBy: DataTypes.INTEGER, updatedBy: DataTypes.INTEGER }, { sequelize, modelName: 'prescription', }); return prescription; };