package ink.wgink.module.activiti.pojo.dtos.oa;

import ink.wgink.module.activiti.pojo.bos.oa.TaskCommentBO;
import ink.wgink.module.activiti.pojo.bos.oa.TaskTransferCommentBO;
import io.swagger.annotations.ApiModel;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @ClassName: OaProcessLogDTO
 * @Description: 流程日志
 * @Author: wanggeng
 * @Date: 2022/4/15 16:50
 * @Version: 1.0
 */
@ApiModel
public class OaProcessLogDTO {

    private String taskId;
    private String taskName;
    private String startTime;
    private String endTime;
    private String usedTime;
    private String userIds;
    private String userNames;
    private String taskStatus;
    private Map<String, Object> taskVariables;
    private Map<String, Object> processVariables;
    private TaskCommentBO comment;
    private List<TaskTransferCommentBO> transferComments;


    public String getTaskId() {
        return taskId == null ? "" : taskId.trim();
    }

    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    public String getTaskName() {
        return taskName == null ? "" : taskName.trim();
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getStartTime() {
        return startTime == null ? "" : startTime.trim();
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime == null ? "" : endTime.trim();
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getUsedTime() {
        return usedTime == null ? "0秒" : usedTime.trim();
    }

    public void setUsedTime(String usedTime) {
        this.usedTime = usedTime;
    }

    public String getUserIds() {
        return userIds == null ? "" : userIds.trim();
    }

    public void setUserIds(String userIds) {
        this.userIds = userIds;
    }

    public String getUserNames() {
        return userNames == null ? "" : userNames.trim();
    }

    public void setUserNames(String userNames) {
        this.userNames = userNames;
    }

    public String getTaskStatus() {
        return taskStatus == null ? "" : taskStatus.trim();
    }

    public void setTaskStatus(String taskStatus) {
        this.taskStatus = taskStatus;
    }

    public Map<String, Object> getTaskVariables() {
        return taskVariables;
    }

    public void setTaskVariables(Map<String, Object> taskVariables) {
        this.taskVariables = taskVariables;
    }

    public Map<String, Object> getProcessVariables() {
        return processVariables;
    }

    public void setProcessVariables(Map<String, Object> processVariables) {
        this.processVariables = processVariables;
    }

    public TaskCommentBO getComment() {
        return comment;
    }

    public void setComment(TaskCommentBO comment) {
        this.comment = comment;
    }

    public List<TaskTransferCommentBO> getTransferComments() {
        return transferComments == null ? new ArrayList() : transferComments;
    }

    public void setTransferComments(List<TaskTransferCommentBO> transferComments) {
        this.transferComments = transferComments;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"taskId\":\"")
                .append(taskId).append('\"');
        sb.append(",\"taskName\":\"")
                .append(taskName).append('\"');
        sb.append(",\"startTime\":\"")
                .append(startTime).append('\"');
        sb.append(",\"endTime\":\"")
                .append(endTime).append('\"');
        sb.append(",\"usedTime\":\"")
                .append(usedTime).append('\"');
        sb.append(",\"userIds\":\"")
                .append(userIds).append('\"');
        sb.append(",\"userNames\":\"")
                .append(userNames).append('\"');
        sb.append(",\"taskStatus\":\"")
                .append(taskStatus).append('\"');
        sb.append(",\"taskVariables\":")
                .append(taskVariables);
        sb.append(",\"processVariables\":")
                .append(processVariables);
        sb.append(",\"comment\":")
                .append(comment);
        sb.append(",\"transferComments\":")
                .append(transferComments);
        sb.append('}');
        return sb.toString();
    }
}
