package de.oaa.xxx.location.repository;

import de.oaa.xxx.location.entity.LocationAdminEntity;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface LocationAdminRepository extends JpaRepository<LocationAdminEntity, UUID> {

    List<LocationAdminEntity> findByLocationId(UUID locationId);
    Optional<LocationAdminEntity> findByLocationIdAndUserId(UUID locationId, UUID userId);
    boolean existsByLocationIdAndUserId(UUID locationId, UUID userId);
    void deleteByLocationId(UUID locationId);
    void deleteByLocationIdAndUserId(UUID locationId, UUID userId);
}
