package com.davos.assessment.user;

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

public interface UserRepository extends JpaRepository<AppUser, Long> {
  Optional<AppUser> findByEmailIgnoreCase(String email);
  boolean existsByEmailIgnoreCase(String email);
  List<AppUser> findByIdIn(List<Long> ids);
  List<AppUser> findByRoleInOrderByCreatedAtDesc(List<UserRole> roles);
}
