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

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

/**
 * @author reghao
 * @date 2024-07-28 18:04:55
 */
@NoArgsConstructor
@Getter
public class AppConfigVO {
    private int id;
    private String appId;
    private String appName;
    private String appType;
    private String repoBranch;
    private String bindPorts;
    private int totalDeployNodes;
    private int totalDomains;
    private String packType;

    public AppConfigVO(AppConfig appConfig, int totalDeployNodes, int totalDomains) {
        this.id = appConfig.getId();
        this.appId = appConfig.getAppId();
        this.appName = appConfig.getAppName();
        this.appType = appConfig.getAppType();
        this.repoBranch = appConfig.getRepoBranch();
        this.bindPorts = appConfig.getBindPorts();
        this.totalDeployNodes = totalDeployNodes;
        this.totalDomains = totalDomains;
        this.packType = appConfig.getPackerConfig().getType();
    }
}
