package com.huimv.receiver.farm.dao.repo;

import com.huimv.receiver.farm.dao.entity.SysCameraAreaEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface SysCameraAreaRepo extends JpaRepository<SysCameraAreaEntity, Integer>, JpaSpecificationExecutor<SysCameraAreaEntity> {

    @Query(nativeQuery = true,value = "SELECT * FROM sys_camera_area WHERE farm_id=?1")
    List<SysCameraAreaEntity> findByFarmId(String farmId);
}