package com.qmth.teachcloud.common.enums.userPush;

import java.util.Objects;

/**
 * @Description: 用户推送轨迹枚举
 * @Author: CaoZixuan
 * @Date: 2021-11-04
 */
public enum UserPushTrackEnum {
    BIND("绑定"),
    UNBIND("解绑"),
    ;

    UserPushTrackEnum(String desc) {
        this.desc = desc;
    }

    private final String desc;

    public String getDesc() {
        return desc;
    }

    /**
     * 状态转换 toName
     *
     * @param desc desc
     * @return 名称
     */
    public static String convertToName(String desc) {
        for (UserPushTrackEnum e : UserPushTrackEnum.values()) {
            if (Objects.equals(desc, e.getDesc())) {
                return e.name();
            }
        }
        return null;
    }
}
