Explorar el Código

Add category association

sbkwgh hace 8 años
padre
commit
e7db657f29
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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)
 			}
 		}