package net.northking.cctp.testbug.enums;

/**
 * @author: puchao.ma
 * @date: 2021/10/9 9:11
 */
public enum TestBugStatus {

    NEW("1", "新建"),
    OPEN("2", "打开"),
    ALLOCATED("3", "已分配"),
    REFUSE("4", "拒绝"),
    WAIT_VERIFY("5","待验证"),
    DOING("6", "处理中"),
    DELAY("7","延迟"),
    REPAIRED("8","已修复"),
    CLOSE("9","关闭"),
    INVALID("10","无效"),
    REOPEN("11","重新打开"),
    HANG("12","挂起"),
    WAIT_DECISION("13","带裁决"),
    WAIT_PERFECT("14","待完善"),
    WAIT_ALLOCATE("15","待分配"),
    WAIT_REPAIR("16","待修复"),
    WAIT_AUDIT("17","待审核");


    private final String code;

    private final String msg;

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

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

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
