mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
units,lesson as standalone
This commit is contained in:
@@ -29,6 +29,19 @@ const AdminNotification = sequelize.define('AdminNotification', {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: false,
|
||||
},
|
||||
|
||||
// Controls where this notification is rendered in the admin UI.
|
||||
show_in_notifications: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true,
|
||||
},
|
||||
show_in_sticky: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
},
|
||||
|
||||
data: {
|
||||
type: DataTypes.JSONB,
|
||||
allowNull: true,
|
||||
|
||||
@@ -13,6 +13,13 @@ const NotificationBroadcast = sequelize.define("NotificationBroadcast", {
|
||||
title: { type: DataTypes.STRING(255), allowNull: false, label: "Title", order: 1 },
|
||||
message: { type: DataTypes.TEXT, allowNull: false, label: "Message", order: 2 },
|
||||
|
||||
// ─── Visibility ──────────────────────────────────────────────────────────
|
||||
// Determines where a delivered announcement shows up for recipients.
|
||||
// - show_in_sticky: client sticky banner (fixed top)
|
||||
// - show_in_notifications: client + admin notifications lists/bells
|
||||
show_in_sticky: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, label: "Show in Sticky Announcements", order: 2.5 },
|
||||
show_in_notifications: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: true, label: "Show in Notifications", order: 2.6 },
|
||||
|
||||
// ─── Targeting ────────────────────────────────────────────────────────────
|
||||
target_type: {
|
||||
type: DataTypes.ENUM("admin", "user", "both", "task_list", "course", "tier_plan"),
|
||||
|
||||
@@ -33,6 +33,21 @@ const UserNotification = sequelize.define('UserNotification', {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: false,
|
||||
},
|
||||
|
||||
// Controls where this notification is rendered.
|
||||
// - show_in_notifications: appears in the /notifications list + bell badge.
|
||||
// - show_in_sticky: appears in the fixed "sticky announcement" banner.
|
||||
show_in_notifications: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true,
|
||||
},
|
||||
show_in_sticky: {
|
||||
type: DataTypes.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
},
|
||||
|
||||
data: {
|
||||
type: DataTypes.JSONB,
|
||||
allowNull: true,
|
||||
|
||||
Reference in New Issue
Block a user