from events.types.payload import Payload


class ChildChoreConfirmation(Payload):
    OPERATION_CONFIRMED = "CONFIRMED"
    OPERATION_APPROVED = "APPROVED"
    OPERATION_REJECTED = "REJECTED"
    OPERATION_CANCELLED = "CANCELLED"
    OPERATION_RESET = "RESET"

    def __init__(self, child_id: str, task_id: str, operation: str):
        super().__init__({
            'child_id': child_id,
            'task_id': task_id,
            'operation': operation
        })

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

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

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