package cn.reghao.bnt.web.devops.machine.db.repository;

import cn.reghao.bnt.web.devops.machine.model.po.MachineHost;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * @author reghao
 * @date 2020-01-21 14:53:03
 */
public interface MachineHostRepository extends JpaRepository<MachineHost, Integer>, JpaSpecificationExecutor<MachineHost> {
    void deleteByMachineId(String machineId);

    MachineHost findByMachineId(String machineId);
    Page<MachineHost> findByEnv(String env, Pageable pageable);
}
