package com.tzld.piaoquan.growth.common.common.enums;

import java.util.Objects;

public enum GhTypeEnum {

    GH(1, "内部公众号"),
    THIRD_PARTY_GH(2, "外部公众号"),
    WE_COM(3, "企业微信");

    GhTypeEnum(Integer type, String name) {
        this.type = type;
        this.name = name;
    }

    public final Integer type;

    public final String name;


    public static String getTypeName(Integer type) {
        if (type == null) {
            return null;
        }
        for (GhTypeEnum ghTypeEnum : GhTypeEnum.values()) {
            if (Objects.equals(ghTypeEnum.type, type)) {
                return ghTypeEnum.name;
            }
        }
        return null;
    }




}
