package ru.ulstu.user.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import ru.ulstu.user.model.UserSession;

import java.util.Date;
import java.util.List;

public interface UserSessionRepository extends JpaRepository<UserSession, Integer> {
    UserSession findOneBySessionId(String sessionId);

    List<UserSession> findAllByLogoutTimeIsNullAndLoginTimeBefore(Date date);
}
