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

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

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

public interface BaseLockTemplateRepository extends JpaRepository<BaseLockTemplateEntity, UUID> {
    List<BaseLockTemplateEntity> findByOwner(UUID owner);
    List<BaseLockTemplateEntity> findByOwnerAndPublishedTrue(UUID owner);
    Page<BaseLockTemplateEntity> findByOwner(UUID owner, Pageable pageable);
    Page<BaseLockTemplateEntity> findByPublishedTrue(Pageable pageable);
    Page<BaseLockTemplateEntity> findByPublishedTrueAndNameContainingIgnoreCase(String name, Pageable pageable);
}
