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_server_virtual_bridge")
public class HmdServerVirtualBridge extends HmdGenericEntity {
    @Column("server_id")
    private Long serverId; // 所属服务器id，对应hmd_server表的id字段
    @Column("name")
    private String name; // 名称
    @Column("uuid")
    private String uuid; // 唯一标识
    @Column("port_vlan_id")
    private Integer portVlanId; // 端口VLAN

    private HmdServer server; // 所属服务器

    public Long getServerId() {
        return serverId;
    }

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

    public String getName() {
        return name;
    }

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

    public String getUuid() {
        return uuid;
    }

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

    public Integer getPortVlanId() {
        return portVlanId;
    }

    public void setPortVlanId(Integer portVlanId) {
        this.portVlanId = portVlanId;
    }

    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;
        }
        HmdServerVirtualBridge that = (HmdServerVirtualBridge) o;
        return Objects.equals(uuid, that.uuid);
    }

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

