agency.models.move

Attributes

_M

_M_co

_IdT_contra

Classes

SupportsById

Move

Base class for moving things.

AgencyMove

Represents a single move of a suborganization.

AgencyMembershipMoveWithinAgency

Represents a single move of a membership with respect to a Agency.

AgencyMembershipMoveWithinPerson

Represents a single move of a membership with respect to a Person.

Module Contents

agency.models.move._M[source]
agency.models.move._M_co[source]
agency.models.move._IdT_contra[source]
class agency.models.move.SupportsById[source]

Bases: Protocol[_M_co, _IdT_contra]

by_id(id: _IdT_contra, /) _M_co | None[source]
class agency.models.move.Move(session: sqlalchemy.orm.Session, subject_id: _IdT_contra, target_id: _IdT_contra, direction: onegov.core.orm.abstract.MoveDirection)[source]

Bases: Generic[_M, _IdT_contra]

Base class for moving things.

session[source]
subject_id[source]
target_id[source]
direction[source]
property collection: SupportsById[_M, _IdT_contra][source]
Abstractmethod:

property subject: _M | None[source]
property target: _M | None[source]
abstract execute() None[source]
class agency.models.move.AgencyMove(session: sqlalchemy.orm.Session, subject_id: _IdT_contra, target_id: _IdT_contra, direction: onegov.core.orm.abstract.MoveDirection)[source]

Bases: Move[onegov.agency.models.ExtendedAgency, int]

Represents a single move of a suborganization.

property collection: onegov.agency.collections.ExtendedAgencyCollection[source]
execute() None[source]
class agency.models.move.AgencyMembershipMoveWithinAgency(session: sqlalchemy.orm.Session, subject_id: _IdT_contra, target_id: _IdT_contra, direction: onegov.core.orm.abstract.MoveDirection)[source]

Bases: Move[onegov.people.AgencyMembership, uuid.UUID]

Represents a single move of a membership with respect to a Agency.

property collection: onegov.people.AgencyMembershipCollection[source]
execute() None[source]
class agency.models.move.AgencyMembershipMoveWithinPerson(session: sqlalchemy.orm.Session, subject_id: _IdT_contra, target_id: _IdT_contra, direction: onegov.core.orm.abstract.MoveDirection)[source]

Bases: Move[onegov.people.AgencyMembership, uuid.UUID]

Represents a single move of a membership with respect to a Person.

property collection: onegov.people.AgencyMembershipCollection[source]
execute() None[source]