package com.sikey.wa04.business.infrastructure.repository;

import com.sikey.wa04.business.infrastructure.dto.model.DeviceBindModel;
import jakarta.validation.constraints.Size;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;

@Repository
public interface DeviceBindRepository extends JpaRepository<DeviceBindModel, Long> {
    DeviceBindModel findByChildId(@Size(max = 36) String childId);

    List<DeviceBindModel> findByDeviceId(Long deviceId);

    void deleteByDeviceId(Long deviceId);

    void deleteByChildIdIn(List<String> childIds);

}
