package com.qmth.qrzk.repository.task;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.qmth.qrzk.repository.service.query.QueryParams;
import com.qmth.qrzk.repository.utils.Consts;
import com.qmth.qrzk.repository.utils.Consts.TaskBatchType;

/**
 * 任务批次
 * @author 马涛 2015-03-30
 *
 */
public class TaskBatch extends QueryParams{
	private Integer id;
	private String name;
	private String batchType;

	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date planStartTime;//计划开工时间
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date planEndTime;//计划结束时间
	private Integer createdBy;
	private Date createdTime;
	private Integer updatedBy;
	private Date updatedTime;
	private String guid;
	
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getBatchType() {
		return batchType;
	}
	public String getBatchTypeLabel() {
		return TaskBatchType.dicMap.get(batchType);
	}
	public void setBatchType(String batchType) {
		this.batchType = batchType;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getPlanStartTime() {
		return planStartTime;
	}
	public void setPlanStartTime(Date planStartTime) {
		this.planStartTime = planStartTime;
	}
	public Date getPlanEndTime() {
		return planEndTime;
	}
	public void setPlanEndTime(Date planEndTime) {
		this.planEndTime = planEndTime;
	}
	public Integer getCreatedBy() {
		return createdBy;
	}
	public void setCreatedBy(Integer createdBy) {
		this.createdBy = createdBy;
	}
	public Date getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(Date createdTime) {
		this.createdTime = createdTime;
	}
	public Integer getUpdatedBy() {
		return updatedBy;
	}
	public void setUpdatedBy(Integer updatedBy) {
		this.updatedBy = updatedBy;
	}
	public Date getUpdatedTime() {
		return updatedTime;
	}
	public void setUpdatedTime(Date updatedTime) {
		this.updatedTime = updatedTime;
	}
	public TaskBatch(Integer id, String name, Date planStartTime,
			Date planEndTime, Integer createdBy, Date createdTime,
			Integer updatedBy, Date updatedTime) {
		super();
		this.id = id;
		this.name = name;
		this.planStartTime = planStartTime;
		this.planEndTime = planEndTime;
		this.createdBy = createdBy;
		this.createdTime = createdTime;
		this.updatedBy = updatedBy;
		this.updatedTime = updatedTime;
	}
	public TaskBatch() {
		super();
		// TODO Auto-generated constructor stub
	}
	public TaskBatch(String name, Date planStartTime, Date planEndTime) {
		super();
		this.name = name;
		this.planStartTime = planStartTime;
		this.planEndTime = planEndTime;
	}
	public TaskBatch(Integer id, String name) {
		super();
		this.id = id;
		this.name = name;
	}
	
	public String getBatchTypeName(){
		return Consts.TaskBatchType.dicMap.get(this.batchType);
	}
	
}
