diff --git a/backend/models/falukant/log/notification.js b/backend/models/falukant/log/notification.js index 71f0c05..57bd59e 100644 --- a/backend/models/falukant/log/notification.js +++ b/backend/models/falukant/log/notification.js @@ -1,7 +1,12 @@ import { Model, DataTypes } from 'sequelize'; import { sequelize } from '../../../utils/sequelize.js'; -class Notification extends Model { } +class Notification extends Model { + // Getter für characterName - wird nicht synchronisiert, da es kein Datenbankfeld ist + get characterName() { + return this.getDataValue('character_name') || null; + } +} Notification.init({ userId: { @@ -15,12 +20,6 @@ Notification.init({ allowNull: true, field: 'character_name' }, - characterName: { - type: DataTypes.VIRTUAL, - get() { - return this.getDataValue('character_name') || null; - } - }, shown: { type: DataTypes.BOOLEAN, allowNull: false,