mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-18 20:01:52 +03:00
e1ad3dfb2a
This pull request adds the implementation of the notifications feature, including the ability to create, update, and delete notifications.
25 lines
526 B
Python
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
|