|
from ..utils.hook import Hook
|
|
from ..models import User, Role
|
|
|
|
|
|
class Message:
|
|
def __init__(self, receiver: User or Role, message: str, subject: str):
|
|
self.message = message
|
|
self.subject = subject
|
|
self.receiver = receiver
|
|
|
|
|
|
@Hook
|
|
def send_message(message: Message):
|
|
pass
|