quivr/backend/modules/notification/entity/notification.py
Stan Girard e1ad3dfb2a
feat(notifications): implemented notifications with RLS and realtime (#2525)
This pull request adds the implementation of the notifications feature,
including the ability to create, update, and delete notifications.
2024-05-01 11:11:12 -07:00

25 lines
526 B
Python

from datetime import datetime
from enum import Enum
from typing import Optional
from uuid import UUID
from pydantic import BaseModel
class NotificationsStatusEnum(str, Enum):
INFO = "info"
SUCCESS = "success"
WARNING = "warning"
ERROR = "error"
class Notification(BaseModel):
id: UUID
user_id: UUID
status: NotificationsStatusEnum
title: str
description: Optional[str]
archived: Optional[bool] = False
read: Optional[bool] = False
datetime: Optional[datetime] # timestamp