initiate, sequelize
//user.js
static associate(db) {
db.User.hasMany(db.Comment, { foreignKey: "commenter", sourceKey: "id" });
//comment.js
static associate(db) {
db.Comment.belongsTo(db.User, { foreignKey: "commenter", targetKey: "id" });
1:1
hasOne/belongsToMany
N:M
belongsToMany/belongsToMany