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

from __future__ import annotations

from pydantic import ConfigDict, Field, constr

from oold.model import LinkedBaseModel


class Thing(LinkedBaseModel):
    model_config = ConfigDict(
        json_schema_extra={"title": "Thing"},
    )
    type: str | None = Field(
        "playground:Thing", json_schema_extra={"options": {"hidden": True}}
    )
    name: constr(min_length=1) | None = "A Thing"
    """
    The things name
    """


class Person(Thing):
    model_config = ConfigDict(
        json_schema_extra={"title": "Person"},
    )
    type: str | None = Field(
        "playground:Person",
        json_schema_extra={
            "$comment": "Already defined in playground:Thing -> we override just the default"
        },
    )
    name: constr(min_length=1) | None = "John Doe"
    """
    First and Last name
    """
    age: int | None = None
