mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 01:41:46 +03:00
19 lines
457 B
JavaScript
19 lines
457 B
JavaScript
|
const ghostBookshelf = require('./base');
|
||
|
|
||
|
const Integration = ghostBookshelf.Model.extend({
|
||
|
tableName: 'integrations',
|
||
|
|
||
|
api_keys: function apiKeys() {
|
||
|
return this.hasMany('ApiKey');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
const Integrations = ghostBookshelf.Collection.extend({
|
||
|
model: Integration
|
||
|
});
|
||
|
|
||
|
module.exports = {
|
||
|
Integration: ghostBookshelf.model('Integration', Integration),
|
||
|
Integrations: ghostBookshelf.collection('Integrations', Integrations)
|
||
|
};
|