package cn.reghao.autodop.dmaster.machine.db.repository;

import cn.reghao.autodop.dmaster.machine.model.po.MachineHost;
import cn.reghao.autodop.dmaster.machine.model.po.MachineInfo;
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;

import java.util.List;

/**
 * @author reghao
 * @date 2020-01-21 14:53:03
 */
public interface MachineHostRepository
        extends JpaRepository<MachineHost, Integer>, JpaSpecificationExecutor<MachineHost> {
    MachineHost findByMachineId(String machineId);
    MachineHost findByMachineIpv4(String machineIpv4);
    Page<MachineHost> findByEnv(String env, Pageable pageable);
    Page<MachineHost> findByIsDeleteFalse(Pageable pageable);
    List<MachineHost> findByEnv(String env);
}
