package com.webchat.common.enums;


import com.webchat.common.constants.MessageConstants;
import lombok.Getter;


/***
 * 对资源的操作行为：点赞、收藏、分享、浏览、打赏
 */
@Getter
public enum ResourceBehaviorTypeEnum {

    LIKE("点赞"), VIEW("预览/浏览");

    private String behaviorName;

    ResourceBehaviorTypeEnum(String behaviorName) {
        this.behaviorName = behaviorName;
    }

    public String getBehavior() {
        return this.name();
    }

    public static MessageConstants.TypeEnum getMessageType(String behaviorType) {
        if (LIKE.name().equals(behaviorType)) {
            return MessageConstants.TypeEnum.LIKE;
        }
        return null;
    }
}
