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

import cn.reghao.bnt.web.devops.app.model.po.config.AppDeployConfig;
import lombok.Data;

/**
 * 应用部署配置
 *
 * @author reghao
 * @date 2020-05-13 16:59:20
 */
@Data
public class AppDeployConfigVO {
    private Integer appDeployConfigId;
    private String appId;
    private String appName;
    private String machineId;
    private String machineIpv4;
    private String packType;
    private String startScript;
    private String unpackScript;
    private String startHome;

    public AppDeployConfigVO(AppDeployConfig appDeployConfig) {
        this.appDeployConfigId = appDeployConfig.getId();
        this.appId = appDeployConfig.getAppConfig().getAppId();
        this.appName = appDeployConfig.getAppConfig().getAppName();
        this.machineId = appDeployConfig.getMachineHost().getMachineId();
        this.machineIpv4 = appDeployConfig.getMachineHost().getMachineIpv4();
        this.packType = appDeployConfig.getAppConfig().getPackerConfig().getType();
        this.startScript = appDeployConfig.getStartScript();
        this.unpackScript = appDeployConfig.getUnpackScript();
        this.startHome = appDeployConfig.getStartHome();
    }
}
