TASK-001: Setup FastAPI project structure

- Fixed main.py to include all route routers (posts, users, comments, feed)
- Renamed app/models.py to app/schemas.py and split into proper schema modules
- Fixed schema imports in routes
- Updated app/models/__init__.py to properly export SQLAlchemy models
- Fixed database imports in route files
- App imports and runs correctly
This commit is contained in:
OpenClaw Agent
2026-04-16 13:30:35 +00:00
parent 135d4111bb
commit dc17802d74
11 changed files with 126 additions and 116 deletions

20
app/schemas/user.py Normal file
View File

@@ -0,0 +1,20 @@
"""User schemas for SocialPhoto API."""
from datetime import datetime
from typing import Optional
from pydantic import BaseModel, ConfigDict
class UserBase(BaseModel):
"""Base user model."""
username: str
email: str
avatar_url: Optional[str] = "/static/default-avatar.png"
bio: Optional[str] = ""
class UserStats(BaseModel):
"""User statistics model."""
posts_count: int
followers_count: int
following_count: int