Files
site11/services/news-api/backend/app/models/comment.py
jungwoo choi deb52e51f2 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>
2025-10-10 18:52:12 +09:00

23 lines
414 B
Python

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