package cn.reghao.autodop.dmaster.machine.model.vo;

import cn.reghao.autodop.dmaster.machine.model.po.MachineHost;
import cn.reghao.autodop.dmaster.machine.model.po.MachineInfo;
import lombok.Data;

/**
 * @author reghao
 * @date 2020-10-19 15:02:59
 */
@Data
public class MachineHostVO {
    private String machineId;
    private String machineIpv4;
    private String bootTime;
    private String osArch;
    private String osName;
    private String osVersion;
    private String status;
    private String lastCheck;

    public MachineHostVO(MachineInfo machineInfo, MachineHost machineHost) {
        /*this.machineId = machineInfo.getMachineId();
        List<NetworkInfo> list = machineInfo.getNetworkInfos();
        if (!list.isEmpty()) {
            this.machineIpv4 = list.get(0).getIpv4();
        }
        this.bootTime = DateTimeConverter.format(machineInfo.getOsInfo().getBootTime());
        this.osArch = machineInfo.getOsInfo().getArch();
        this.osName = machineInfo.getOsInfo().getName();
        this.osVersion = machineInfo.getOsInfo().getVersion();
        this.status = machineHost.getStatus();
        this.lastCheck = DateTimeConverter.format(machineHost.getLastCheck());*/
    }
}
