from events.types.payload import Payload


class ChildRewardRequest(Payload):
    REQUEST_GRANTED = "GRANTED"
    REQUEST_CREATED = "CREATED"
    REQUEST_CANCELLED = "CANCELLED"
    def __init__(self, child_id, reward_id: str, operation: str):
        super().__init__({
            'child_id': child_id,
            'reward_id': reward_id,
            'operation': operation
        })

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

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

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


