28 lines
667 B
JavaScript
28 lines
667 B
JavaScript
|
'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;
|
||
|
};
|