Add FastAPI backend with agent system
This commit is contained in:
37
backend/app/schemas/forum.py
Normal file
37
backend/app/schemas/forum.py
Normal file
@@ -0,0 +1,37 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ForumPostCreate(BaseModel):
|
||||
title: str
|
||||
content: str
|
||||
category: str | None = "discussion"
|
||||
|
||||
|
||||
class ForumPostOut(BaseModel):
|
||||
id: str
|
||||
user_id: str
|
||||
title: str
|
||||
content: str
|
||||
category: str | None
|
||||
is_executed: bool
|
||||
execution_result: str | None
|
||||
reply_count: int
|
||||
created_at: str
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class ForumReplyCreate(BaseModel):
|
||||
content: str
|
||||
|
||||
|
||||
class ForumReplyOut(BaseModel):
|
||||
id: str
|
||||
post_id: str
|
||||
user_id: str | None
|
||||
agent_id: str | None
|
||||
content: str
|
||||
is_ai_reply: bool
|
||||
created_at: str
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
Reference in New Issue
Block a user