2025-03-20 14:01:03 +01:00

17 lines
335 B
Python

from typing import Optional
from pydantic import BaseModel
class CommentsBase(BaseModel):
comment_text: str
post_id: int
class CommentsCreate(CommentsBase):
pass
class Comments(CommentsBase):
id: int
created_at: Optional[str] = None
updated_at: Optional[str] = None
class Config:
orm_mode = True