package kz.konturai.parser.repository;

import kz.konturai.parser.model.FacebookLead;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

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

@Repository
public interface FacebookLeadRepository extends MongoRepository<FacebookLead, String> {

    boolean existsByExternalCommentId(String externalCommentId);

    Optional<FacebookLead> findByExternalCommentId(String externalCommentId);

    List<FacebookLead> findByCallCenterSyncStatusInOrCallCenterSyncStatusIsNull(Collection<String> statuses);
}
