package org.springblade.modules.app.common.enums;

public enum UserStateEnum {

    UNCHECK(0, "未审核"),
    PASS(1, "启用"),
    REJECT(-1, "禁用"),
    ;
    private int code;
    private String text;

    UserStateEnum(int code, String text) {
        this.code = code;
        this.text = text;
    }

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

    public static UserStateEnum findByCode(int code) {
        for (UserStateEnum demoEnum : values()) {
            if (code == demoEnum.getCode()) {
                return demoEnum;
            }
        }
        return null;
    }

}
