2015-10-06 15:36:56 +02:00
|
|
|
/**
|
|
|
|
* Dependencies
|
|
|
|
*/
|
|
|
|
|
2016-03-01 22:42:01 -06:00
|
|
|
var _ = require('lodash'),
|
2015-10-06 15:36:56 +02:00
|
|
|
exports,
|
2014-07-13 12:17:18 +01:00
|
|
|
models;
|
2013-06-01 10:47:41 -04:00
|
|
|
|
2016-06-10 09:37:55 +02:00
|
|
|
// enable event listeners
|
|
|
|
require('./base/listeners');
|
2016-06-01 17:46:41 +01:00
|
|
|
|
2015-10-06 15:36:56 +02:00
|
|
|
/**
|
|
|
|
* Expose all models
|
|
|
|
*/
|
|
|
|
exports = module.exports;
|
|
|
|
|
|
|
|
models = [
|
|
|
|
'permission',
|
|
|
|
'post',
|
|
|
|
'role',
|
|
|
|
'settings',
|
2018-09-27 19:31:39 +07:00
|
|
|
'session',
|
2015-10-06 15:36:56 +02:00
|
|
|
'tag',
|
2019-01-03 20:30:35 +01:00
|
|
|
'tag-public',
|
2016-09-21 16:48:14 +02:00
|
|
|
'user',
|
2019-01-03 20:30:35 +01:00
|
|
|
'author',
|
2017-11-21 15:43:14 +00:00
|
|
|
'invite',
|
2018-10-02 17:46:38 +01:00
|
|
|
'webhook',
|
|
|
|
'integration',
|
2018-10-09 15:31:09 +02:00
|
|
|
'api-key',
|
2018-12-10 16:20:54 +07:00
|
|
|
'mobiledoc-revision',
|
2019-01-29 19:44:52 +01:00
|
|
|
'member',
|
2019-09-16 14:15:55 +05:30
|
|
|
'action',
|
2019-10-08 13:58:08 +01:00
|
|
|
'posts-meta',
|
2019-09-26 12:07:52 +07:00
|
|
|
'member-stripe-customer',
|
2019-11-06 12:52:58 +07:00
|
|
|
'stripe-customer-subscription',
|
2020-02-14 15:03:10 +05:30
|
|
|
'email',
|
|
|
|
'label'
|
2015-10-06 15:36:56 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
exports.Base = require('./base');
|
|
|
|
|
|
|
|
models.forEach(function (name) {
|
|
|
|
_.extend(exports, require('./' + name));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Expose `init`
|
|
|
|
*/
|
|
|
|
|
|
|
|
exports.init = init;
|