framework/js/old/common/models/Notification.js

16 lines
420 B
JavaScript
Raw Normal View History

import Model from '../Model';
2015-04-25 20:58:39 +08:00
export default class Notification extends Model {}
Object.assign(Notification.prototype, {
contentType: Model.attribute('contentType'),
content: Model.attribute('content'),
2018-08-24 20:17:57 +08:00
createdAt: Model.attribute('createdAt', Model.transformDate),
2015-04-25 20:58:39 +08:00
isRead: Model.attribute('isRead'),
2015-04-25 20:58:39 +08:00
user: Model.hasOne('user'),
2018-08-24 20:16:28 +08:00
fromUser: Model.hasOne('fromUser'),
2020-04-17 17:57:55 +08:00
subject: Model.hasOne('subject'),
});