package org.dromara.web.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 风险控制配置
 *
 * @author Pair-Programmer
 */
@Data
@Component
@ConfigurationProperties(prefix = "sys.risk")
public class RiskControlProperties {

    /**
     * 是否开启风险检测
     */
    private Boolean enabled = true;

    /**
     * 风险阈值 (0-100)
     */
    private Integer threshold = 60;

    /**
     * 异地登录权重
     */
    private Integer geoWeight = 50;

    /**
     * 新设备权重
     */
    private Integer deviceWeight = 30;

    /**
     * 非工作时间权重 (00:00-06:00)
     */
    private Integer timeWeight = 10;
}
