Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-12 12:39:17 +08:00
parent 82ea9c77c4
commit ea3e82e54c
47 changed files with 1301 additions and 481 deletions
@@ -48,6 +48,33 @@ const UserNotification = sequelize.define('UserNotification', {
defaultValue: false,
},
// Named color key (utils/tierColors.js on the frontend) for the sticky banner.
color: {
type: DataTypes.STRING(20),
allowNull: false,
defaultValue: 'indigo',
},
// Denormalized copy of the source NotificationBroadcast's visibility
// window (see notificationVisibility.util.js) — null means unbounded.
start_date: {
type: DataTypes.DATE,
allowNull: true,
},
end_date: {
type: DataTypes.DATE,
allowNull: true,
},
// Links back to the source broadcast so editing it after send can
// propagate content changes into already-created rows (see
// notificationBroadcasts.controller.js#updateBroadcast). Null for
// notification types with no broadcast source.
broadcast_id: {
type: DataTypes.BIGINT,
allowNull: true,
},
data: {
type: DataTypes.JSONB,
allowNull: true,