package com.yeejoin.amos.patrol.dao.entity;

import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the p_plan_task_detail database table.
 * 
 */
@Entity
@Table(name="p_plan_task_detail")
@NamedQuery(name="PlanTaskDetail.findAll", query="SELECT p FROM PlanTaskDetail p")
public class PlanTaskDetail extends BasicEntity {
	private static final long serialVersionUID = 1L;
	/**
	 * 是否完成：是否完成0-未完成，1-已完成，2-超时漏检
	 */
	@Column(name="is_finish")
	private int isFinish;
	/**
	 * 点编号
	 */
	@Column(name="point_id")
	private long pointId;
	/**
	 * 任务批次号
	 */
	@Column(name="task_no")
	private long taskNo;
	
	/**
	 * 具体执行人id
	 */
	@Column(name="executor_id")
	private String executorId;

	@Transient
	public String getName() {
		return name;
	}

	@Transient
	public String getPointNo() {
		return pointNo;
	}

	/**
	 * 点名称
	 */
	@Column(name="name")
	private String name;


	/**
	 * 点编号
	 */
	@Column(name="point_no")
	private String pointNo;
	
	/**
	 * 执行时间
	 */
	@Column(name="executor_date")
	private Date executorDate;
	
//	private PlanTask planTask;
	
	/**
	 * 状态：0 未开始；1 合格；2 不合格；3 漏检
	 */
	@Column(name="status")
	private String status="0";

	public PlanTaskDetail() {
	}


	public int getIsFinish() {
		return this.isFinish;
	}

	public void setIsFinish(int isFinish) {
		this.isFinish = isFinish;
	}

	public long getPointId() {
		return this.pointId;
	}

	public void setPointId(long pointId) {
		this.pointId = pointId;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPointNo(String pointNo) {
		this.pointNo = pointNo;
	}

	public long getTaskNo() {
		return this.taskNo;
	}

	public void setTaskNo(long taskNo) {
		this.taskNo = taskNo;
	}

//	@ManyToOne(fetch=FetchType.EAGER)
//	@JoinColumn(name = "taskNo", referencedColumnName = "id", updatable = false, insertable = false)
//	public PlanTask getPlanTask() {
//		return planTask;
//	}


//	public void setPlanTask(PlanTask planTask) {
//		this.planTask = planTask;
//	}


	public String getStatus() {
		return status;
	}


	public void setStatus(String status) {
		this.status = status;
	}
	

	public String getExecutorId() {
		return executorId;
	}

	public void setExecutorId(String executorId) {
		this.executorId = executorId;
	}

	public Date getExecutorDate() {
		return executorDate;
	}

	public void setExecutorDate(Date executorDate) {
		this.executorDate = executorDate;
	}
}