2021-02-12 16:15:27 +03:00
|
|
|
const errors = require('@tryghost/errors');
|
|
|
|
const ghostBookshelf = require('./base');
|
|
|
|
|
|
|
|
const MemberEmailChangeEvent = ghostBookshelf.Model.extend({
|
2021-02-16 19:14:20 +03:00
|
|
|
tableName: 'members_email_change_events',
|
|
|
|
|
|
|
|
member() {
|
|
|
|
return this.belongsTo('Member', 'member_id', 'id');
|
|
|
|
}
|
2021-02-12 16:15:27 +03:00
|
|
|
}, {
|
|
|
|
async edit() {
|
|
|
|
throw new errors.IncorrectUsageError('Cannot edit MemberEmailChangeEvent');
|
|
|
|
},
|
|
|
|
|
|
|
|
async destroy() {
|
|
|
|
throw new errors.IncorrectUsageError('Cannot destroy MemberEmailChangeEvent');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
const MemberEmailChangeEvents = ghostBookshelf.Collection.extend({
|
|
|
|
model: MemberEmailChangeEvent
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
MemberEmailChangeEvent: ghostBookshelf.model('MemberEmailChangeEvent', MemberEmailChangeEvent),
|
|
|
|
MemberEmailChangeEvents: ghostBookshelf.collection('MemberEmailChangeEvents', MemberEmailChangeEvents)
|
|
|
|
};
|