2025-03-28 00:08:52 +00:00

18 lines
371 B
Python

from pydantic import BaseModel, Field
class MessageBase(BaseModel):
message: str = Field(default="yoloo!!", min_length=1)
class Config:
schema_extra = {
"example": {
"message": "yoloo!!"
}
}
class MessageCreate(MessageBase):
pass
class Message(MessageBase):
class Config:
orm_mode = True