package org.springblade.system.service;


import org.springblade.common.core.domain.R;
import org.springblade.common.core.domain.entity.SysIpWhitelist;

import java.util.Date;
import java.util.List;

/**
 * @className:ISysIpWhitelistService
 * @author:cwchen
 * @date:2025-09-09-14:49
 * @version:1.0
 * @description:白名单配置
 */
public interface ISysIpWhitelistService {

    List<SysIpWhitelist> getAllEnabledWhitelist();
    boolean isIpAllowed(String ip, Date currentTime);
    void refreshCache();

    List<SysIpWhitelist> selectSysIpWhitelistList(SysIpWhitelist sysIpWhitelist);

    R selectSysIpWhitelistById(Long id);

    R insertSysIpWhitelist(SysIpWhitelist sysIpWhitelist);

    R updateSysIpWhitelist(SysIpWhitelist sysIpWhitelist);

    R deleteSysIpWhitelistByIds(String id);

    R updateSysIpWhitelistStatus(SysIpWhitelist sysIpWhitelist);
}
