Kaynağa Gözat

Remove title field, change 'read' to 'interacted'

sbkwgh 8 yıl önce
ebeveyn
işleme
d4a22777fc
1 değiştirilmiş dosya ile 5 ekleme ve 3 silme
  1. 5 3
      models/Notification.js

+ 5 - 3
models/Notification.js

@@ -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)
 			}
 		}