Sequelize one to many assocation in multiple files
I'm not sure what exactly is the problem with your code, would need to run it to be sure.
But as you were looking for an example, take a look at this example from Sequelize Github.
It declares models in different files and associate them in the index.js
.
Later you can reference your other model with a simple model
atribute model.Country
:
City.belongsTo(model.Country, {foreignKey : 'countryId', as: 'Country'});
For instance, user.js.