package com.bocloud.ims.entity.resource.hmc;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.Table;

import java.util.List;
import java.util.Objects;

@Table("hmd_server_hea")
public class HmdServerHea extends HmdGenericEntity {
    @Column("server_id")
    private Long serverId; // 所属服务器id，对应hmd_server表的id字段
    @Column("uuid")
    private String uuid; // 唯一标识
    @Column("adapter_id")
    private Integer adapterId; // 适配器id
    @Column("status")
    private String status; // 状态
    @Column("location_code")
    private String locationCode; // 物理位置码

    private List<HmdServerHeaLogicalPort> logicalPorts; // 逻辑端口
    private List<HmdServerHeaPhysicalPort> physicalPorts; // 物理端口

    private HmdServer server; // 所属服务器

    public Long getServerId() {
        return serverId;
    }

    public void setServerId(Long serverId) {
        this.serverId = serverId;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Integer getAdapterId() {
        return adapterId;
    }

    public void setAdapterId(Integer adapterId) {
        this.adapterId = adapterId;
    }

    public List<HmdServerHeaPhysicalPort> getPhysicalPorts() {
        return physicalPorts;
    }

    public void setPhysicalPorts(List<HmdServerHeaPhysicalPort> physicalPorts) {
        this.physicalPorts = physicalPorts;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public List<HmdServerHeaLogicalPort> getLogicalPorts() {
        return logicalPorts;
    }

    public void setLogicalPorts(List<HmdServerHeaLogicalPort> logicalPorts) {
        this.logicalPorts = logicalPorts;
    }

    public String getLocationCode() {
        return locationCode;
    }

    public void setLocationCode(String locationCode) {
        this.locationCode = locationCode;
    }

    public HmdServer getServer() {
        return server;
    }

    public void setServer(HmdServer server) {
        this.server = server;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        HmdServerHea that = (HmdServerHea) o;
        return Objects.equals(uuid, that.uuid);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uuid);
    }
}

