package com.tofly.gpsboot.common.system;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.util.StringUtils;

/**
 * 是否转移
 * @author Zev
 */
@Getter
@AllArgsConstructor
public enum IsTransferEnum {
    /**
     *
     */
    IS_TRANSFER_NORMAL("-1","正常"),
    IS_TRANSFER_APPLICATION_TRANSFER("5","申请转移"),
    IS_TRANSFER_BEEN_TRANSFERRED("6","已转移"),
    ;
    /**
     * 编码
     */
    private String code;
    /**
     * 内容
     */
    private String value;

    public static String getCodeForValue(String code) {
        String path = "";
        if (StringUtils.isEmpty(code)) {
            return path;
        }

        for (IsTransferEnum e : IsTransferEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                path = e.value;
                break;
            }
        }
        return path;
    }
}
