mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
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)
|
||
|
};
|