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

Upstream uses plain z.object here (not strictObject) — the only loose schema
in the 2024 set. We stay strict anyway; if upstream data grows extra keys the
corpus test will surface it and we decide then.
"""

from pydantic import Field

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


class Feature(SRDModel):
    index: str
    name: str
    description: str
    level: APIReference
    class_: APIReference = Field(alias="class")
    subclass: APIReference | None = None
    url: str
