package com.zanxiang.game.module.manage.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * @author : lingfeng
 * @time : 2024-04-30
 * @description : 消息来源
 */
@Getter
@AllArgsConstructor
public enum KfSessionFromEnum {

    /**
     * 来源广告
     */
    KF_SESSION_FROM_AD("KF_SESSION_FROM_AD"),

    /**
     * 来源平台
     */
    KF_SESSION_FROM_PLATFORM("KF_SESSION_FROM_PLATFORM");

    /**
     * 消息类型
     */
    private String value;

    public static KfSessionFromEnum getKfSessionFrom(String sessionFrom) {
        for (KfSessionFromEnum kfSessionFromEnum : KfSessionFromEnum.values()) {
            if (Objects.equals(sessionFrom, kfSessionFromEnum.getValue())) {
                return kfSessionFromEnum;
            }
        }
        return null;
    }
}
