package com.bocloud.ims.entity.resource;

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

import java.util.Date;

/**
 * 集群资源使用统计表
 * 
 * @author weiwei
 *
 */
@Table("cluster_usage")
public class ClusterUsage extends Generic {

	@PK(PKStrategy.AUTO)
	private Long id;// ID
	@Column("cluster_id")
	private Long clusterId;// 集群ID
	@Column("cpu")
	private Long cpu;// cpu使用
	@Column("mem")
	private Double mem;// 内存使用
	@Column("disk")
	private Double disk;// 存储使用
	@Column("instance")
	private Long instance;// 实例数
	@Column("date")
	private Date date;// 日期

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the clusterId
	 */
	public Long getClusterId() {
		return clusterId;
	}

	/**
	 * @param clusterId
	 *            the clusterId to set
	 */
	public void setClusterId(Long clusterId) {
		this.clusterId = clusterId;
	}

	/**
	 * @return the cpu
	 */
	public Long getCpu() {
		return cpu;
	}

	/**
	 * @param cpu
	 *            the cpu to set
	 */
	public void setCpu(Long cpu) {
		this.cpu = cpu;
	}

	/**
	 * @return the mem
	 */
	public Double getMem() {
		return mem;
	}

	/**
	 * @param mem
	 *            the mem to set
	 */
	public void setMem(Double mem) {
		this.mem = mem;
	}

	/**
	 * @return the disk
	 */
	public Double getDisk() {
		return disk;
	}

	/**
	 * @param disk
	 *            the disk to set
	 */
	public void setDisk(Double disk) {
		this.disk = disk;
	}

	/**
	 * @return the instance
	 */
	public Long getInstance() {
		return instance;
	}

	/**
	 * @param instance
	 *            the instance to set
	 */
	public void setInstance(Long instance) {
		this.instance = instance;
	}

	/**
	 * @return the date
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * @param date
	 *            the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	public ClusterUsage() {
		super();
	}

	public ClusterUsage(Long clusterId, Long cpu, Double mem, Double disk, Long instance, Date date) {
		super();
		this.clusterId = clusterId;
		this.cpu = cpu;
		this.mem = mem;
		this.disk = disk;
		this.instance = instance;
		this.date = date;
	}

}
