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

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

import java.util.List;

@Repository
public interface GroupRepository extends JpaRepository<GroupModel, String> {
    GroupModel findByChildId(@Size(max = 36) @NotNull String childId, Limit limit);

    void deleteByChildId(String childId);

    List<GroupModel> findIdByChildIdIn(List<String> childIds);

}
