Ghost/core/server/models/index.js

45 lines
561 B
JavaScript
Raw Normal View History

/**
* Dependencies
*/
var _ = require('lodash'),
exports,
models;
2013-06-01 18:47:41 +04:00
/**
* Expose all models
*/
exports = module.exports;
models = [
'accesstoken',
'app-field',
'app-setting',
'app',
'client-trusted-domain',
'client',
'permission',
'post',
'refreshtoken',
'role',
'settings',
'tag',
'user'
];
function init() {
exports.Base = require('./base');
models.forEach(function (name) {
_.extend(exports, require('./' + name));
});
}
/**
* Expose `init`
*/
exports.init = init;