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

import java.util.Objects;

/**
 * Created by wangzubo on 2023/3/13.
 */
public enum ChatActivityJoinEnum {

    /**
     * 入群方式 1规则入群2定向入群
     */
    RULE(1, "规则入群"),
    ORIENTED(2, "定向入群"),
    ;

    public final Integer value;
    public final String desc;

    ChatActivityJoinEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String getDescByValue(Integer value) {
        for (ChatActivityJoinEnum joinEnum : ChatActivityJoinEnum.values()) {
            if (Objects.equals(value, joinEnum.value)) {
                return joinEnum.desc;
            }
        }
        return null;
    }


}
