package com.codvision.auth.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 登陆类型
 * @author hxl
 */
@Getter
@AllArgsConstructor
public enum LoginTypeEnum {

    AUTO_LOGIN(0, "免登"),
    SCAN_LOGIN(1,"扫码登陆");

    private Integer code;
    private String msg;


    public static boolean isExist(Integer code) {
        for (LoginTypeEnum loginTypeEnum : LoginTypeEnum.values()) {
            if (loginTypeEnum.getCode().equals(code)) {
                return true;
            }
        }
        return false;
    }

}
