package pl.polskalokalnie.lead;

import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;

public interface LeadRepository extends JpaRepository<Lead, Long> {

    Optional<Lead> findByUserId(Long userId);

    Optional<Lead> findFirstByEmailIgnoreCase(String email);

    Optional<Lead> findFirstByPhone(String phone);

    boolean existsByEmailIgnoreCase(String email);
}
