package net.northking.cctp.testbug.enums;

/**
 * @author: puchao.ma
 * @date: 2021/10/11 15:50
 */
public enum TestBugType {

    DEMAND_DEFECT("1", "需求缺陷"),
    DESIGN_DEFECT("2", "设计缺陷"),
    CODING_DEFECT("3", "编码缺陷"),
    UI_DEFECT("4", "UI缺陷"),
    COMPATIBILITY_DEFECT("5", "兼容性缺陷"),
    ENVIRONMENT_DEFECT("6", "环境缺陷"),
    USER_EXPERIENCE("7", "用户体验"),
    TRANSPLANT_DEFECT("8", "移植缺陷");

    private final String code;

    private final String msg;

    TestBugType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static TestBugType getTestBugType(String code) {
        for (TestBugType value : TestBugType.values()) {
            if (value.code.equals(code)) {
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
