Add Reddit monitoring bot — backend, frontend, and Docker config
Python/FastAPI backend with PostgreSQL for collecting Reddit data via public .json endpoints. React/Vite dashboard for analytics. Docker Compose setup with API and worker services connecting to shared PostgreSQL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
24
backend/schemas/subreddit.py
Normal file
24
backend/schemas/subreddit.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class SubredditCreate(BaseModel):
|
||||
name: str
|
||||
|
||||
|
||||
class SubredditUpdate(BaseModel):
|
||||
is_active: bool | None = None
|
||||
|
||||
|
||||
class SubredditResponse(BaseModel):
|
||||
id: int
|
||||
name: str
|
||||
display_name: str | None
|
||||
description: str | None
|
||||
subscribers: int | None
|
||||
is_active: bool
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
post_count: int = 0
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
Reference in New Issue
Block a user