package de.assecutor.votianlt.model.task;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.Field;

@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ConfirmationTask extends BaseTask {

    @Field("button_text")
    private String buttonText;

    public ConfirmationTask(String buttonText) {
        this.buttonText = buttonText;
    }

    @Override
    public String getTaskType() {
        return "CONFIRMATION";
    }

    @Override
    public String getDisplayName() {
        return TaskType.CONFIRMATION.getDisplayName();
    }

    @Override
    public Object getTaskSpecificData() {
        return new TaskSpecificData();
    }

    public class TaskSpecificData {
        public String taskType = getTaskType();
        public String buttonText = ConfirmationTask.this.buttonText;
    }
}
