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

from __future__ import annotations

from pydantic.v1 import Field, constr

from oold.model.v1 import LinkedBaseModel


class Thing(LinkedBaseModel):
    class Config:
        schema_extra = {"title": "Thing"}

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


class Person(Thing):
    class Config:
        schema_extra = {"title": "Person"}

    type: str | None = Field(
        "playground:Person",
        field_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
