Type notification's 'data' field as a string
This commit is contained in:
parent
165e00e0df
commit
b5af28c5b1
|
@ -1,5 +1,5 @@
|
|||
from datetime import UTC, datetime
|
||||
from typing import Any, Literal, cast, final
|
||||
from typing import Literal, cast, final
|
||||
|
||||
from beanie import Link, PydanticObjectId
|
||||
from fastapi import APIRouter, HTTPException, status
|
||||
|
@ -28,7 +28,7 @@ class NotificationData(BaseModel):
|
|||
user_id: PydanticObjectId
|
||||
event_type: Literal["message", "invitation"]
|
||||
message: str
|
||||
data: Any
|
||||
data: str
|
||||
read: bool
|
||||
created_at: datetime
|
||||
read_at: datetime | None
|
||||
|
|
Loading…
Reference in a new issue