translator_directory.models.translator

Attributes

TranslatorState

Classes

Translator

Mixin providing created/modified timestamps for all records.

Module Contents

translator_directory.models.translator.TranslatorState: TypeAlias = Literal['proposed', 'published'][source]
class translator_directory.models.translator.Translator[source]

Bases: onegov.core.orm.Base, onegov.core.orm.mixins.TimestampMixin, onegov.file.AssociatedFiles, onegov.core.orm.mixins.ContentMixin, onegov.gis.CoordinatesMixin, 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.

__tablename__ = 'translators'[source]
es_properties[source]

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.

es_public = False[source]

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.

id: Column[uuid.UUID][source]
state: Column[TranslatorState][source]
first_name: Column[str][source]
last_name: Column[str][source]
pers_id: Column[int | None][source]
admission: Column[AdmissionState][source]
withholding_tax: Column[bool][source]
self_employed: Column[bool][source]
gender: Column[Gender | None][source]
date_of_birth: Column[date | None][source]
nationalities: onegov.core.orm.mixins.dict_property[list[str] | None][source]
address: Column[str | None][source]
zip_code: Column[str | None][source]
city: Column[str | None][source]
hometown: Column[str | None][source]
drive_distance: Column[float | None][source]
social_sec_number[source]
bank_name: Column[str | None][source]
bank_address: Column[str | None][source]
account_owner: Column[str | None][source]
iban: Column[str | None][source]
email: Column[str | None][source]
user: relationship[User][source]
tel_mobile: Column[str | None][source]
tel_private: Column[str | None][source]
tel_office: Column[str | None][source]
availability: Column[str | None][source]
confirm_name_reveal: Column[bool | None][source]
date_of_application: Column[date | None][source]
date_of_decision: Column[date | None][source]
mother_tongues: relationship[list[Language]][source]
spoken_languages: relationship[list[Language]][source]
written_languages: relationship[list[Language]][source]
monitoring_languages: relationship[list[Language]][source]
proof_of_preconditions: Column[str | None][source]
agency_references: Column[str | None][source]
education_as_interpreter: Column[bool][source]
certificates: relationship[list[LanguageCertificate]][source]
comments: Column[str | None][source]
for_admins_only: Column[bool][source]
profession: Column[str | None][source]
occupation: Column[str | None][source]
other_certificates: Column[str | None][source]
operation_comments: Column[str | None][source]
expertise_interpreting_types: dict_property[Sequence[InterpretingType]][source]
expertise_professional_guilds: dict_property[Sequence[str]][source]
expertise_professional_guilds_other: dict_property[Sequence[str]][source]
property expertise_professional_guilds_all: Sequence[str][source]
imported: Column[bool][source]
property title: str[source]

Returns title with lastname in uppercase.

property lead: str[source]
property full_name: str[source]

Returns the full name with lastname in uppercase.

property unique_categories: list[str][source]
nationalities_as_text(locale: str, country_codes: list[str] | None = None) str[source]

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.