package com.psg.dlsysinfo.dl_sysinfo_server.repository;

import com.psg.dlsysinfo.dl_sysinfo_server.entity.Devices;
import com.psg.dlsysinfo.dl_sysinfo_server.entity.IpAddress;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface IpAddressRepository extends JpaRepository<IpAddress, Long> {
    List<IpAddress> findByDeviceDeviceId(Long deviceId);

    // 🔧 Add this to enable deletion by device
    void deleteByDevice(Devices device);
}
