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_virtual_fabric_adapter_wwpn")
public class HmdVirtualFabricAdapterWwpn extends HmdGenericEntity {
    @Column("adapter_id")
    private Long adapterId; // 适配器id，关联hmd_virtual_fabric_adapter的id字段
    @Column("wwpn")
    private String wwpn; // wwpn
    @Column("status")
    private String status; // 端口状态
    @Column("login")
    private String login; // 登录状态
    @Column("reason")
    private String reason; // 原因

    private HmdVirtualFabricAdapter fabricAdapter; // 所属虚拟光纤适配器

    public Long getAdapterId() {
        return adapterId;
    }

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

    public String getWwpn() {
        return wwpn;
    }

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

    public String getStatus() {
        return status;
    }

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

    public String getLogin() {
        return login;
    }

    public void setLogin(String login) {
        this.login = login;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public HmdVirtualFabricAdapter getFabricAdapter() {
        return fabricAdapter;
    }

    public void setFabricAdapter(HmdVirtualFabricAdapter fabricAdapter) {
        this.fabricAdapter = fabricAdapter;
    }

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

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

