# generated by datamodel-codegen:
#   filename:  example.json

from __future__ import annotations

from enum import Enum

from pydantic import ConfigDict, Field

from oold.model import LinkedBaseModel


class Hobby(str, Enum):
    """
    Defines various hobbies as an enum.
    """

    SPORTS = "ex:sports"
    """
    Sports hobby, e.g. football, basketball, etc.
    """
    MUSIC = "ex:music"
    """
    Music hobby, e.g. playing instruments, singing, etc.
    """
    ART = "ex:art"
    """
    Art hobby, e.g. painting, drawing, etc.
    """


class Example(LinkedBaseModel):
    model_config = ConfigDict(
        json_schema_extra={"title": "Example"},
    )
    type: str | None = ["example"]
    hobby: Hobby | None = Field(
        None,
        json_schema_extra={
            "x-enum-varnames": ["SPORTS", "MUSIC", "ART"],
            "options": {
                "enum_titles": [
                    "Sports hobby, e.g. football, basketball, etc.",
                    "Music hobby, e.g. playing instruments, singing, etc.",
                    "Art hobby, e.g. painting, drawing, etc.",
                ]
            },
        },
    )
    """
    Defines various hobbies as an enum.
    """
