package cd.casic.ci.process.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
public enum PiplineExecuteStatusEnum {
    DOC("1","资源申请中"),
    NEW_FEATURE("2","队列中"),
    INVALID("3","运行中"),
    NO_FIX("4","成功"),
    TEST_PASS("5","失败"),
    ;
    private String code;
    private String msg;

    PiplineExecuteStatusEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public static Map<String, PiplineExecuteStatusEnum> getCodeMap(){
        Map<String, PiplineExecuteStatusEnum> map = new HashMap<>();
        for (PiplineExecuteStatusEnum value : values()) {
            map.put(value.code, value);
        }
        return map;
    }
}
