package com.fsd.hellovelo.repository;

import com.fsd.hellovelo.entity.EStatus;
import com.fsd.hellovelo.entity.User;

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

@Repository
public interface UserRepository extends JpaRepository<User, Long> {
    Optional<User> findByUsername(String username);
    Boolean existsByUsername(String username);
    Boolean existsByEmail(String email);
    Optional<User> findByStripeUserId(String stripeId);
    Optional<User> findByEmail(String email);
    List<User> findByStatus(EStatus eStatus);
}
