package org.bench4q.master.domain.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "MonitorResult")
public class MonitorResult  {
	private int id;
	private TestPlan testPlanDB;
	private String type;
	private String content;
	private String hostNameUnderMonitor;
	private Date createDatetime;
	private Monitor monitor;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id", nullable = false)
	public int getId() {
		return id;
	}

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

	@ManyToOne
	@JoinColumn(name = "testPlanRunId", nullable = false)
	public TestPlan getTestPlanDB() {
		return testPlanDB;
	}

	public void setTestPlanDB(TestPlan testPlan) {
		this.testPlanDB = testPlan;
	}

	@Column(name = "type", nullable = false)
	public String getType() {
		return type;
	}

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

	@Column(name = "content", columnDefinition = "LONGTEXT", nullable = false)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "hostNameUnderMonitor", nullable = false)
	public String getHostNameUnderMonitor() {
		return hostNameUnderMonitor;
	}

	public void setHostNameUnderMonitor(String hostNameUnderMonitor) {
		this.hostNameUnderMonitor = hostNameUnderMonitor;
	}

	@Column(name = "createDatetime", nullable = false)
	public Date getCreateDatetime() {
		return createDatetime;
	}

	public void setCreateDatetime(Date date) {
		this.createDatetime = date;
	}

	@ManyToOne
	@JoinColumn(name = "monitorId")
	public Monitor getMonitor() {
		return monitor;
	}

	public void setMonitor(Monitor monitor) {
		this.monitor = monitor;
	}

}
