OCA_Backend/api/models/offer.js

28 lines
667 B
JavaScript
Raw Normal View History

2022-01-22 13:36:44 +00:00
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class offer 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) {
// define association here
}
}
offer.init({
name: DataTypes.STRING,
priceType: DataTypes.INTEGER,
price: DataTypes.DOUBLE,
status: DataTypes.INTEGER,
createdBy: DataTypes.INTEGER,
updateBy: DataTypes.INTEGER
}, {
sequelize,
modelName: 'offer',
});
return offer;
};