78d0644d78
refs https://github.com/TryGhost/Team/issues/1088 - adds basic model definition for `offers` table
14 lines
272 B
JavaScript
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)
|
|
};
|