mirror of
https://github.com/flarum/framework.git
synced 2025-05-23 07:09:57 +08:00
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:
@ -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;
|
Reference in New Issue
Block a user