javascript - When referencing the table model defined in model, model is undefined.
phpcn_u1582
phpcn_u1582 2017-07-04 13:45:15
0
1
997

I use the node express framework and the sequelize model.
There is no problem with the API being referenced in the controller layer, but when the model layer is defined, the printed model is empty

var Models = require('../config/sequelize')

As shown in the figure, the model layer is all table models. I want to add a hook in it. When no data is added to the station table, another table automatically adds a piece of data, similar to the trigger of mysql. However, when running the code, the model It’s always empty,
I’ve been struggling for several days, please help me, thank you

phpcn_u1582
phpcn_u1582

reply all(1)
巴扎黑

Sequelize Is module.exports exposed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template