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

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;

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

/**
 * 外勤详细表
 * 
 * @author hejq
 * @time 创建时间：2017年2月21日
 */
@Entity
@Table(name = "mobile$outplandetail")
public class OutPlanDetail implements Serializable {

	/**
	 * 序号
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "opd_id")
	private Long mpd_id;

	/**
	 * 编号
	 */
	@Column(name = "opd_code")
	private String mpd_code;

	/**
	 * 记录人编号
	 */
	@Column(name = "opd_recordercode")
	private Long recorderCode;
	
	/**
	 * 记录人
	 */
	@Column(name = "opd_recorder")
	private String mpd_recorder;

	/**
	 * 地点
	 */
	@Column(name = "opd_address")
	private String mpd_address;

	/**
	 * 类别
	 */
	@Column(name = "opd_kind")
	private String mpd_kind;
	
	/**
	 * 部门编号
	 */
	@Column(name = "opd_detno")
	private Integer mpd_detno;

	/**
	 * 其他拜访
	 */
	@Column(name = "opd_remark")
	private String mpd_remark;

	/**
	 * 位置
	 */
	@Column(name = "opd_location")
	private String mpd_location;

	/**
	 * 公司
	 */
	@Column(name = "opd_enuu")
	private Long enuu;

	/**
	 * 预计到达时间
	 */
	@Column(name = "opd_arrivedate")
	private Date mpd_arrivedate;

	/**
	 * 实际到达时间
	 */
	@Column(name = "opd_actdate")
	private Date mpd_actdate;

	/**
	 * 离开时间
	 */
	@Column(name = "opd_outdate")
	private Date mpd_outdate;

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

	/**
	 * 状态
	 */
	@Column(name = "opd_status")
	private String mpd_status;

	/**
	 * 状态码
	 */
	@Column(name = "opd_statuscode")
	private String mpd_statuscode;

	/**
	 * 距离
	 */
	@Column(name = "opd_distance")
	private Double mpd_distance;

	/**
	 * 经度
	 */
	@Column(name = "opd_longitude")
	private Double longitude;

	/**
	 * 纬度
	 */
	@Column(name = "opd_latitude")
	private Double latitude;

	/**
	 * 主表
	 */
	@ManyToOne(cascade = CascadeType.ALL, optional = true)
	@JoinColumn(name = "opd_opid", nullable = false)
	private OutPlan outPlan;

	/**
	 * 拜访企业名称
	 */
	@Column(name = "opd_company")
	private String mpd_company;

	/**
	 * 第一次签到时间
	 */
	@Column(name = "opd_firsttime")
	private Date mpd_firsttime;

	/**
	 * 最后一次签到时间
	 */
	@Column(name = "opd_lasttime")
	private Date mpd_lasttime;

	public Long getMpd_id() {
		return mpd_id;
	}

	public void setMpd_id(Long mpd_id) {
		this.mpd_id = mpd_id;
	}

	public String getMpd_code() {
		return mpd_code;
	}

	public void setMpd_code(String mpd_code) {
		this.mpd_code = mpd_code;
	}

	public Long getRecorderCode() {
		return recorderCode;
	}

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

	public String getMpd_recorder() {
		return mpd_recorder;
	}

	public void setMpd_recorder(String mpd_recorder) {
		this.mpd_recorder = mpd_recorder;
	}

	public String getMpd_address() {
		return mpd_address;
	}

	public void setMpd_address(String mpd_address) {
		this.mpd_address = mpd_address;
	}

	public String getMpd_kind() {
		return mpd_kind;
	}

	public void setMpd_kind(String mpd_kind) {
		this.mpd_kind = mpd_kind;
	}

	public String getMpd_remark() {
		return mpd_remark;
	}

	public void setMpd_remark(String mpd_remark) {
		this.mpd_remark = mpd_remark;
	}

	public String getMpd_location() {
		return mpd_location;
	}

	public void setMpd_location(String mpd_location) {
		this.mpd_location = mpd_location;
	}

	public Long getEnuu() {
		return enuu;
	}

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

	public Date getMpd_arrivedate() {
		return mpd_arrivedate;
	}

	public void setMpd_arrivedate(Date mpd_arrivedate) {
		this.mpd_arrivedate = mpd_arrivedate;
	}

	public Date getMpd_actdate() {
		return mpd_actdate;
	}

	public void setMpd_actdate(Date mpd_actdate) {
		this.mpd_actdate = mpd_actdate;
	}

	public Date getMpd_outdate() {
		return mpd_outdate;
	}

	public void setMpd_outdate(Date mpd_outdate) {
		this.mpd_outdate = mpd_outdate;
	}

	public Date getMpd_recorddate() {
		return mpd_recorddate;
	}

	public void setMpd_recorddate(Date mpd_recorddate) {
		this.mpd_recorddate = mpd_recorddate;
	}

	public String getMpd_status() {
		return mpd_status;
	}

	public void setMpd_status(String mpd_status) {
		this.mpd_status = mpd_status;
	}

	@JsonIgnore
	@JSONField(serialize = false)
	public OutPlan getOutPlan() {
		return outPlan;
	}

	public void setOutPlan(OutPlan outPlan) {
		this.outPlan = outPlan;
	}

	public String getMpd_statuscode() {
		return mpd_statuscode;
	}

	public void setMpd_statuscode(String mpd_statuscode) {
		this.mpd_statuscode = mpd_statuscode;
	}

	public Integer getMpd_detno() {
		return mpd_detno;
	}

	public void setMpd_detno(Integer mpd_detno) {
		this.mpd_detno = mpd_detno;
	}

	public Double getMpd_distance() {
		return mpd_distance;
	}

	public void setMpd_distance(Double mpd_distance) {
		this.mpd_distance = mpd_distance;
	}

	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}

	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}

	public String getMpd_company() {
		return mpd_company;
	}

	public void setMpd_company(String mpd_company) {
		this.mpd_company = mpd_company;
	}

	public Date getMpd_firsttime() {
		return mpd_firsttime;
	}

	public void setMpd_firsttime(Date mpd_firsttime) {
		this.mpd_firsttime = mpd_firsttime;
	}

	public Date getMpd_lasttime() {
		return mpd_lasttime;
	}

	public void setMpd_lasttime(Date mpd_lasttime) {
		this.mpd_lasttime = mpd_lasttime;
	}

}
