fastapi-boilerplate/app/schemas/item.py
Finn Christiansen d8607212da
Some checks failed
Python formatting PEP8 / Python-PEP8 (push) Failing after 18s
added structured api endpoints and done some refactoring
2023-08-12 00:20:51 +02:00

21 lines
274 B
Python

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