NodeJS Sequelize js
There are two ways to define models in sequelize; with sequelize.define(...), or sequelize.import(...). Both functions return a sequelize model object.
1. sequelize.define(modelName, attributes, [options])
This is the way to go if you'd like to define all your models in one file, or if you want to have extra control of your model definition.
If your model definitions are broken into a file for each, then import is your friend. In the file where you initialize Sequelize, you need to call import like so: