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

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

/**
 * @author reghao
 * @date 2023-11-15 21:24:50
 */
public interface AppDeployingRepository extends JpaRepository<AppDeploying, Integer> {
    void deleteByAppConfig_AppId(String appId);

    AppDeploying findByAppConfig(AppConfig appConfig);
    AppDeploying findByAppConfig_AppId(String appId);
    Page<AppDeploying> findAllByAppConfig_EnvAndAppConfig_AppType(String env, String appType, Pageable pageable);
    AppDeploying findByBuildLog_buildLogId(String buildLogId);
}
