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

public enum UserLoginStateEnum {

    UNREGISTER(0, "已注册未完善"),
    PASS(1, "已注册已通过"),
    REJECT(2, "已注册已驳回"),
    UNCHECK(3, "已注册完善信息"),
    DISABLE(4, "已禁用"),
    NO_SLAUGHTER(5, "代宰户无挂靠屠宰场"),
    DELETED(6, "已注销")
    ;
    private int code;
    private String text;

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

    public int getCode() {
        return code;
    }

    public String getText() {
        return text;
    }

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

}
