19 lines
391 B
Python
19 lines
391 B
Python
"""# Summary
|
|
|
|
Item domain model — the neutral resource used throughout the template.
|
|
"""
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class Item(BaseModel):
|
|
"""A single countable resource.
|
|
|
|
Attributes:
|
|
name (str): Item name.
|
|
quantity (int): Item quantity. Defaults to 1.
|
|
"""
|
|
|
|
name: str
|
|
quantity: int = Field(default=1)
|
|
|
|
model_config = {"extra": "ignore"} |