package com.qmth.themis.business.enums;

import java.util.Objects;

/**
 * @Description: 音频默认
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2022/8/30
 */
public enum AudioDefaultEnum {

    SYS("系统内置"),

    CUSTOM("自定义");

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

    private String title;

    public String getTitle() {
        return title;
    }

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