feat: Add comment system and outlets data to News API

- Add comment models and service with CRUD operations
- Add comment endpoints (GET, POST, count)
- Add outlets-extracted.json with people/topics/companies data
- Fix database connection in comment_service to use centralized get_database()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
jungwoo choi
2025-10-10 18:52:12 +09:00
parent 3ce504e0b1
commit deb52e51f2
4 changed files with 3851 additions and 0 deletions

View File

@ -0,0 +1,22 @@
from pydantic import BaseModel, Field
from typing import Optional
from datetime import datetime
class CommentBase(BaseModel):
articleId: str
nickname: str
content: str
class CommentCreate(CommentBase):
pass
class Comment(CommentBase):
id: str
createdAt: datetime
class Config:
from_attributes = True
class CommentList(BaseModel):
comments: list[Comment]
total: int