package cn.reghao.bnt.web.devops.app.model.vo;

import cn.reghao.bnt.web.devops.app.model.po.config.AppConfig;

/**
 * @author reghao
 * @date 2025-12-02 10:03:22
 */
public class AppConfigDetail {
    private String appId;
    private String appName;
    private String appType;
    private String env;
    private String appRepo;
    private String repoBranch;

    /* 构建配置 */
    private String projDirname;
    private String appRootPath;
    private String bindPorts;
    private String healthCheck;
    private String domains;

    // buildConfig
    private String repoAuthConfig;
    private String compilerConfig;
    private String packerConfig;
    private String dockerfile;

    public AppConfigDetail(AppConfig appConfig) {
        this.appId = appConfig.getAppId();
        this.appName = appConfig.getAppName();
        this.appType = appConfig.getAppType();
        this.env = appConfig.getEnv();
        this.appRepo = appConfig.getAppRepo();
        this.repoBranch = appConfig.getRepoBranch();
        this.appRootPath = appConfig.getAppRootPath();
        this.bindPorts = appConfig.getBindPorts();

        this.repoAuthConfig = appConfig.getRepoAuthConfig().getName();
        this.compilerConfig = appConfig.getCompilerConfig().getName();
        this.packerConfig = appConfig.getPackerConfig().getName();
        this.dockerfile = appConfig.getDockerfile();
    }
}
