from events.types.payload import Payload


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

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

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

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


