package cn.reghao.bnt.web.devops.app.db.repository.log;

import cn.reghao.bnt.web.devops.app.model.po.config.AppConfig;
import cn.reghao.bnt.web.devops.app.model.po.log.BuildLog;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author reghao
 * @date 2020-01-21 14:53:03
 */
public interface BuildLogRepository extends JpaRepository<BuildLog, String> {
    void deleteByBuildLogId(String buildLogId);
    void deleteByAppConfig_AppId(String appId);

    Page<BuildLog> findByAppConfig(AppConfig appConfig, Pageable pageable);
    List<BuildLog> findByAppConfig(AppConfig appConfig);
    BuildLog findByBuildLogId(String buildLogId);
}
