Files
JARVIS/backend/app/schemas/forum.py

38 lines
671 B
Python

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}