sequelize课程下
config.sequelize = {
dialect: 'mysql',
host: '127.0.0.1',
port: '3306',
user: 'root',
password: 'root@512',
database: 'mtr',
define: {
timestamps: false,
freezeTableName: true
}
};
exports.sequelize = {
enable: true,
package: 'egg-sequelize '
};
console.log(ctx.model);
打印后发现是null,是有什么问题吗?