18 lines
337 B
Python
18 lines
337 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class CommentCreate(BaseModel):
|
|
content: str = Field(min_length=1)
|
|
|
|
|
|
class CommentRead(BaseModel):
|
|
id: uuid.UUID
|
|
content: str
|
|
created_by: uuid.UUID
|
|
created_at: datetime
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|