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

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

import java.util.Objects;

@Table("hmd_vios_physical_fabric_adapter")
public class HmdViosPhysicalFabricAdapter extends HmdGenericEntity {
    @Column("vios_id")
    private Long viosId; // 所属vios的id，对应hmd_partition表的id字段
    @Column("name")
    private String name; // 名称
    @Column("location_code")
    private String locationCode; // 物理位置
    @Column("unique_device_id")
    private String uniqueDeviceId; // 设备唯一id
    @Column("wwpn")
    private String wwpn; // wwpn
    @Column("available_ports")
    private Integer availablePorts; // 可用端口数
    @Column("used_ports")
    private Integer usedPorts; // 已用端口数

    private HmdPartition vios; // 所属vios

    public Long getViosId() {
        return viosId;
    }

    public void setViosId(Long viosId) {
        this.viosId = viosId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLocationCode() {
        return locationCode;
    }

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

    public String getUniqueDeviceId() {
        return uniqueDeviceId;
    }

    public void setUniqueDeviceId(String uniqueDeviceId) {
        this.uniqueDeviceId = uniqueDeviceId;
    }

    public String getWwpn() {
        return wwpn;
    }

    public void setWwpn(String wwpn) {
        this.wwpn = wwpn;
    }

    public Integer getAvailablePorts() {
        return availablePorts;
    }

    public void setAvailablePorts(Integer availablePorts) {
        this.availablePorts = availablePorts;
    }

    public Integer getUsedPorts() {
        return usedPorts;
    }

    public void setUsedPorts(Integer usedPorts) {
        this.usedPorts = usedPorts;
    }

    public HmdPartition getVios() {
        return vios;
    }

    public void setVios(HmdPartition vios) {
        this.vios = vios;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(viosId, locationCode);
    }
}

