package com.xhpc.evcs.jpa;

import com.xhpc.evcs.domain.XhpcStationInternetBlacklist;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.query.QueryByExampleExecutor;
import org.springframework.stereotype.Repository;

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

@Repository
public interface XhpcStationInternetBlacklistRepository extends JpaRepository<XhpcStationInternetBlacklist, Long>,
        QueryByExampleExecutor<XhpcStationInternetBlacklist>, JpaSpecificationExecutor<XhpcStationInternetBlacklist> {


    Optional<XhpcStationInternetBlacklist> findByChargingStationIdAndInternetUserId(Long stationId, Long internetUserId);

    List<XhpcStationInternetBlacklist> findByInternetUserId(Long internetUserId);

}
