Publication Model#

class backend.app.models.publication.Publication(*, id: int | None = None, link: str)[source]#

Bases: SQLModel

Represents a publication.

This class models a publication that references datasets.

Parameters:
  • id (int) – The unique identifier of the publication.

  • link (str) – The link to the publication.

  • datasets (list[Dataset]) – The datasets associated with the publication.

datasets: Mapped[list[Dataset]]#
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), 'link': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.