Notification.js 400 B

123456789101112131415161718
  1. module.exports = (sequelize, DataTypes) => {
  2. let Notification = sequelize.define('Notification', {
  3. interacted: {
  4. type: DataTypes.BOOLEAN,
  5. defaultValue: false
  6. },
  7. type: DataTypes.ENUM('mention', 'thread update')
  8. }, {
  9. classMethods: {
  10. associate (models) {
  11. Notification.hasOne(models.MentionNotification)
  12. Notification.belongsTo(models.User)
  13. }
  14. }
  15. })
  16. return Notification
  17. }