package org.jeecg.modules.weituo.common;

import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;

@Getter
public enum ShenheStatus {
    w("0", "未审核"),
    t("1", "审核通过"),

    j("2", "审核拒绝"),

    b("3", "保存"),

    ;


    ShenheStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }

    private  String code;
    private  String name;


    public static final String  getCode(String code) {
        if (StringUtils.isEmpty(code)) {
            return null;
        }
        return Arrays.stream(ShenheStatus.values()).filter(i -> code.equals(i.getCode())).map(i -> i.getName()).findFirst().orElse(null);
    }
}
