Voc Model#
- class backend.app.models.voc.Voc(*, id: int | None = None, voc_subclass_id: int | None = None, name: str | None = None)[source]#
Bases:
SQLModelRepresents a VOC (Volatile Organic Compound).
This class models a VOC and its relationship with datasets and VOC subclasses.
- Parameters:
id (int) – The unique identifier of the VOC.
voc_subclass_id (int) – The ID of the associated VOC subclass.
name (str) – The name of the VOC
datasets (list[Dataset]) – The datasets associated with this VOC.
- id: int | None#
- 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=Union[int, NoneType], required=False, default=None), 'name': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'voc_subclass_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 | None#
- voc_subclass: Mapped[VocSubclass | None]#
- voc_subclass_id: int | None#