package com.qmth.teachcloud.report.business.enums;

import java.util.Objects;

/**
 * @Description: 测试状态enum
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/3/29
 */
public enum TestStatusEnum {

    UN_TEST("未测试"),

    TEST("已测试"),

    CHECKED("已抽检");

    private String title;

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

    public String getTitle() {
        return title;
    }

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