package cn.reghao.autodop.dmaster.app.db.query.config;

import cn.reghao.autodop.dmaster.app.model.po.config.AppConfig;
import cn.reghao.autodop.dmaster.app.model.po.config.build.CompilerConfig;
import cn.reghao.autodop.dmaster.app.model.po.config.build.PackerConfig;
import cn.reghao.autodop.dmaster.app.model.po.config.build.RepoAuthConfig;
import cn.reghao.jdkutil.db.BaseQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author reghao
 * @date 2021-06-02 15:01:18
 */
public interface AppConfigQuery extends BaseQuery<AppConfig> {
    List<AppConfig> query(Map<String, String> kv);
    AppConfig findByAppId(String appId);
    AppConfig findByIsDeleteFalseAndAppId(String appId);
    Page<AppConfig> findByEnv(String env, Pageable pageable);
    List<AppConfig> findAllByRepoAuthConfig(RepoAuthConfig repoAuthConfig);
    List<AppConfig> findAllByCompilerConfig(CompilerConfig compilerConfig);
    List<AppConfig> findAllByPackerConfig(PackerConfig packerConfig);
}
