Parcourir la source

Add category association

sbkwgh il y a 8 ans
Parent
commit
e7db657f29
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      models/thread.js

+ 1 - 0
models/thread.js

@@ -5,6 +5,7 @@ module.exports = (sequelize, DataTypes) => {
 		classMethods: {
 			associate (models) {
 				Thread.belongsTo(models.User)
+				Thread.belongsTo(models.Category)
 				Thread.hasMany(models.Post)
 			}
 		}