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;

/**
 * 存储mdisk
 *
 * @author luyanchao
 */
@Table("mdisk")
public class Mdisk extends GenericEntity {

    @PK(value = PKStrategy.AUTO)
    private Long id; //
    @Column("storage_id")
    private Long storageId; // 所属存储id
    @Column("controller_id")
    private Long controllerId; // 所属Raid卡的id
    @Column("storage_name")
    @IgnoreAll
    private String storageName; // 所属存储名称
    @Column("pool_id")
    private Long poolId; // 所属存储池id
    @Column("pool_name")
    @IgnoreAll
    private String poolName;
    @Column("mdisk_uuid")
    private String mdiskUuid; // 标识
    @Column("mode")
    private Integer mode; // 方式
    @Column("capacity")
    private Double capacity; // 容量
    @Column("raid_status")
    private Integer raidStatus; // RAID 状态
    @Column("raid_level")
    private String raidLevel; // RAID 级别
    @Column("disk_count")
    private Integer diskCount;
    @Column("redundancy")
    private Integer redundancy; // 冗余
    @Column("strip_size")
    private Integer stripSize; // 条带大小
    @Column("key_path")
    private String keyPath; // smis传参用
    @Column("operational_status")
    private String operationalStatus; // 运行状态
    @Column("free_capacity")
    private Double freeCapacity; // 空闲容量
    @Column("used_capacity")
    private Double usedCapacity; // 已分配容量
    @IgnoreAll
    private Boolean spare; // 自动配置备件
    @IgnoreAll
    private List<Disk> disks;//Mdisk下所属的硬盘
    @IgnoreAll
    private Double poolMaxCapacity; // 池可用的最大容量
    @IgnoreAll
    private Double poolMinCapacity; // 池可用的最小容量
    @IgnoreAll
    private String poolMessage; // 池信息

    public String getKeyPath() {
        return keyPath;
    }

    public void setKeyPath(String keyPath) {
        this.keyPath = keyPath;
    }

    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 Long getPoolId() {
        return poolId;
    }

    public void setPoolId(Long poolId) {
        this.poolId = poolId;
    }

    public Integer getMode() {
        return mode;
    }

    public void setMode(Integer mode) {
        this.mode = mode;
    }

    public Double getCapacity() {
        return capacity;
    }

    public void setCapacity(Double capacity) {
        this.capacity = capacity;
    }

    public Integer getRaidStatus() {
        return raidStatus;
    }

    public void setRaidStatus(Integer raidStatus) {
        this.raidStatus = raidStatus;
    }

    public String getRaidLevel() {
        return raidLevel;
    }

    public void setRaidLevel(String raidLevel) {
        this.raidLevel = raidLevel;
    }

    public Integer getRedundancy() {
        return redundancy;
    }

    public void setRedundancy(Integer redundancy) {
        this.redundancy = redundancy;
    }

    public Integer getStripSize() {
        return stripSize;
    }

    public void setStripSize(Integer stripSize) {
        this.stripSize = stripSize;
    }

    public String getPoolName() {
        return poolName;
    }

    public void setPoolName(String poolName) {
        this.poolName = poolName;
    }

    public Integer getDiskCount() {
        return diskCount;
    }

    public void setDiskCount(Integer diskCount) {
        this.diskCount = diskCount;
    }

    public String getStorageName() {
        return storageName;
    }

    public void setStorageName(String storageName) {
        this.storageName = storageName;
    }

    public String getMdiskUuid() {
        return mdiskUuid;
    }

    public void setMdiskUuid(String mdiskUuid) {
        this.mdiskUuid = mdiskUuid;
    }

    public Boolean getSpare() {
        return spare;
    }

    public void setSpare(Boolean spare) {
        this.spare = spare;
    }

    public Long getControllerId() {
        return controllerId;
    }

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

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

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

    public String getOperationalStatus() {
        return operationalStatus;
    }

    public void setOperationalStatus(String operationalStatus) {
        this.operationalStatus = operationalStatus;
    }

    public Double getFreeCapacity() {
        return freeCapacity;
    }

    public void setFreeCapacity(Double freeCapacity) {
        this.freeCapacity = freeCapacity;
    }

    public Double getUsedCapacity() {
        return usedCapacity;
    }

    public void setUsedCapacity(Double usedCapacity) {
        this.usedCapacity = usedCapacity;
    }

    public Double getPoolMaxCapacity() {
        return poolMaxCapacity;
    }

    public void setPoolMaxCapacity(Double poolMaxCapacity) {
        this.poolMaxCapacity = poolMaxCapacity;
    }

    public Double getPoolMinCapacity() {
        return poolMinCapacity;
    }

    public void setPoolMinCapacity(Double poolMinCapacity) {
        this.poolMinCapacity = poolMinCapacity;
    }

    public String getPoolMessage() {
        return poolMessage;
    }

    public void setPoolMessage(String poolMessage) {
        this.poolMessage = poolMessage;
    }
}
