package cn.lili.modules.lmk.enums.general; import lombok.Getter; import org.apache.commons.lang3.StringUtils; /** * 视频类型 * * @author:xp * @date:2025/5/14 10:30 */ @Getter public enum VideoTypeEnum { VIDEO("video", "视频"), HEALTH("health", "大健康"), COOK("cook", "神厨"), ; private final String value; private final String desc; VideoTypeEnum(String value, String desc) { this.value = value; this.desc = desc; } /** * 获取含义 * * @param value * @return */ public static String getDescByValue(String value) { if (StringUtils.isBlank(value)) { return null; } for (VideoTypeEnum e : VideoTypeEnum.values()){ if (value.equals(e.getValue())) { return e.getDesc(); } } return null; } }