gazette.models.organization

Classes

Organization

Defines an organization for official notices.

OrganizationMove

Represents a single move of an adjacency list item.

Module Contents

class gazette.models.organization.Organization(title: str, parent: Self | None = None, **kwargs: Any)[source]

Bases: onegov.core.orm.abstract.AdjacencyList, onegov.core.orm.mixins.ContentMixin, onegov.core.orm.mixins.TimestampMixin

Defines an organization for official notices.

Although the categories are defined as a flexible adjacency list, we currently use it only as a two-stage adjacency list key-value list (name-title).

__tablename__ = 'gazette_organizations'[source]
active: Column[bool | None][source]
external_name: onegov.core.orm.mixins.dict_property[str | None][source]
parent: sqlalchemy.orm.relationship[Organization | None][source]
notices() Query[GazetteNotice][source]

Returns a query to get all notices related to this category.

property in_use: bool[source]

True, if the organization is used by any notice.

title_observer(title: str) None[source]
class gazette.models.organization.OrganizationMove(session: sqlalchemy.orm.Session, subject_id: int, target_id: int, direction: onegov.core.orm.abstract.MoveDirection)[source]

Represents a single move of an adjacency list item.

session[source]
subject_id[source]
target_id[source]
direction[source]
execute() None[source]