Remove __pycache__ from repo
This commit is contained in:
30
backend/app/schemas/posts.py
Normal file
30
backend/app/schemas/posts.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class PostCreate(BaseModel):
|
||||
title: str = Field(min_length=3, max_length=150)
|
||||
content: str = Field(min_length=10)
|
||||
images: Optional[str] = Field()
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class PostRead(BaseModel):
|
||||
id: int = Field()
|
||||
title: str = Field(min_length=3, max_length=150)
|
||||
content: str = Field(min_length=10)
|
||||
images: str = Field()
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
|
||||
class PostUpdate(BaseModel):
|
||||
title: str = Field(min_length=3, max_length=150)
|
||||
content: str = Field(min_length=10)
|
||||
images: Optional[str] = Field()
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
Reference in New Issue
Block a user