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

from pydantic import Field

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


class SubclassFeature(SRDModel):
    name: str
    level: int
    description: str


class Subclass(SRDModel):
    index: str
    url: str
    name: str
    class_: APIReference = Field(alias="class")
    summary: str
    description: str
    features: list[SubclassFeature]
