package com.bocloud.ims.entity.resource;

import com.bocloud.entity.annotations.Column;
import com.bocloud.entity.annotations.IgnoreAll;
import com.bocloud.entity.annotations.PK;
import com.bocloud.entity.annotations.Table;
import com.bocloud.entity.bean.GenericEntity;
import com.bocloud.entity.meta.PKStrategy;

import java.util.List;

/**
 * 存储iSCSI端口
 * @author luyanchao
 */

@Table("storage_iscsi_port")
public class StorageIScsiPort extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id; //
    @Column("vendor_id")
    private Long vendorId; // 所属平台
    @Column("storage_id")
    private Long storageId; // 所属存储
    @Column("port_uuid")
    private String portUuid; // uuid
    @Column("acl")
    private Boolean acl; // 是否开启ACL过滤
    @Column("session_count")
    private Integer sessionCount; // session数量

    @IgnoreAll
    private List<Server> gateways;
    @IgnoreAll
    private List<StorageHost> hosts;
    @IgnoreAll
    private List<Volume> volumes;
    @IgnoreAll
    private List<Long> gatewayIds;

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public String getPortUuid() {
        return portUuid;
    }

    public void setPortUuid(String portUuid) {
        this.portUuid = portUuid;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getStorageId() {
        return storageId;
    }

    public void setStorageId(Long storageId) {
        this.storageId = storageId;
    }

    public Boolean getAcl() {
        return acl;
    }

    public void setAcl(Boolean acl) {
        this.acl = acl;
    }

    public Integer getSessionCount() {
        return sessionCount;
    }

    public void setSessionCount(Integer sessionCount) {
        this.sessionCount = sessionCount;
    }

    public List<Server> getGateways() {
        return gateways;
    }

    public void setGateways(List<Server> gateways) {
        this.gateways = gateways;
    }

    public List<StorageHost> getHosts() {
        return hosts;
    }

    public void setHosts(List<StorageHost> hosts) {
        this.hosts = hosts;
    }

    public List<Volume> getVolumes() {
        return volumes;
    }

    public void setVolumes(List<Volume> volumes) {
        this.volumes = volumes;
    }

    public List<Long> getGatewayIds() {
        return gatewayIds;
    }

    public void setGatewayIds(List<Long> gatewayIds) {
        this.gatewayIds = gatewayIds;
    }
}
