added and fix some of things
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
***********************************************************************************************************************************************************************/
|
||||
const { DataTypes } = require('sequelize');
|
||||
const sequelize = require('../../config/db.config');
|
||||
const mdl_Assets = require('../assets/assets.mdl');
|
||||
|
||||
const UserNotification = sequelize.define('UserNotification', {
|
||||
notification_id: {
|
||||
@@ -55,6 +56,14 @@ const UserNotification = sequelize.define('UserNotification', {
|
||||
defaultValue: 'indigo',
|
||||
},
|
||||
|
||||
// Denormalized copy of the source NotificationBroadcast's per-alert
|
||||
// layout image (see notification_broadcast.mdl.js) — null when the
|
||||
// alert has none.
|
||||
image_asset_id: {
|
||||
type: DataTypes.BIGINT,
|
||||
allowNull: true,
|
||||
},
|
||||
|
||||
// Denormalized copy of the source NotificationBroadcast's visibility
|
||||
// window (see notificationVisibility.util.js) — null means unbounded.
|
||||
start_date: {
|
||||
@@ -101,4 +110,6 @@ const UserNotification = sequelize.define('UserNotification', {
|
||||
],
|
||||
});
|
||||
|
||||
UserNotification.belongsTo(mdl_Assets, { as: "image", foreignKey: "image_asset_id" });
|
||||
|
||||
module.exports = UserNotification;
|
||||
|
||||
Reference in New Issue
Block a user