package com.bocloud.ims.entity.resource;

import com.bocloud.common.utils.DateSerializer;
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 com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 作者 ymh
 * @version 创建时间：2018年12月17日 下午4:24:29 类说明 云主机 秘钥 关系表
 */
@Table("cloud_stack_event")
public class CloudStackEvent extends Generic {

	@PK(value = PKStrategy.AUTO)
	private Long id;// ID
	@Column("stack_id")
	private Long stackId;
	@Column("vendor_id")
	private Long vendorId;
	@JsonSerialize(using = DateSerializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column("event_time")
	private Date eventTime;// 事件时间

	@Column("reason")
	private String reason;
	@Column("local_reource_id")
	private String localReourceId;
	@Column("physical_resourc_id")
	private String physicalResourcId;
	@Column("resource_status")
	private String resourceStatus;
	@Column("resource_name")
	private String resourceName;
	@Column("event_id")
	private String eventId;

	public Long getId() {
		return id;
	}

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

	public Long getStackId() {
		return stackId;
	}

	public void setStackId(Long stackId) {
		this.stackId = stackId;
	}

	public Long getVendorId() {
		return vendorId;
	}

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

	public Date getEventTime() {
		return eventTime;
	}

	public void setEventTime(Date eventTime) {
		this.eventTime = eventTime;
	}

	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public String getLocalReourceId() {
		return localReourceId;
	}

	public void setLocalReourceId(String localReourceId) {
		this.localReourceId = localReourceId;
	}

	public String getPhysicalResourcId() {
		return physicalResourcId;
	}

	public void setPhysicalResourcId(String physicalResourcId) {
		this.physicalResourcId = physicalResourcId;
	}

	public String getResourceStatus() {
		return resourceStatus;
	}

	public void setResourceStatus(String resourceStatus) {
		this.resourceStatus = resourceStatus;
	}

	public String getResourceName() {
		return resourceName;
	}

	public void setResourceName(String resourceName) {
		this.resourceName = resourceName;
	}

	public String getEventId() {
		return eventId;
	}

	public void setEventId(String eventId) {
		this.eventId = eventId;
	}

}
