package de.oaa.xxx.user;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDate;
import java.util.List;
import java.util.Optional;
import java.util.UUID;

public interface UserRepository extends JpaRepository<UserEntity, UUID> {

    Optional<UserEntity> findByEmail(String email);
    Optional<UserEntity> findByName(String name);
    List<UserEntity> findByNameContainingIgnoreCase(String name);
    List<UserEntity> findByNameContainingIgnoreCase(String name, Pageable pageable);
    List<UserEntity> findByDatingAktiv(boolean datingAktiv);
    List<UserEntity> findByRegistrierungsdatumAfterOrderByRegistrierungsdatumDesc(LocalDate since);
}
