
package cn.orionsec.ops.constant.app;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum StageType {

    /**
     * 构建
     */
    BUILD(10, "构建"),

    /**
     * 发布
     */
    RELEASE(20, "发布"),

    ;

    private final Integer type;

    private final String label;

    public static StageType of(Integer type) {
        if (type == null) {
            return null;
        }
        for (StageType value : values()) {
            if (value.type.equals(type)) {
                return value;
            }
        }
        return null;
    }

}
