Voc Subclass Model#
- class backend.app.models.voc_subclass.VocSubclass(*, id: int = None, parent_voc_category_id: int | None = None, name: str)[source]#
Bases:
SQLModelVOC Subclass model representing a subclass of VOC.
- Parameters:
id (int) – The unique identifier for the VOC subclass.
parent_voc_category_id (int) – The ID of the parent VOC category.
parent_voc_category (Optional["VocSubclass"]) – The parent VOC category.
child_voc_categories (list["VocSubclass"]) – List of child VOC categories.
vocs (list["Voc"]) – List of VOCs associated with the VOC subclass.
name (str) – The name of the VOC subclass.
datasets (list["Dataset"]) – List of datasets associated with the VOC subclass.
- child_voc_categories: Mapped[list[VocSubclass]]#
- id: int#
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'id': FieldInfo(annotation=int, required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'parent_voc_category_id': FieldInfo(annotation=Union[int, NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str#
- parent_voc_category: Mapped[VocSubclass | None]#
- parent_voc_category_id: int | None#