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