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

import cn.reghao.bnt.web.devops.app.model.po.AppBuilding;
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 AppBuildingRepository extends JpaRepository<AppBuilding, Integer> {
    void deleteByAppConfig_AppId(String appId);

    Page<AppBuilding> findAllByAppConfig_EnvAndAppConfig_AppType(String env, String type, Pageable pageable);
    Page<AppBuilding> findAllByAppConfig_AppName(String appName, Pageable pageable);
    AppBuilding findAllByAppConfig_AppId(String appId);
    Page<AppBuilding> findAllByOnBuildingIsTrue(Pageable pageable);
}
