package com.xhpc.evcs.jpa;

import com.xhpc.evcs.domain.XhpcChargingPile;
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.Optional;

@Repository
public interface XhpcChargingPileRepository extends JpaRepository<XhpcChargingPile, String>,
        QueryByExampleExecutor<XhpcChargingPile>, JpaSpecificationExecutor<XhpcChargingPile> {

    /**
     * 通过桩的序列号来查询查询指定的桩的信息
     *
     * @param pileNum 桩的序列号
     * @return 返回一条桩数据
     */
    Optional<XhpcChargingPile> findBySerialNumber(String pileNum);

}
