from events.types.payload import Payload


class ChildTaskTriggered(Payload):
    def __init__(self, task_id: str, child_id: str, points: int):
        super().__init__({
            'task_id': task_id,
            'child_id': child_id,
            'points': points
        })

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

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

    @property
    def points(self) -> int:
        return self.get("points", 0)


