from events.types.payload import Payload


class UserModified(Payload):
    OPERATION_ADD = "ADD"
    OPERATION_EDIT = "EDIT"
    OPERATION_DELETE = "DELETE"
    def __init__(self, user_id: str, operation: str):
        super().__init__({
            'user_id': user_id,
            'operation': operation,
        })

    @property
    def user_id(self) -> str:
        return self.get("user_id")

    @property
    def operation(self) -> str:
        return self.get("operation")

