Skip to content

exhibits#

Exhibits models

ExhibitsBase #

Bases: ZooModel

Exhibits model base

Source code in zoo/schemas/exhibits.py
class ExhibitsBase(ZooModel):
    """
    Exhibits model base
    """

    name: str = Field(description="The name of the exhibit")
    description: Optional[str] = Field(
        default=None, description="The description of the exhibit"
    )
    location: Optional[str] = Field(
        default=None, description="The location of the exhibit"
    )

    __example__: ClassVar[Dict[str, Any]] = {
        "name": "Big Cat Exhibit",
        "description": "A big cat exhibit",
        "location": "North America",
    }

ExhibitsCreate #

Bases: ExhibitsBase

Exhibits model: create

Source code in zoo/schemas/exhibits.py
class ExhibitsCreate(ExhibitsBase):
    """
    Exhibits model: create
    """

    model_config = ConfigDict(
        json_schema_extra=ExhibitsBase.get_openapi_create_example()
    )

ExhibitsRead #

Bases: DeletedMixin, CreatedModifiedMixin, ExhibitsBase, RequiredIdMixin

Exhibits model: read

Source code in zoo/schemas/exhibits.py
class ExhibitsRead(
    DeletedMixin,
    CreatedModifiedMixin,
    ExhibitsBase,
    RequiredIdMixin,
):
    """
    Exhibits model: read
    """

    model_config = ConfigDict(
        from_attributes=True, json_schema_extra=ExhibitsBase.get_openapi_read_example()
    )

ExhibitsUpdate #

Bases: ZooModel

Exhibits model: update

Source code in zoo/schemas/exhibits.py
class ExhibitsUpdate(ZooModel):
    """
    Exhibits model: update
    """

    name: Optional[str] = Field(default=None, description="The name of the exhibit")
    description: Optional[str] = Field(
        default=None, description="The description of the exhibit"
    )
    location: Optional[str] = Field(
        default=None, description="The location of the exhibit"
    )

    model_config = ConfigDict(
        json_schema_extra=ExhibitsBase.get_openapi_update_example()
    )