org.models.message ================== .. py:module:: org.models.message Classes ------- .. autoapisummary:: org.models.message.TicketMessageMixin org.models.message.TicketNote org.models.message.TicketChatMessage org.models.message.TicketMessage org.models.message.ReservationMessage org.models.message.SubmissionMessage org.models.message.EventMessage org.models.message.PaymentMessage org.models.message.DirectoryMessage Module Contents --------------- .. py:class:: TicketMessageMixin .. py:attribute:: meta :type: sqlalchemy.Column[dict[str, Any]] .. py:method:: link(request: onegov.org.request.OrgRequest) -> str .. py:property:: ticket :type: onegov.ticket.Ticket | None .. py:method:: create(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, text: str | None = None, owner: str | None = None, **extra_meta: Any) -> Self :classmethod: .. py:class:: TicketNote Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:attribute:: text :type: sqlalchemy.Column[str] .. py:method:: create(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, text: str, file: onegov.file.File | None = None, owner: str | None = None, origin: str = 'internal') -> Self :classmethod: .. py:method:: formatted_text(layout: onegov.org.layout.DefaultLayout) -> str .. py:method:: links(layout: onegov.org.layout.DefaultLayout) -> collections.abc.Iterator[onegov.core.elements.Link] .. py:class:: TicketChatMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` Chat messages sent between the person in charge of the ticket and the submitter of the ticket. Paramters of note: - origin: 'external' or 'internal', to differentiate between the messages sent from the organisation to someone outside or from someone outside to someone inside. - notify: only relevant for messages originating from 'internal' - if the last sent message with origin 'internal' has this flag, a notification is sent to the owner of that message, whenever a new external reply comes in. .. py:attribute:: __mapper_args__ .. py:method:: create(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, text: str, owner: str, origin: str, notify: bool = False, recipient: str | None = None) -> Self :classmethod: .. py:method:: formatted_text(layout: onegov.org.layout.DefaultLayout) -> str .. py:property:: subtype :type: str | None An optional subtype for this message used for separating messages of a type further (currently for UI). Should be made unique, but there's no guarantee. .. py:class:: TicketMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:method:: create(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, change: str, origin: str = 'internal', **extra_meta: Any) -> Self :classmethod: .. py:class:: ReservationMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:method:: create(reservations: collections.abc.Iterable[libres.db.models.Reservation], ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, change: str, origin: str = 'internal') -> Self :classmethod: .. py:class:: SubmissionMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:method:: create(ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, change: str) -> Self :classmethod: .. py:class:: EventMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:method:: create(event: onegov.event.Event, ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, change: str) -> Self :classmethod: .. py:method:: event_link(request: onegov.org.request.OrgRequest) -> str .. py:class:: PaymentMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:method:: create(payment: onegov.pay.Payment, ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, change: str) -> Self :classmethod: .. py:class:: DirectoryMessage Bases: :py:obj:`onegov.chat.Message`, :py:obj:`TicketMessageMixin` A single chat message bound to channel. .. py:attribute:: __mapper_args__ .. py:method:: create(directory: onegov.directory.Directory, ticket: onegov.ticket.Ticket, request: onegov.org.request.OrgRequest, action: str) -> Self :classmethod: