# generated by datamodel-codegen:
#   filename:  allof_class_hierarchy.json
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from pydantic import BaseModel, Field, constr


class Entity(BaseModel):
    type: str
    type_list: list[str] | None = ['playground:Entity']


class Entity2(BaseModel):
    type: str
    type_list: list[str]


class Thing(Entity):
    type: str | None = 'playground:Thing'
    type_list: list[str] | None = ['playground:Thing']
    name: constr(min_length=1) = Field(..., description='The things name')


class Location(Entity2):
    type: str | None = 'playground:Location'
    type_list: list[str] | None = ['playground:Location']
    address: constr(min_length=5) = Field(
        ..., description='The address of the location'
    )


class Person(Thing, Location):
    name: constr(min_length=1) | None = Field(None, description="The person's name")
    type: str | None = 'playground:Person'
    type_list: list[str] | None = ['playground:Person']
