package com.palmnest.model.repair;

import java.io.Serializable;
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.Table;

/**
 * 维修单操作记录
 *
 * @author wangxz
 * <p>
 * 2018年5月7日
 */
@Entity
@Table(name = "tb_repair_operate_records")
public class RepairOperateRecord implements Serializable {

	/**
	 *
	 */
	private static final long serialVersionUID = 2145255166612536066L;

	private Long    id;
	private Integer operateType;//操作类型(1，抢单；2，转单；3，挂单；4，派单；5，完成)

	private Integer isConfirm ;//是否确认派单 0-待确定 1-确认

	private Long    repairBillId;// '维修单',
	private Long    userId;// '操作人',
	private String  description;            //操作描述
	private String  pendBillReason;      //挂单原因
	private String  expectedTime;      //挂单预计开始时间
	private String  detail;            //操作详情描述
	private String  creator;            //创建者
	private Date    createTime;        //创建日期

	public RepairOperateRecord() {

	}

	public RepairOperateRecord(Long repairBillId, String creator, Date createTime) {
		super();
		this.repairBillId = repairBillId;
		this.creator = creator;
		this.createTime = createTime;
	}

	public RepairOperateRecord(Long repairBillId, Long userId, String creator, Date createTime) {
		super();
		this.repairBillId = repairBillId;
		this.userId = userId;
		this.creator = creator;
		this.createTime = createTime;
	}

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

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

	@Column(name = "operate_type")
	public Integer getOperateType() {
		return operateType;
	}

	public void setOperateType(Integer operateType) {
		this.operateType = operateType;
	}

	@Column(name = "repair_bill_id")
	public Long getRepairBillId() {
		return repairBillId;
	}

	public void setRepairBillId(Long repairBillId) {
		this.repairBillId = repairBillId;
	}

	@Column(name = "description")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "user_id")
	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "creator")
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "pend_bill_reason")
	public String getPendBillReason() {
		return pendBillReason;
	}

	public void setPendBillReason(String pendBillReason) {
		this.pendBillReason = pendBillReason;
	}

	@Column(name = "expected_time")
	public String getExpectedTime() {
		return expectedTime;
	}

	public void setExpectedTime(String expectedTime) {
		this.expectedTime = expectedTime;
	}

	@Column(name = "detail")
	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}


	@Column(name = "is_confirm")
	public Integer getIsConfirm() {
		return isConfirm;
	}

	public void setIsConfirm(Integer isConfirm) {
		this.isConfirm = isConfirm;
	}
}
