odin-codespace/memory-game/mg-backend/schemas.py

21 lines
290 B
Python

from pydantic import BaseModel
class CardBase(BaseModel):
photo_id: int
medium_url: str
photo_url: str
topic: str
alt: str
bad_match: bool
class CardCreate(CardBase):
pass
class Card(CardBase):
id: int
class Config:
from_attributes = True