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

import java.util.Objects;

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

    /**
     * 活动状态1未开始2进行中3已终止4已结束
     */
    NOT_START(1, "未开始"),
    START(2, "进行中"),
    STOP(3, "已终止"),
    END(4, "已结束"),
    ;

    public final Integer value;
    public final String desc;

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

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


}
