Contact Model#
- class backend.app.models.contact.Contact(*, id: int = None, name: str, email: str | None = None, phone: str | None = None)[source]#
Bases:
SQLModelRepresents a contact.
This class models the contact information related to datasets.
- Parameters:
id (int) – The unique identifier of the contact.
name (str) – The name of the contact.
email (str) – The email of the contact.
phone (str) – The phone number of the contact.
datasets (list[Dataset]) – The datasets associated with this contact.
- email: str | None#
- 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]] = {'email': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'id': FieldInfo(annotation=int, required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'phone': FieldInfo(annotation=Union[str, 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#
- phone: str | None#