2018-06-20 11:50:31 +08:00
|
|
|
import Model from '../Model';
|
2015-04-25 20:58:39 +08:00
|
|
|
|
2015-10-13 14:27:18 +08:00
|
|
|
export default class Notification extends Model {}
|
|
|
|
|
|
|
|
Object.assign(Notification.prototype, {
|
2015-07-15 12:30:11 +08:00
|
|
|
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
|
|
|
|
2015-07-15 12:30:11 +08:00
|
|
|
isRead: Model.attribute('isRead'),
|
2015-04-25 20:58:39 +08:00
|
|
|
|
2015-07-15 12:30:11 +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'),
|
2015-10-13 14:27:18 +08:00
|
|
|
});
|