package com.qmth.themis.business.enums;

import java.util.Objects;

/**
 * @Description: 音频类型
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/8/30
 */
public enum VideoTypeEnum {

    ALL("全部"),

    TRUE("已删除"),

    FALSE("有效");

    VideoTypeEnum(String title) {
        this.title = title;
    }

    private String title;

    public String getTitle() {
        return title;
    }

    /**
     * 状态转换 toName
     *
     * @param value
     * @return
     */
    public static String convertToName(String value) {
        for (VideoTypeEnum e : VideoTypeEnum.values()) {
            if (Objects.equals(value.trim(), e.getTitle())) {
                return e.name();
            }
        }
        return null;
    }
}
