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

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

import java.util.List;

@Repository
public interface ChildFenceRepository extends JpaRepository<ChildFenceModel, Long> {
    List<ChildFenceModel> findByChildId(@Size(max = 36) @NotNull String childId);

    List<ChildFenceModel> findNotDisableByChildIdAndState(@Size(max = 36) @NotNull String childId, Boolean state);

    void deleteByChildIdIn(List<String> childIds);
}
