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

import cn.reghao.autodop.dmaster.app.model.po.AppRunning;
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 2021-05-24 15:20:24
 */
public interface AppRunningRepository extends JpaRepository<AppRunning, Integer>, JpaSpecificationExecutor<AppRunning> {
    List<AppRunning> findByAppId(String appId);
    AppRunning findByAppIdAndMachineId(String appId, String machineId);
    Page<AppRunning> findAllByEnv(String env, Pageable pageable);
}
