Store_UI/admin/distz/api/models/prescription.js
2022-09-26 11:48:12 +05:30

29 lines
743 B
JavaScript

'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;
};