🎉 Initialize FastAPI boilerplate
This commit is contained in:
parent
06ffc42ec6
commit
248d73806f
21 changed files with 638 additions and 0 deletions
0
app/schemas/__init__.py
Normal file
0
app/schemas/__init__.py
Normal file
21
app/schemas/schemas.py
Normal file
21
app/schemas/schemas.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class ItemBase(BaseModel):
|
||||
title: str
|
||||
description: str | None = None
|
||||
|
||||
|
||||
class Item(ItemBase):
|
||||
id: int
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
|
||||
class ItemCreate(ItemBase):
|
||||
pass
|
||||
|
||||
|
||||
class ItemUpdate(ItemBase):
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue