update dasboard ,noti

This commit is contained in:
2026-11-04 09:54:17 +07:00
parent ea6768f90d
commit 63866b14a1
10 changed files with 1169 additions and 136 deletions

View File

@@ -923,6 +923,19 @@ BEGIN
END
-- ===========================================
-- Popup dismissal is independent of the per-user read receipt.
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'NotificationPopupDismissals')
BEGIN
CREATE TABLE NotificationPopupDismissals (
NotificationId BIGINT NOT NULL,
UserId INT NOT NULL,
DismissedAt DATETIME NOT NULL DEFAULT(DATEADD(HOUR, 7, SYSUTCDATETIME())),
PRIMARY KEY (NotificationId, UserId),
FOREIGN KEY (NotificationId) REFERENCES Notifications(NotificationId) ON DELETE CASCADE,
FOREIGN KEY (UserId) REFERENCES Users(UserId) ON DELETE CASCADE
);
END
-- 12. CREATE AUDIT LOG TABLE
-- ===========================================
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'AuditLog')