package com.gic.haoban.manage.api.enums;

/**
 * Created by hua on 2021/6/21.
 */
public enum QywxTagRelationTypeEnum {
    TAG_GROUP(0, "标签组", "tag_group"),
    TAG_ITEM(1, "标签项", "tag");

    private int type;
    private String name;
    private String tagType;

    QywxTagRelationTypeEnum(int type, String name, String tagType) {
        this.type = type;
        this.name = name;
        this.tagType = tagType;
    }

    public String getTagType() {
        return tagType;
    }

    public void setTagType(String tagType) {
        this.tagType = tagType;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static QywxTagRelationTypeEnum getByTagType(String type) {
        QywxTagRelationTypeEnum[] values = QywxTagRelationTypeEnum.values();
        for (QywxTagRelationTypeEnum value : values) {
            if (value.getTagType().equals(type)) {
                return value;
            }
        }
        return null;
    }
}
