Store_UI/admin/distz/api/models/prescription.js

29 lines
743 B
JavaScript
Raw Normal View History

2022-09-26 06:18:12 +00:00
'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;
};