giga_tcg/schemas/box.py

25 lines
1001 B
Python

from pydantic import BaseModel, Field
from schemas.base import BaseSchema
class CreateBoxResponse(BaseModel):
success: bool = Field(..., title="Success")
class CreateOpenBoxResponse(CreateBoxResponse):
open_box_id: str
class CreateSealedBoxResponse(CreateBoxResponse):
product_id: str
quantity: int
class CreateBoxRequestData(BaseModel):
type: str = Field(..., title="Box Type (collector, play, draft)")
name: str = Field(..., title="Name")
product_line: str = Field(..., title="Product Line (MTG, Pokemon, etc)")
set_name: str = Field(..., title="Set Name")
set_code: str = Field(..., title="Set Code")
sealed: bool = Field(..., title="Sealed: Boolean")
sku: str = Field(..., title="SKU")
num_cards_expected: int = Field(..., title="Number of cards expected")
num_cards_actual: int = Field(None, title="Number of cards actual")
date_purchased: str = Field(..., title="Date purchased")
date_opened: str = Field(None, title="Date opened")