from events.types.payload import Payload


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

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

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

