package net.northking.cctp.testbug.enums;

/**
 * @author: puchao.ma
 * @date: 2021/11/9 14:32
 */
public enum BugFrom {

    MANUAL_SUBMISSION("M", "1"),
    AUTOMATED_SUBMISSION("A", "2"),
    EXEC_SUBMISSION("E", "3");

    private final String code;

    private final String msg;

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

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

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
