parliament.models.political_business ==================================== .. py:module:: parliament.models.political_business Attributes ---------- .. autoapisummary:: parliament.models.political_business.PoliticalBusinessType parliament.models.political_business.POLITICAL_BUSINESS_TYPE parliament.models.political_business.POLITICAL_BUSINESS_STATUS Classes ------- .. autoapisummary:: parliament.models.political_business.PoliticalBusiness parliament.models.political_business.PoliticalBusinessParticipation Module Contents --------------- .. py:type:: PoliticalBusinessType :canonical: Literal['inquiry', 'proposal', 'mandate', 'report', 'report and proposal', 'decision', 'message', 'urgent interpellation', 'invitation', 'interpelleation', 'commission report', 'communication', 'motion', 'postulate', 'resolution', 'regulation', 'miscellaneous', 'elections'] .. py:data:: POLITICAL_BUSINESS_TYPE :type: dict[PoliticalBusinessType, str] .. py:data:: POLITICAL_BUSINESS_STATUS :type: dict[PoliticalBusinessStatus, str] .. py:class:: PoliticalBusiness Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.file.MultiAssociatedFiles`, :py:obj:`onegov.core.orm.mixins.ContentMixin`, :py:obj:`onegov.search.ORMSearchable` Use this mixin if uploaded files can belong to any number of instances .. py:attribute:: __tablename__ :value: 'par_political_businesses' .. py:attribute:: type :type: sqlalchemy.Column[str] .. py:attribute:: __mapper_args__ .. py:attribute:: es_public :value: True 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:: 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:property:: es_suggestion :type: str Returns suggest-as-you-type value of the document. The field used for this property should also be indexed, or the suggestion will lead to nowhere. If a single string is returned, the completion input equals the completion output. (My Title -> My Title) If an array of strings is returned, all values are possible inputs and the first value is the output. (My Title/Title My -> My Title) .. py:attribute:: id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: title :type: sqlalchemy.Column[str] .. py:attribute:: number :type: sqlalchemy.Column[str | None] .. py:attribute:: political_business_type :type: sqlalchemy.Column[PoliticalBusinessType] .. py:attribute:: status :type: sqlalchemy.Column[PoliticalBusinessStatus | None] .. py:attribute:: entry_date :type: sqlalchemy.Column[datetime.date | None] .. py:attribute:: participants .. py:attribute:: parliamentary_group_id :type: sqlalchemy.Column[uuid.UUID | None] .. py:attribute:: meetings :type: sqlalchemy.orm.RelationshipProperty[onegov.parliament.models.meeting.Meeting] .. py:method:: __repr__() -> str .. py:class:: PoliticalBusinessParticipation Bases: :py:obj:`onegov.core.orm.Base`, :py:obj:`onegov.core.orm.mixins.ContentMixin` A participant of a political business, e.g. a parliamentarian. .. py:attribute:: __tablename__ :value: 'par_political_business_participants' .. py:attribute:: type :type: sqlalchemy.Column[str] .. py:attribute:: __mapper_args__ .. py:attribute:: id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: political_business_id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: parliamentarian_id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: participant_type :type: sqlalchemy.Column[str] .. py:attribute:: political_business :type: sqlalchemy.orm.RelationshipProperty[PoliticalBusiness] .. py:attribute:: parliamentarian :type: sqlalchemy.orm.RelationshipProperty[onegov.parliament.models.RISParliamentarian]