Category.hasMany called with something that's not a subclass of Sequelize.Model code example
Example 1: belongsTo called with something that's not a subclass of Sequelize.Model.
Foto.belongsTo(User, {foreignKey: 'userId'});
Example 2: belongsTo called with something that's not a subclass of Sequelize.Model.
User.hasMany(Foto,{as: 'fotos', foreignKey: 'userId'})