@@ -20,5 +20,5 @@ public interface AuthTokenRepository extends JpaRepository<AuthToken, Long> {
|
||||
nativeQuery = true)
|
||||
Long findUserIdByToken(String token);
|
||||
Optional<AuthToken> findByUserIdAndIsActive(Long userId, boolean isActive);
|
||||
Optional<AuthToken> findByUserId(Long userId);
|
||||
List<AuthToken> findByUserId(Long userId);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package ru.soune.nocopy.repository;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import ru.soune.nocopy.entity.user.UserNotActive;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Repository
|
||||
public interface UserNotActiveRepository extends JpaRepository<UserNotActive, Long> {
|
||||
Optional<UserNotActive> findByUserId(Long userId);
|
||||
List<UserNotActive> findByBlockedUntilBefore(LocalDateTime now);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user