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_profile_hea")
public class HmdProfileHea extends HmdGenericEntity {
    @Column("profile_id")
    private Long profileId; // 概要文件id，关联hmd_profile表的id
    @Column("hea_id")
    private Long heaId; // 主机以太网适配器id，关联hmd_server_hea表的id
    @Column("logical_port_id")
    private Integer logicalPortId; // 逻辑端口id
    @Column("physical_port_id")
    private Integer physicalPortId; // 物理端口id
    @Column("port_group_id")
    private Integer portGroupId; // 端口组id
    @Column("allowed_vlan_ids")
    private String allowedVlanIds; // 允许的vlanId
    @Column("allowed_mac_addresses")
    private String allowedMacAddresses; // 允许的mac地址

    private HmdProfile profile; // 所属的概要文件
    private HmdServerHea hea; // 使用的hea

    public Long getProfileId() {
        return profileId;
    }

    public void setProfileId(Long profileId) {
        this.profileId = profileId;
    }

    public Long getHeaId() {
        return heaId;
    }

    public void setHeaId(Long heaId) {
        this.heaId = heaId;
    }

    public Integer getLogicalPortId() {
        return logicalPortId;
    }

    public void setLogicalPortId(Integer logicalPortId) {
        this.logicalPortId = logicalPortId;
    }

    public Integer getPhysicalPortId() {
        return physicalPortId;
    }

    public void setPhysicalPortId(Integer physicalPortId) {
        this.physicalPortId = physicalPortId;
    }

    public Integer getPortGroupId() {
        return portGroupId;
    }

    public void setPortGroupId(Integer portGroupId) {
        this.portGroupId = portGroupId;
    }

    public String getAllowedVlanIds() {
        return allowedVlanIds;
    }

    public void setAllowedVlanIds(String allowedVlanIds) {
        this.allowedVlanIds = allowedVlanIds;
    }

    public String getAllowedMacAddresses() {
        return allowedMacAddresses;
    }

    public void setAllowedMacAddresses(String allowedMacAddresses) {
        this.allowedMacAddresses = allowedMacAddresses;
    }

    public HmdProfile getProfile() {
        return profile;
    }

    public void setProfile(HmdProfile profile) {
        this.profile = profile;
    }

    public HmdServerHea getHea() {
        return hea;
    }

    public void setHea(HmdServerHea hea) {
        this.hea = hea;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(profileId, heaId);
    }
}

