added 260907 version of worker toolkit
This commit is contained in:
25
worker-toolkit-flaredown/repo/frontend/app/models/comment.js
Normal file
25
worker-toolkit-flaredown/repo/frontend/app/models/comment.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import attr from 'ember-data/attr';
|
||||
import Ember from 'ember';
|
||||
import Typeable from 'flaredown/mixins/typeable';
|
||||
import Reactable from 'flaredown/models/reactable';
|
||||
import BodyFormatable from 'flaredown/mixins/body-formatable';
|
||||
|
||||
import { belongsTo } from 'ember-data/relationships';
|
||||
|
||||
const {
|
||||
computed: {
|
||||
or,
|
||||
},
|
||||
} = Ember;
|
||||
|
||||
export default Reactable.extend(Typeable, BodyFormatable, {
|
||||
body: attr('string'),
|
||||
userName: attr('string'),
|
||||
createdAt: attr('date'),
|
||||
postableId: attr('string'),
|
||||
notifications: attr(),
|
||||
|
||||
post: belongsTo('post'),
|
||||
|
||||
hasNotifications: or('notifications.comment', 'notifications.reaction', 'notifications.mention'),
|
||||
});
|
||||
Reference in New Issue
Block a user