package com.njzscloud.common.security.contant;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 字典代码：client_code
 * 字典名称：客户端代码
 */
@Getter
@RequiredArgsConstructor
public enum ClientCode {
    pc(1),
    wx_app(2),
    app(4);

    private final int permission;

    /**
     * 检查是否有登录权限
     */
    public boolean hasPermission(int permission) {
        return !((this.permission & permission) == this.permission);
    }
}


