mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
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 AdminNotification = sequelize.define('AdminNotification', {
|
||||
notification_id: {
|
||||
@@ -49,6 +50,14 @@ const AdminNotification = sequelize.define('AdminNotification', {
|
||||
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: {
|
||||
@@ -94,4 +103,6 @@ const AdminNotification = sequelize.define('AdminNotification', {
|
||||
],
|
||||
});
|
||||
|
||||
AdminNotification.belongsTo(mdl_Assets, { as: "image", foreignKey: "image_asset_id" });
|
||||
|
||||
module.exports = AdminNotification;
|
||||
|
||||
Reference in New Issue
Block a user