translator_directory.models.translator
======================================

.. py:module:: translator_directory.models.translator


Attributes
----------

.. autoapisummary::

   translator_directory.models.translator.TranslatorState


Classes
-------

.. autoapisummary::

   translator_directory.models.translator.Translator


Module Contents
---------------

.. py:type:: TranslatorState
   :canonical: Literal['proposed', 'published']


.. py:class:: Translator

   Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.core.orm.mixins.TimestampMixin`, :py:obj:`onegov.file.AssociatedFiles`, :py:obj:`onegov.core.orm.mixins.ContentMixin`, :py:obj:`onegov.gis.CoordinatesMixin`, :py:obj:`onegov.search.ORMSearchable`


   Mixin providing created/modified timestamps for all records.

   The columns are deferred loaded as this is primarily for logging and future
   forensics.



   .. py:attribute:: __tablename__
      :value: 'translators'



   .. py:attribute:: es_properties

      Returns the type mapping of this model. Each property in the
      mapping will be read from the model instance.

      The returned object needs to be a dict or an object that provides
      a ``to_dict`` method.

      Internally, onegov.search stores differing languages in different
      indices. It does this automatically through langauge detection, or
      by manually specifying a language.

      Note that objects with multiple languages are not supported
      (each object is supposed to have exactly one language).

      Onegov.search will automatically insert the right analyzer for
      types like these.

      There's currently only limited support for properties here, namely
      objects and nested mappings do not work! This is going to be added
      in the future though.




   .. py:attribute:: es_public
      :value: False


      Returns True if the model is available to be found by the public.
      If false, only editors/admins will see this object in the search
      results.




   .. py:attribute:: id
      :type:  sqlalchemy.Column[uuid.UUID]


   .. py:attribute:: state
      :type:  sqlalchemy.Column[TranslatorState]


   .. py:attribute:: first_name
      :type:  sqlalchemy.Column[str]


   .. py:attribute:: last_name
      :type:  sqlalchemy.Column[str]


   .. py:attribute:: pers_id
      :type:  sqlalchemy.Column[int | None]


   .. py:attribute:: admission
      :type:  sqlalchemy.Column[AdmissionState]


   .. py:attribute:: withholding_tax
      :type:  sqlalchemy.Column[bool]


   .. py:attribute:: self_employed
      :type:  sqlalchemy.Column[bool]


   .. py:attribute:: gender
      :type:  sqlalchemy.Column[Gender | None]


   .. py:attribute:: date_of_birth
      :type:  sqlalchemy.Column[datetime.date | None]


   .. py:attribute:: nationalities
      :type:  onegov.core.orm.mixins.dict_property[list[str] | None]


   .. py:attribute:: address
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: zip_code
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: city
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: hometown
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: drive_distance
      :type:  sqlalchemy.Column[float | None]


   .. py:attribute:: social_sec_number


   .. py:attribute:: bank_name
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: bank_address
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: account_owner
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: iban
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: email
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: user
      :type:  sqlalchemy.orm.relationship[onegov.user.User]


   .. py:attribute:: tel_mobile
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: tel_private
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: tel_office
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: availability
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: confirm_name_reveal
      :type:  sqlalchemy.Column[bool | None]


   .. py:attribute:: date_of_application
      :type:  sqlalchemy.Column[datetime.date | None]


   .. py:attribute:: date_of_decision
      :type:  sqlalchemy.Column[datetime.date | None]


   .. py:attribute:: mother_tongues
      :type:  sqlalchemy.orm.relationship[list[translator_directory.models.language.Language]]


   .. py:attribute:: spoken_languages
      :type:  sqlalchemy.orm.relationship[list[translator_directory.models.language.Language]]


   .. py:attribute:: written_languages
      :type:  sqlalchemy.orm.relationship[list[translator_directory.models.language.Language]]


   .. py:attribute:: monitoring_languages
      :type:  sqlalchemy.orm.relationship[list[translator_directory.models.language.Language]]


   .. py:attribute:: proof_of_preconditions
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: agency_references
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: education_as_interpreter
      :type:  sqlalchemy.Column[bool]


   .. py:attribute:: certificates
      :type:  sqlalchemy.orm.relationship[list[translator_directory.models.certificate.LanguageCertificate]]


   .. py:attribute:: comments
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: for_admins_only
      :type:  sqlalchemy.Column[bool]


   .. py:attribute:: profession
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: occupation
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: other_certificates
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: operation_comments
      :type:  sqlalchemy.Column[str | None]


   .. py:attribute:: expertise_interpreting_types
      :type:  onegov.core.orm.mixins.dict_property[collections.abc.Sequence[InterpretingType]]


   .. py:attribute:: expertise_professional_guilds
      :type:  onegov.core.orm.mixins.dict_property[collections.abc.Sequence[str]]


   .. py:attribute:: expertise_professional_guilds_other
      :type:  onegov.core.orm.mixins.dict_property[collections.abc.Sequence[str]]


   .. py:property:: expertise_professional_guilds_all
      :type: collections.abc.Sequence[str]



   .. py:attribute:: imported
      :type:  sqlalchemy.Column[bool]


   .. py:property:: title
      :type: str


      Returns title with lastname in uppercase. 



   .. py:property:: lead
      :type: str



   .. py:property:: full_name
      :type: str


      Returns the full name with lastname in uppercase. 



   .. py:property:: unique_categories
      :type: list[str]



   .. py:method:: nationalities_as_text(locale: str, country_codes: list[str] | None = None) -> str

      Returns the translators nationalities as text, translated to the given
      locale.
      If `country_codes` e.g. ['CH'] is given, the given codes are
      translated to country names instead.