from onegov.chat import Message
from onegov.org.models.message import TicketMessageMixin
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from onegov.agency.request import AgencyRequest
from onegov.ticket import Ticket
from typing import Self
[docs]
class AgencyMutationMessage(Message, TicketMessageMixin):
[docs]
__mapper_args__ = {
'polymorphic_identity': 'agency_mutation'
}
@classmethod
[docs]
def create( # type:ignore[override]
cls,
ticket: 'Ticket',
request: 'AgencyRequest',
change: str
) -> 'Self':
return super().create(ticket, request, change=change)
[docs]
class PersonMutationMessage(Message, TicketMessageMixin):
[docs]
__mapper_args__ = {
'polymorphic_identity': 'person_mutation'
}
@classmethod
[docs]
def create( # type:ignore[override]
cls,
ticket: 'Ticket',
request: 'AgencyRequest',
change: str
) -> 'Self':
return super().create(ticket, request, change=change)