From 8000087896892a7bf964408cfe2cf41c9ce7f489 Mon Sep 17 00:00:00 2001 From: Peter Vacho Date: Sun, 29 Dec 2024 15:00:50 +0100 Subject: [PATCH] Make notification data column a string --- src/db/models/notification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/db/models/notification.py b/src/db/models/notification.py index 44db1e7..d6d04bf 100644 --- a/src/db/models/notification.py +++ b/src/db/models/notification.py @@ -1,5 +1,5 @@ from datetime import UTC, datetime -from typing import Annotated, Any, ClassVar, Literal, final +from typing import Annotated, ClassVar, Literal, final from beanie import Document, Indexed from pydantic import Field @@ -15,7 +15,7 @@ class Notification(Document): user: Annotated[BeanieLink[User], Indexed()] event_type: Annotated[Literal["reminder", "invitation"], Indexed()] message: str - data: Any + data: str read: bool created_at: datetime = Field(default_factory=lambda: datetime.now(UTC)) read_at: datetime | None = None