package com.qmth.jkserver.enums;

import java.util.Objects;

/**
 * @Description: 任务类型enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/3/29
 */
public enum TaskTypeEnum {

    SYNC_YUN_MARK("云阅卷同步");

    private String title;

    private TaskTypeEnum(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    /**
     * 状态转换 toName
     *
     * @param title
     * @return
     */
    public static String convertToName(String title) {
        for (TaskTypeEnum e : TaskTypeEnum.values()) {
            if (Objects.equals(title, e.getTitle())) {
                return e.name();
            }
        }
        return null;
    }
}
