mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 22:59:57 +08:00
Case-sensitive filename changes
This commit is contained in:
18
js/lib/models/Notification.js
Normal file
18
js/lib/models/Notification.js
Normal file
@ -0,0 +1,18 @@
|
||||
import Model from 'flarum/Model';
|
||||
import mixin from 'flarum/utils/mixin';
|
||||
import computed from 'flarum/utils/computed';
|
||||
|
||||
export default class Notification extends mixin(Model, {
|
||||
contentType: Model.attribute('contentType'),
|
||||
subjectId: Model.attribute('subjectId'),
|
||||
content: Model.attribute('content'),
|
||||
time: Model.attribute('time', Model.date),
|
||||
|
||||
isRead: Model.attribute('isRead'),
|
||||
unreadCount: Model.attribute('unreadCount'),
|
||||
additionalUnreadCount: computed('unreadCount', unreadCount => Math.max(0, unreadCount - 1)),
|
||||
|
||||
user: Model.hasOne('user'),
|
||||
sender: Model.hasOne('sender'),
|
||||
subject: Model.hasOne('subject')
|
||||
}) {}
|
Reference in New Issue
Block a user