Clean up, don't use mixin

PhpStorm/WebStorm doesn't like the mixin syntax, and it's clearer to just use Object.assign.
This commit is contained in:
Toby Zerner
2015-10-13 16:57:18 +10:30
parent 33dd5fff36
commit e3569d39cc
9 changed files with 44 additions and 27 deletions

View File

@ -2,7 +2,9 @@ import Model from 'flarum/Model';
import mixin from 'flarum/utils/mixin';
import computed from 'flarum/utils/computed';
export default class Notification extends mixin(Model, {
export default class Notification extends Model {}
Object.assign(Notification.prototype, {
contentType: Model.attribute('contentType'),
subjectId: Model.attribute('subjectId'),
content: Model.attribute('content'),
@ -15,4 +17,6 @@ export default class Notification extends mixin(Model, {
user: Model.hasOne('user'),
sender: Model.hasOne('sender'),
subject: Model.hasOne('subject')
}) {}
});
export default Notification;