sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

Have Associations in initModel

Open vivekkairi opened this issue 2 years ago • 1 comments

Currently init-models.ts has all the associations of all the models, that makes it ugly and difficult to read. Shifting assocations to models file simplies things and makes it more readable

static initModel(sequelize: Sequelize.Sequelize): typeof user { let model = user.init({ }) model.hasOne(otherModel) return model }

vivekkairi avatar Mar 04 '22 17:03 vivekkairi

I hope so, too Let's implement it quickly.

Lonely-lie avatar Nov 12 '23 14:11 Lonely-lie