From 4ee3d169022770cd9440ee06585f446563eda4ac Mon Sep 17 00:00:00 2001 From: Backend IM Bot Date: Fri, 28 Mar 2025 00:08:52 +0000 Subject: [PATCH] Add None schema --- schemas/none.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 schemas/none.py diff --git a/schemas/none.py b/schemas/none.py new file mode 100644 index 0000000..dc74921 --- /dev/null +++ b/schemas/none.py @@ -0,0 +1,18 @@ +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 \ No newline at end of file