Ghost/core/server/models/offer.js
Rishabh 78d0644d78 Added model for offers table
refs https://github.com/TryGhost/Team/issues/1088

- adds basic model definition for `offers` table
2021-10-04 12:03:36 +05:30

14 lines
272 B
JavaScript

const ghostBookshelf = require('./base');
const Offer = ghostBookshelf.Model.extend({
tableName: 'offers',
product() {
return this.belongsTo('Product', 'product_id', 'id');
}
});
module.exports = {
Offer: ghostBookshelf.model('Offer', Offer)
};