"""Mirrors upstream src/2014/schemas/5e-SRD-Backgrounds.ts."""

from dnd5e_db.models.base import SRDModel
from dnd5e_db.models.common import APIReference, Choice


class Cost(SRDModel):
    quantity: int
    unit: str


class BackgroundFeature(SRDModel):
    name: str
    desc: list[str]


class StartingEquipment(SRDModel):
    equipment: APIReference
    quantity: int


class Background(SRDModel):
    index: str
    name: str
    starting_proficiencies: list[APIReference]
    language_options: Choice | None = None
    starting_equipment: list[StartingEquipment] | None = None
    starting_equipment_options: list[Choice] | None = None
    starting_gold: Cost | None = None
    feature: BackgroundFeature | None = None
    personality_traits: Choice | None = None
    ideals: Choice | None = None
    bonds: Choice | None = None
    flaws: Choice | None = None
    url: str
