Ghost/core/server/models/index.js
Kevin Ansfield 57effd9585
Added custom_theme_settings table/model (#13327)
refs https://github.com/TryGhost/Team/issues/1070

- stores values of custom theme settings
  - will be merged with full settings data parsed from themes for API output
  - will be cached and made available for lookup in themes to avoid db roundtrips
- stores type of custom theme settings so we can coerce values and know if the type has changed when syncing
- records will be synced with themes upon activation
2021-09-23 11:51:18 +01:00

71 lines
1.3 KiB
JavaScript

/**
* Dependencies
*/
const _ = require('lodash');
// enable event listeners
require('./base/listeners');
/**
* Expose all models
*/
exports = module.exports;
const models = [
'permission',
'post',
'role',
'settings',
'custom-theme-setting',
'session',
'tag',
'tag-public',
'user',
'author',
'invite',
'webhook',
'integration',
'api-key',
'mobiledoc-revision',
'member',
'product',
'benefit',
'stripe-product',
'stripe-price',
'member-subscribe-event',
'member-paid-subscription-event',
'member-login-event',
'member-email-change-event',
'member-payment-event',
'member-status-event',
'member-product-event',
'member-analytic-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;