package com.tofly.gpsboot.common.system;

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

/**
 * 签到标识
 * @author Zev
 */
@Getter
@AllArgsConstructor
public enum SignFlagEnum {
    /**
     *
     */
    SIGN_FLAG_GPS("0","gps获取"),
    SIGN_FLAG_MANUAL("1","手动获取"),

    ;
    /**
     * 编码
     */
    private String code;
    /**
     * 内容
     */
    private String value;

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

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