initial commit - LeDiscord plateforme des copains
This commit is contained in:
17
backend/schemas/notification.py
Normal file
17
backend/schemas/notification.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
from models.notification import NotificationType
|
||||
|
||||
class NotificationResponse(BaseModel):
|
||||
id: int
|
||||
type: NotificationType
|
||||
title: str
|
||||
message: str
|
||||
link: Optional[str]
|
||||
is_read: bool
|
||||
created_at: datetime
|
||||
read_at: Optional[datetime]
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
Reference in New Issue
Block a user