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


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.meta.PKStrategy;
import com.bocloud.ims.entity.resource.Disk;
import com.bocloud.ims.entity.resource.Mdisk;

import java.util.List;

/**
 * 物理机的pci信息
 *
 * @author lkx007
 */
@Table("server_raid_ctrl")
public class ServerRaidCtrl {

    @PK(value = PKStrategy.AUTO)
    private Long id; // ID
    @Column("server_id")
    private Long serverId; // 服务器ID
    @Column("pci_id")
    private Long pciId;
    /**
     * 控制器id
     */
    @Column("controller_id")
    private Integer controllerId;

    /**
     * 控制器的类型
     * <p>
     * SAS2 , SAS3, HPSA
     */
    @Column("type")
    private String type;
    /**
     * 控制器支持的raid工具目录
     * （绝对路径）
     */
    @Column("path")
    private String path;

    /**
     * 该控制器上的磁盘驱动信息
     */
    @IgnoreAll
    private List<Disk> disks;
    @IgnoreAll
    private List<Mdisk> diskGroups;
    @IgnoreAll
    private ServerPci serverPci;
    /**
     * 型号
     */
    @Column("model")
    private String model;
    /**
     * 序列号
     */
    @Column("sn")
    private String sn;
    /**
     * "SAS Address": "5c81f660e918cb00",
     */
    @Column("sas_address")
    private String sasAddress;
    /**
     * "PCI Address": "00:41:00:00",
     */
    @Column("pci_address")
    private String pciAddress;

    public Long getId() {
        return id;
    }

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

    public Long getServerId() {
        return serverId;
    }

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

    public Long getPciId() {
        return pciId;
    }

    public void setPciId(Long pciId) {
        this.pciId = pciId;
    }

    public Integer getControllerId() {
        return controllerId;
    }

    public void setControllerId(Integer controllerId) {
        this.controllerId = controllerId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public List<Disk> getDisks() {
        return disks;
    }

    public void setDisks(List<Disk> disks) {
        this.disks = disks;
    }

    public List<Mdisk> getDiskGroups() {
        return diskGroups;
    }

    public void setDiskGroups(List<Mdisk> diskGroups) {
        this.diskGroups = diskGroups;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getSasAddress() {
        return sasAddress;
    }

    public void setSasAddress(String sasAddress) {
        this.sasAddress = sasAddress;
    }

    public String getPciAddress() {
        return pciAddress;
    }

    public void setPciAddress(String pciAddress) {
        this.pciAddress = pciAddress;
    }

    public ServerPci getServerPci() {
        return serverPci;
    }

    public void setServerPci(ServerPci serverPci) {
        this.serverPci = serverPci;
    }
}
