org.models.push_notification ============================ .. py:module:: org.models.push_notification Classes ------- .. autoapisummary:: org.models.push_notification.PushNotification org.models.push_notification.PushNotificationCollection Module Contents --------------- .. py:class:: PushNotification Bases: :py:obj:`onegov.core.orm.Base` Keeps track of all outbound push notifications to prevent duplicates. .. py:attribute:: __tablename__ :type: ClassVar[str] :value: 'push_notification' .. py:attribute:: id :type: sqlalchemy.Column[uuid.UUID] .. py:attribute:: news_id :type: sqlalchemy.Column[int] .. py:attribute:: news :type: sqlalchemy.orm.relationship[onegov.org.models.News] .. py:attribute:: topic_id :type: sqlalchemy.Column[str] .. py:attribute:: sent_at .. py:attribute:: response_data :type: sqlalchemy.Column[dict[str, Any] | None] .. py:method:: was_notification_sent(session: sqlalchemy.orm.Session, news_id: int, topic_id: str) -> bool :classmethod: .. py:method:: record_sent_notification(session: sqlalchemy.orm.Session, news_id: int, topic_id: str, response_data: dict[str, Any] | None) -> PushNotification :classmethod: .. py:attribute:: __table_args__ .. py:class:: PushNotificationCollection(session: sqlalchemy.orm.Session, **kwargs: Any) Bases: :py:obj:`onegov.core.collection.GenericCollection`\ [\ :py:obj:`PushNotification`\ ] Simple collection for sent notifications. .. py:property:: model_class :type: type[PushNotification] .. py:method:: query() -> sqlalchemy.orm.Query[PushNotification]