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

import java.util.Objects;

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

    /**
     * 邀请会员类型 0所有用户1开卡会员
     */
    ALL(0, "所有用户"),
    OPEN_CARD(1, "开卡会员"),
    ;

    public final Integer value;
    public final String desc;

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

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

    public static ChatActivityInviteMemberTypeEnum getByValue(Integer value) {
        for (ChatActivityInviteMemberTypeEnum inviteMemberTypeEnum : ChatActivityInviteMemberTypeEnum.values()) {
            if (Objects.equals(value, inviteMemberTypeEnum.value)) {
                return inviteMemberTypeEnum;
            }
        }
        return null;
    }
}
