0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added model for offers table

refs https://github.com/TryGhost/Team/issues/1088

- adds basic model definition for `offers` table
This commit is contained in:
Rishabh 2021-09-30 22:41:17 +05:30
parent c2ea67b2ff
commit 78d0644d78

View file

@ -0,0 +1,13 @@
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)
};