package com.ruoyi.common.third.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = LoginSecurityProperties.PREFIX)
public class LoginSecurityProperties {
    /**
     * 前缀
     */
    public static final String PREFIX = "third-switch.security";


    /**
     * 是否开启加密
     */
    private Boolean enable = Boolean.TRUE;
    /**
     * 最大登录数
     */
    private Integer maxAccount = -1;

    /**
     * 单个账户超出最大登录数时处理逻辑，start踢出最先登录的人，end当前登录人无法登录
     */
    private String displacement = "end";


    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Integer getMaxAccount() {
        return maxAccount;
    }

    public void setMaxAccount(Integer maxAccount) {
        this.maxAccount = maxAccount;
    }

    public String getDisplacement() {
        return displacement;
    }

    public void setDisplacement(String displacement) {
        this.displacement = displacement;
    }
}
