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
@@ -15,6 +15,20 @@ const NotificationBroadcast = sequelize.define("NotificationBroadcast", {
// When set, the client's "view full content" dialog shows an "Open Link"
// action pointing here. When null, that dialog is plain text info only.
link_url: { type: DataTypes.STRING(2048), allowNull: true, label: "Link URL", order: 2.2 },
// Custom CTA button text shown right after the title in the sticky banner
// (e.g. "Shop now"). Falls back to "Open Link" when unset.
link_label: { type: DataTypes.STRING(60), allowNull: true, label: "Button Label", order: 2.3 },
// Named color key (see utils/tierColors.js on the frontend) driving the
// sticky banner's panel background/border — same registry rewards/tiers use.
color: { type: DataTypes.STRING(20), allowNull: false, defaultValue: 'indigo', label: "Color", order: 2.4 },
// Optional visibility window. Null start_date = show immediately once sent;
// null end_date = show indefinitely. Copied onto AdminNotification/
// UserNotification rows at send time so client reads can filter without
// joining back to this table (see sendBroadcast + notificationVisibility.util.js).
start_date: { type: DataTypes.DATE, allowNull: true, label: "Start Date", order: 2.7 },
end_date: { type: DataTypes.DATE, allowNull: true, label: "End Date", order: 2.8 },
// ─── Visibility ──────────────────────────────────────────────────────────
// Determines where a delivered announcement shows up for recipients.