package com.qmth.jkserver.enums;

/**
 * 登录状态
 * @author tianjun
 *
 */
public enum LoginStatus {

    OK("需要登录", 0),IGNORE("忽略登录状态", 1);

    private String name;

    private int id;

    private LoginStatus(String name, int id) {
        this.name = name;
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public int getId() {
        return id;
    }

    public static LoginStatus findById(int id) {
        for (LoginStatus status : LoginStatus.values()) {
            if (status.id == id) {
                return status;
            }
        }
        return null;
    }

}
