package com.ruoyi.business.constant;

public enum BusinessServiceEnum {
    insert("1","插入数据"),
    select("2","选择字段查询"),
    custom("3","自定义SQL查询"),

    //发布状态
    unpublished("1","未发布"),
    published("2","已发布"),

    //生效状态
    not_effective("1","未生效"),
    effective("2","已生效"),

	;
    private final String code;
    private final String value;

    public static String getName(String code) {
        for (BusinessServiceEnum c : BusinessServiceEnum.values()) {
            if (c.getCode().equals(code)) {
                return c.value;
            }
        }
        return "";
    }

    BusinessServiceEnum(String code, String value) {
        this.value = value;
        this.code = code;
    }

    public String getValue() {
        return this.value;
    }
    public String getCode() {
        return this.code;
    }

}
