package com.honey.honey.repository;

import com.honey.honey.model.UserTaskClaim;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface UserTaskClaimRepository extends JpaRepository<UserTaskClaim, Long> {
    Optional<UserTaskClaim> findByUserIdAndTaskId(Integer userId, Integer taskId);
    List<UserTaskClaim> findByUserId(Integer userId);
    boolean existsByUserIdAndTaskId(Integer userId, Integer taskId);
    boolean existsByUserIdAndTaskIdIn(Integer userId, List<Integer> taskIds);
}




