"""Mirrors upstream src/2024/schemas/5e-SRD-Traits.ts."""

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


class SpellTrait(SRDModel):
    spell: APIReference
    uses: str | None = None
    recovery: str | None = None


class Trait(SRDModel):
    index: str
    name: str
    url: str
    description: str
    species: list[APIReference]
    spells: list[SpellTrait] | None = None
    subspecies: list[APIReference] | None = None
    proficiency_choices: Choice | None = None
    speed: int | None = None
