package cd.casic.ci.process.enums;

import lombok.Getter;

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

@Getter
public enum PiplineTriggerModeEnum {
    HAND("hand","手动触发"),
    CODE("code","提交代码"),
    WEBHOOK("webhook","网络连接"),
    TIMING("timing","定时触发")
    ;
    private final String code;
    private final String msg;

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