2015-10-06 16:36:56 +03:00
|
|
|
/**
|
|
|
|
* Dependencies
|
|
|
|
*/
|
|
|
|
|
2020-04-29 18:44:27 +03:00
|
|
|
const _ = require('lodash');
|
2013-06-01 18:47:41 +04:00
|
|
|
|
2016-06-10 10:37:55 +03:00
|
|
|
// enable event listeners
|
|
|
|
require('./base/listeners');
|
2016-06-01 19:46:41 +03:00
|
|
|
|
2015-10-06 16:36:56 +03:00
|
|
|
/**
|
|
|
|
* Expose all models
|
|
|
|
*/
|
|
|
|
exports = module.exports;
|
|
|
|
|
2020-04-29 18:44:27 +03:00
|
|
|
const models = [
|
2015-10-06 16:36:56 +03:00
|
|
|
'permission',
|
|
|
|
'post',
|
|
|
|
'role',
|
|
|
|
'settings',
|
2018-09-27 15:31:39 +03:00
|
|
|
'session',
|
2015-10-06 16:36:56 +03:00
|
|
|
'tag',
|
2019-01-03 22:30:35 +03:00
|
|
|
'tag-public',
|
2016-09-21 17:48:14 +03:00
|
|
|
'user',
|
2019-01-03 22:30:35 +03:00
|
|
|
'author',
|
2017-11-21 18:43:14 +03:00
|
|
|
'invite',
|
2018-10-02 19:46:38 +03:00
|
|
|
'webhook',
|
|
|
|
'integration',
|
2018-10-09 16:31:09 +03:00
|
|
|
'api-key',
|
2018-12-10 12:20:54 +03:00
|
|
|
'mobiledoc-revision',
|
2019-01-29 21:44:52 +03:00
|
|
|
'member',
|
2021-04-08 20:01:49 +03:00
|
|
|
'product',
|
2021-04-09 14:03:28 +03:00
|
|
|
'stripe-product',
|
|
|
|
'stripe-price',
|
2021-02-04 12:22:40 +03:00
|
|
|
'member-subscribe-event',
|
2021-02-12 16:15:47 +03:00
|
|
|
'member-paid-subscription-event',
|
2021-02-12 16:14:52 +03:00
|
|
|
'member-login-event',
|
2021-02-12 16:15:27 +03:00
|
|
|
'member-email-change-event',
|
2021-02-12 16:13:56 +03:00
|
|
|
'member-payment-event',
|
2021-02-12 16:13:16 +03:00
|
|
|
'member-status-event',
|
2019-10-08 15:58:08 +03:00
|
|
|
'posts-meta',
|
2019-09-26 08:07:52 +03:00
|
|
|
'member-stripe-customer',
|
2019-11-06 08:52:58 +03:00
|
|
|
'stripe-customer-subscription',
|
2020-02-14 12:33:10 +03:00
|
|
|
'email',
|
2020-09-14 17:40:00 +03:00
|
|
|
'email-batch',
|
|
|
|
'email-recipient',
|
2020-09-18 17:05:56 +03:00
|
|
|
'label',
|
2020-10-14 13:50:39 +03:00
|
|
|
'single-use-token',
|
2020-10-16 20:02:58 +03:00
|
|
|
'snippet',
|
2020-10-14 13:50:39 +03:00
|
|
|
// Action model MUST be loaded last as it loops through all of the registered models
|
|
|
|
// Please do not append items to this array.
|
|
|
|
'action'
|
2015-10-06 16:36:56 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
exports.Base = require('./base');
|
|
|
|
|
|
|
|
models.forEach(function (name) {
|
|
|
|
_.extend(exports, require('./' + name));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Expose `init`
|
|
|
|
*/
|
|
|
|
|
|
|
|
exports.init = init;
|