package com.gnx.telemedicine.repository;

import com.gnx.telemedicine.model.UserModel;
import com.gnx.telemedicine.model.enums.Role;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

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

@Repository
public interface UserRepository extends JpaRepository<UserModel, UUID> {
    Boolean existsByEmail(String email);
    Optional<UserModel> findByEmail(String email);
    void deleteByEmail(String email);
    List<UserModel> findByRole(Role role);
    Optional<UserModel> findByPasswordResetToken(String token);
}
