mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 11:22:19 +03:00
Added MemberStatusEvent model
refs https://github.com/TryGhost/Ghost/issues/12602
This commit is contained in:
parent
3e228072ba
commit
1af6be63f0
@ -29,6 +29,7 @@ const models = [
|
||||
'mobiledoc-revision',
|
||||
'member',
|
||||
'member-subscribe-event',
|
||||
'member-status-event',
|
||||
'posts-meta',
|
||||
'member-stripe-customer',
|
||||
'stripe-customer-subscription',
|
||||
|
23
core/server/models/member-status-event.js
Normal file
23
core/server/models/member-status-event.js
Normal file
@ -0,0 +1,23 @@
|
||||
const errors = require('@tryghost/errors');
|
||||
const ghostBookshelf = require('./base');
|
||||
|
||||
const MemberStatusEvent = ghostBookshelf.Model.extend({
|
||||
tableName: 'members_status_events'
|
||||
}, {
|
||||
async edit() {
|
||||
throw new errors.IncorrectUsageError('Cannot edit MemberStatusEvent');
|
||||
},
|
||||
|
||||
async destroy() {
|
||||
throw new errors.IncorrectUsageError('Cannot destroy MemberStatusEvent');
|
||||
}
|
||||
});
|
||||
|
||||
const MemberStatusEvents = ghostBookshelf.Collection.extend({
|
||||
model: MemberStatusEvent
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
MemberStatusEvent: ghostBookshelf.model('MemberStatusEvent', MemberStatusEvent),
|
||||
MemberStatusEvents: ghostBookshelf.collection('MemberStatusEvents', MemberStatusEvents)
|
||||
};
|
@ -169,7 +169,8 @@ function createApiInstance(config) {
|
||||
StripeCustomer: models.MemberStripeCustomer,
|
||||
StripeCustomerSubscription: models.StripeCustomerSubscription,
|
||||
Member: models.Member,
|
||||
MemberSubscribeEvent: models.MemberSubscribeEvent
|
||||
MemberSubscribeEvent: models.MemberSubscribeEvent,
|
||||
MemberStatusEvent: models.MemberStatusEvent
|
||||
},
|
||||
logger: logging
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user