package de.oaa.xxx.games.chastity.cardlock;

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

import org.springframework.data.jpa.repository.JpaRepository;

public interface CardlockRepository extends JpaRepository<CardLockEntity, UUID> {

    List<CardLockEntity> findByLockee(UUID lockee);
    List<CardLockEntity> findByKeyholderAndUnlockTimeIsNull(UUID keyholder);
    boolean existsByLockeeAndStartTimeIsNotNullAndUnlockTimeIsNull(UUID lockee);
}
