This commit is contained in:
David Arranz 2019-11-02 23:16:58 +01:00
parent d055432487
commit 5a908464f5
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ const sequelize = new Sequelize(
dialect: 'mysql',
operatorAliases: false,
logging: config.debug,
define: {
charset: 'utf8',
collate: 'utf8_general_ci',
},
pool: {
max: 140,
min: 0,

View File

@ -37,7 +37,7 @@ module.exports = function (sequelize, DataTypes) {
});
Notification.associate = function (models) {
//Notification.User = Notification.belongsTo(models.User, { foreignKey: 'userId', as: "user" });
Notification.User = Notification.belongsTo(models.User, { foreignKey: 'userId', as: "user" });
Notification.Details = Notification.hasMany(models.NotificationDetail, { foreignKey: 'notificationId', as: 'details' });
};