mirror of
https://github.com/flarum/framework.git
synced 2025-05-24 07:39:56 +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:
@ -3,7 +3,9 @@ import mixin from 'flarum/utils/mixin';
|
||||
import computed from 'flarum/utils/computed';
|
||||
import { getPlainContent } from 'flarum/utils/string';
|
||||
|
||||
export default class Post extends mixin(Model, {
|
||||
export default class Post extends Model {}
|
||||
|
||||
Object.assign(Post.prototype, {
|
||||
number: Model.attribute('number'),
|
||||
discussion: Model.hasOne('discussion'),
|
||||
|
||||
@ -24,4 +26,6 @@ export default class Post extends mixin(Model, {
|
||||
|
||||
canEdit: Model.attribute('canEdit'),
|
||||
canDelete: Model.attribute('canDelete')
|
||||
}) {}
|
||||
});
|
||||
|
||||
export default Post;
|
||||
|
Reference in New Issue
Block a user