package com.qmth.themis.business.enums;

import java.util.Objects;

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

    BEFORE("开考前"),

    AFTER("考试结束前");

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

    private String title;

    public String getTitle() {
        return title;
    }

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