Event layout page update.
This commit is contained in:
24
backend/app/schemas/event_comment.py
Normal file
24
backend/app/schemas/event_comment.py
Normal file
@ -0,0 +1,24 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from datetime import datetime
|
||||
from typing import List
|
||||
|
||||
|
||||
class EventCommentCreate(BaseModel):
|
||||
content: str = Field(..., min_length=1, max_length=500)
|
||||
|
||||
|
||||
class EventComment(BaseModel):
|
||||
id: int
|
||||
event_id: int
|
||||
user_id: int
|
||||
username: str
|
||||
content: str
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class EventCommentsResponse(BaseModel):
|
||||
comments: List[EventComment]
|
||||
total: int
|
||||
Reference in New Issue
Block a user