post.belongsto 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'})