package cn.ey.biz.module.system.enums.engagement;


import org.apache.commons.lang3.StringUtils;

public enum CodeBlockColumnEnum {
    GEO_REGION_CODE("geoRegionCode"),
    LEGAL_ENTITY_CODE("legalEntityCode"),
    BU_CODE("buCode"),
    OU_CODE("ouCode"),
    MU_CODE("muCode"),
    SMU_CODE("smuCode"),
    SL_CODE("slCode"),
    SSL_CODE("sslCode"),
    COMPETENCY_CODE("competencyCode"),
    MARKET_SEGMENT_CODE("marketSegmentCode"),
    MR_CODE("mrCode"),
    CITY_CODE("cityCode"),
    MERCURY_COMPETENCY_CODE("mercuryCompetencyCode"),
    CATEGORY_CODE("categoryCode");

    CodeBlockColumnEnum(String name) {

        this.name = name;
    }


    private final String name;


    public String getName() {
        return name;
    }

    public static CodeBlockColumnEnum getNameByColumn(String name) {
        for (CodeBlockColumnEnum typeEnum : CodeBlockColumnEnum.values()) {
            if (StringUtils.equals(name, typeEnum.getName())) {
                return typeEnum;
            }
        }
        return null;
    }
}
