You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matterwiki/models/user.js

14 lines
288 B
JavaScript

var bookshelf = require('../bookshelf');
bookshelf.plugin('registry');
var Articles = require('./article.js');
var User = bookshelf.Model.extend({
tableName: 'users',
articles: function(){
return this.hasMany('Articles');
}
});
module.exports = bookshelf.model('User',User);