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:
parent
c2ea67b2ff
commit
78d0644d78
1 changed files with 13 additions and 0 deletions
13
core/server/models/offer.js
Normal file
13
core/server/models/offer.js
Normal 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)
|
||||
};
|
Loading…
Reference in a new issue