From 5a908464f50dc2990d62e39549c1c2d422777063 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 2 Nov 2019 23:16:58 +0100 Subject: [PATCH] . --- core/models.js | 4 ++++ modules/notification/notification.model.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/models.js b/core/models.js index 0bd8f83..cd45088 100644 --- a/core/models.js +++ b/core/models.js @@ -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, diff --git a/modules/notification/notification.model.js b/modules/notification/notification.model.js index eb8e66c..469ec2f 100644 --- a/modules/notification/notification.model.js +++ b/modules/notification/notification.model.js @@ -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' }); };