package com.tofly.gpsboot.common.system;

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

/**
 * 是否驳回
 * @author Zev
 */
@Getter
@AllArgsConstructor
public enum IsRejectedEnum {
    /**
     *
     */
    IS_REJECTED_NO("0","未驳回"),
    IS_REJECTED_YES("1","已驳回"),

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

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

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