initial
This commit is contained in:
21
backend/app/schemas/activity.py
Normal file
21
backend/app/schemas/activity.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel
|
||||
|
||||
from app.schemas.user import UserPublic
|
||||
|
||||
|
||||
class ActivityResponse(BaseModel):
|
||||
id: int
|
||||
type: str
|
||||
user: UserPublic
|
||||
data: dict | None = None
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class FeedResponse(BaseModel):
|
||||
items: list[ActivityResponse]
|
||||
total: int
|
||||
has_more: bool
|
||||
Reference in New Issue
Block a user