30 lines
557 B
Python
30 lines
557 B
Python
from pydantic import BaseModel
|
|
|
|
|
|
class CollectionCardOut(BaseModel):
|
|
id: int
|
|
card_name: str
|
|
set_code: str
|
|
collector_number: str
|
|
quantity: int
|
|
foil_quantity: int
|
|
scryfall_id: str
|
|
scryfall_data: dict | None
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class CollectionStatsOut(BaseModel):
|
|
total_cards: int
|
|
unique_cards: int
|
|
foil_cards: int
|
|
estimated_value: float | None
|
|
|
|
|
|
class PaginatedCollection(BaseModel):
|
|
items: list[CollectionCardOut]
|
|
total: int
|
|
page: int
|
|
page_size: int
|
|
pages: int
|