package de.assecutor.votianlt.model.task;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;

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

    @Transient
    @JsonIgnore
    private String note;

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

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

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

    @Data
    @NoArgsConstructor
    public class TaskSpecificData {
        public String taskType = getTaskType();
        public String note;

        public TaskSpecificData(String note) {
            this.note = note;
        }
    }
}
