annotation
Classes:
PydanticField
PydanticField(
dty_ID: int,
rst_DisplayName: str,
dty_Type: str,
rst_MaxValues: int,
)
Using information of 1 detail (data field) from a Heurist record, build a Pydantic data field annotation.
Parameters:
-
dty_ID
int
) –Detail's ID.
-
rst_DisplayName
str
) –Name of the detail displayed in Heurist.
-
dty_Type
str
) –Detail's data type.
-
rst_MaxValues
int
) –Heurist indicator if the detail can be repeated.
Methods:
-
build_field
–Build a Pydantic field annotation for a detail whose value will simply be the result of the
RecordDetailConverter
, meaning not a date and not a vocabulary term. -
build_term_fk
–Build a Pydantic field annotation for a foreign key reference to the vocabulary term in the constructed database's trm table. This field is written to the Pydantic model in addition to a column for the term that simply has the label.
build_field
build_field() -> dict
Build a Pydantic field annotation for a detail whose value will simply be the result of the RecordDetailConverter
, meaning not a date and not a vocabulary term.
Returns:
-
dict
(dict
) –Pydantic field annotation.
build_term_fk
build_term_fk() -> dict
Build a Pydantic field annotation for a foreign key reference to the vocabulary term in the constructed database's trm table. This field is written to the Pydantic model in addition to a column for the term that simply has the label.
Returns:
-
dict
(dict
) –Pydantic field annotation.