package com.inspect.base.core.utils;

import com.inspect.base.core.enums.TaskStatus;

public class DescUtil {
    public static String getTaskStatusDesc(String code) {
        String info = "UNKNOWN";
        if (TaskStatus.DONE.getCode().equals(code)) {
            info = TaskStatus.DONE.getInfo();
        } else if (TaskStatus.RUNNING.getCode().equals(code)) {
            info = TaskStatus.RUNNING.getInfo();
        } else if (TaskStatus.PAUSED.getCode().equals(code)) {
            info = TaskStatus.PAUSED.getInfo();
        } else if (TaskStatus.HALTED.getCode().equals(code)) {
            info = TaskStatus.HALTED.getInfo();
        } else if (TaskStatus.PENDING.getCode().equals(code)) {
            info = TaskStatus.PENDING.getInfo();
        } else if (TaskStatus.EXPIRED.getCode().equals(code)) {
            info = TaskStatus.EXPIRED.getInfo();
        }
        return info;
    }
}
