Ghost/core/server/models/client.js
Hannah Wolfe 6e48275160 Extending context concept to models
fixes #3275, fixes #3290, ref #3086, ref #3084

- Ensure that we use the current logged in user and not just user 1 when
- removing hard coded user: 1 except where absolutely necessary
- passing context, rather than user to models
- base model has a new function to determine what id to use for created_by etc
2014-07-18 15:32:56 +01:00

18 lines
337 B
JavaScript

var ghostBookshelf = require('./base'),
Client,
Clients;
Client = ghostBookshelf.Model.extend({
tableName: 'clients'
});
Clients = ghostBookshelf.Collection.extend({
model: Client
});
module.exports = {
Client: ghostBookshelf.model('Client', Client),
Clients: ghostBookshelf.collection('Clients', Clients)
};