Open slifty opened 5 years ago
Agreed. We've refactored our PubPub to be structured like this. If you'd like an example of how to deal with Sequelize and associations when split across files - feel free to take a look at the PubPub /models folder.
Also happy to submit a PR for this if it's not a rush.
@isTravis that would be awesome; I'll assign it to you (and if we get to it before you start then I'll coordinate)
We right now have a
models.js
which is fine as a starting point. It is good practice to have amodels/
directory where each model has its own file. This is mostly intended to avoid the situation where we have a long monolithic file.