Ghost/core/server/models/index.js
Fabien O'Carroll 7cf0252392 Added MemberPaidSubscriptionEvent model
refs https://github.com/TryGhost/Ghost/issues/12602

- Adds the aggregateMRRDeltas option to the `findAll` method,
allowing us to calculate MRR over time
2021-02-12 13:55:14 +00:00

64 lines
1.1 KiB
JavaScript

/**
* Dependencies
*/
const _ = require('lodash');
// enable event listeners
require('./base/listeners');
/**
* Expose all models
*/
exports = module.exports;
const models = [
'permission',
'post',
'role',
'settings',
'session',
'tag',
'tag-public',
'user',
'author',
'invite',
'webhook',
'integration',
'api-key',
'mobiledoc-revision',
'member',
'member-subscribe-event',
'member-paid-subscription-event',
'member-login-event',
'member-email-change-event',
'member-payment-event',
'member-status-event',
'posts-meta',
'member-stripe-customer',
'stripe-customer-subscription',
'email',
'email-batch',
'email-recipient',
'label',
'single-use-token',
'snippet',
// Action model MUST be loaded last as it loops through all of the registered models
// Please do not append items to this array.
'action'
];
function init() {
exports.Base = require('./base');
models.forEach(function (name) {
_.extend(exports, require('./' + name));
});
}
/**
* Expose `init`
*/
exports.init = init;