package com.tofly.gpsboot.common.system;

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

/**
 * 审核状态
 * @author Zev
 */
@Getter
@AllArgsConstructor
public enum AuditSateEnum {
    /**
     *
     */
    AUDIT_UNCOMMITTED("0","未审核"),
    AUDIT_YES("1","通过"),
    AUDIT_NO("2","不通过"),
    AUDIT_NOT_DISPOSE("3","不可审批")
    ;
    /**
     * 编码
     */
    private String code;
    /**
     * 内容
     */
    private String value;
    public static String getCodeForValue(String code) {
        String path = "";
        if (StringUtils.isEmpty(code)) {
            return path;
        }

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