|
@@ -1,12 +1,14 @@
|
|
|
module.exports = (sequelize, DataTypes) => {
|
|
|
let Notification = sequelize.define('Notification', {
|
|
|
- title: DataTypes.TEXT,
|
|
|
- read: DataTypes.BOOLEAN,
|
|
|
+ interacted: {
|
|
|
+ type: DataTypes.BOOLEAN,
|
|
|
+ defaultValue: false
|
|
|
+ },
|
|
|
type: DataTypes.ENUM('mention', 'thread update')
|
|
|
}, {
|
|
|
classMethods: {
|
|
|
associate (models) {
|
|
|
- Notification.hasOne(models.MentionNotification, { as: 'Data' })
|
|
|
+ Notification.hasOne(models.MentionNotification)
|
|
|
Notification.belongsTo(models.User)
|
|
|
}
|
|
|
}
|