""" Pydantic schemas for TOAR database """ from typing import List from pydantic import BaseModel, Field class VariableBase(BaseModel): name: str = Field(..., description="Name. Short variable-like name of the variable") longname: str = Field(..., description="Longname. Long (explicit) name of the variable") displayname: str = Field(..., description="Displayname. Display name of the variable") cf_standardname: str = Field(..., description="Cf standardname. CF standard name of the variable if defined") units: str = Field(..., description="Units. Physical units of variable") chemical_formula: str = Field(..., description="Chemical formula. Chemical formula of variable(if applicable)") class VariableCreate(VariableBase): pass class Variable(VariableBase): id: int class Config: orm_mode = True