18 lines
402 B
Python
Executable File
18 lines
402 B
Python
Executable File
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
|