24 lines
403 B
Python
24 lines
403 B
Python
from pydantic import BaseModel
|
|
|
|
from app.schemas.common import NaiveDatetime
|
|
|
|
|
|
class NotificationOut(BaseModel):
|
|
id: str
|
|
title: str
|
|
content: str
|
|
type: str
|
|
is_read: bool
|
|
created_at: NaiveDatetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class NotificationListOut(BaseModel):
|
|
items: list[NotificationOut]
|
|
total: int
|
|
|
|
|
|
class UnreadCountOut(BaseModel):
|
|
count: int
|