Sfoglia il codice sorgente

Add category association

sbkwgh 8 anni fa
parent
commit
e7db657f29
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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)
 			}
 		}