feat: Enhance notification model and UI components

- Added an `updated_at` timestamp field to the Notification model for better tracking of notification updates.
- Updated the NotificationButton component to change the unread notification badge color for improved visibility.
- Adjusted the NotificationPopup component's layout and text handling for better responsiveness and readability.
This commit is contained in:
Anish Sarkar 2026-01-14 04:35:59 +05:30
parent 9d0f5b4249
commit 460dc0dec8
3 changed files with 17 additions and 10 deletions

View file

@ -728,6 +728,13 @@ class Notification(BaseModel, TimestampMixin):
Boolean, nullable=False, default=False, server_default=text("false"), index=True
)
notification_metadata = Column("metadata", JSONB, nullable=True, default={})
updated_at = Column(
TIMESTAMP(timezone=True),
nullable=True,
default=lambda: datetime.now(UTC),
onupdate=lambda: datetime.now(UTC),
index=True,
)
user = relationship("User", back_populates="notifications")
search_space = relationship("SearchSpace", back_populates="notifications")