package com.uas.platform.b2b.mobile.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;

/**
 * 外勤设置
 * 
 * @author hejq
 * @time 创建时间：2017年2月21日
 */
@Entity
@Table(name = "mobile$outplan")
public class OutPlan implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "op_id")
	private Long mp_id;
	
	/**
	 * 记录人
	 */
	@Column(name = "op_recorder")
	private String mp_recorder;
	
	/**
	 * 记录人编号
	 */
	@Column(name = "op_recordercode")
	private Long recorderCode;

	/**
	 * 外勤编号
	 */
	@Column(name = "op_code")
	private String mp_code;

	/**
	 * 外勤地点
	 */
	@Column(name = "op_address")
	private String mp_address;

	/**
	 * 访问时间
	 */
	@Column(name = "op_visittime")
	private Date mp_visittime;

	/**
	 * 外勤明细
	 */
	@OneToMany(mappedBy = "outPlan", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE,
			CascadeType.MERGE }, fetch = FetchType.EAGER)
	@OrderBy("mpd_id")
	private Set<OutPlanDetail> outPlanDetails;

	/**
	 * 企业uu
	 */
	@Column(name = "op_enuu")
	private Long enuu;

	/**
	 * 记录时间
	 */
	@Column(name = "op_recorddate")
	private Date mp_recorddate;

	/**
	 * 到达时间
	 */
	@Column(name = "op_arrivedate")
	private Date mp_arrivedate;

	public Long getMp_id() {
		return mp_id;
	}

	public void setMp_id(Long mp_id) {
		this.mp_id = mp_id;
	}

	public String getMp_recorder() {
		return mp_recorder;
	}

	public void setMp_recorder(String mp_recorder) {
		this.mp_recorder = mp_recorder;
	}

	public Long getRecorderCode() {
		return recorderCode;
	}

	public void setRecorderCode(Long recorderCode) {
		this.recorderCode = recorderCode;
	}

	public String getMp_code() {
		return mp_code;
	}

	public void setMp_code(String mp_code) {
		this.mp_code = mp_code;
	}

	public String getMp_address() {
		return mp_address;
	}

	public void setMp_address(String mp_address) {
		this.mp_address = mp_address;
	}

	public Date getMp_visittime() {
		return mp_visittime;
	}

	public void setMp_visittime(Date mp_visittime) {
		this.mp_visittime = mp_visittime;
	}

	public Set<OutPlanDetail> getOutPlanDetails() {
		return outPlanDetails;
	}

	public void setOutPlanDetail(Set<OutPlanDetail> outPlanDetails) {
		this.outPlanDetails = outPlanDetails;
	}

	public Long getEnuu() {
		return enuu;
	}

	public void setEnuu(Long enuu) {
		this.enuu = enuu;
	}

	public Date getMp_recorddate() {
		return mp_recorddate;
	}

	public void setMp_recorddate(Date mp_recorddate) {
		this.mp_recorddate = mp_recorddate;
	}

	public Date getMp_arrivedate() {
		return mp_arrivedate;
	}

	public void setMp_arrivedate(Date mp_arrivedate) {
		this.mp_arrivedate = mp_arrivedate;
	}

	public void setOutPlanDetails(Set<OutPlanDetail> outPlanDetails) {
		this.outPlanDetails = outPlanDetails;
	}
}
