package com.crm.custom.dao.repository;

import com.crm.rely.backend.dao.repository.BaseRepository;
import com.crm.rely.backend.model.pojo.table.GoldenRewardQuestionTable;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.stereotype.Repository;

import javax.persistence.LockModeType;
import java.util.List;

@Repository
public interface GoldenRewardQuestionRepository extends BaseRepository<GoldenRewardQuestionTable> {

    @Lock(LockModeType.PESSIMISTIC_WRITE)
    GoldenRewardQuestionTable findFirstById(Long id);

    List<GoldenRewardQuestionTable> findAllByIdIn(List<Long> ids);

    GoldenRewardQuestionTable getFirstById(Long id);


}
