0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/server/models/client.js

21 lines
457 B
JavaScript
Raw Normal View History

var ghostBookshelf = require('./base'),
Client,
Clients;
Client = ghostBookshelf.Model.extend({
tableName: 'clients',
trustedDomains: function trustedDomains() {
return this.hasMany('ClientTrustedDomain', 'client_id');
}
});
Clients = ghostBookshelf.Collection.extend({
model: Client
});
module.exports = {
Client: ghostBookshelf.model('Client', Client),
Clients: ghostBookshelf.collection('Clients', Clients)
};