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月23日
 */
@Entity
@Table(name = "mobile$workovertimedet")
public class WorkOvertimeDet implements Serializable {

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

	/**
	 * id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "wod_id")
	private Long wod_id;

	/**
	 * 部门编号
	 */
	@Column(name = "wod_detno")
	private Integer wod_detno;

	/**
	 * 人员编号
	 */
	@Column(name = "wod_empcode")
	private Long emcode;

	/**
	 * 姓名
	 */
	@Column(name = "wod_empname")
	private String wod_empname;

	/**
	 * 开始时间
	 */
	@Column(name = "wod_startdate")
	private Date wod_startdate;

	/**
	 * 结束时间
	 */
	@Column(name = "wod_enddate")
	private Date wod_enddate;

	/**
	 * 加班时长
	 */
	@Column(name = "wod_count")
	private Double wod_count;

	/**
	 * 主表
	 */
	@ManyToOne(cascade = CascadeType.ALL, optional = true)
	@JoinColumn(name = "wod_woid", nullable = false)
	private WorkOvertime workOvertime;

	public Long getWod_id() {
		return wod_id;
	}

	public void setWod_id(Long wod_id) {
		this.wod_id = wod_id;
	}

	public Integer getWod_detno() {
		return wod_detno;
	}

	public void setWod_detno(Integer wod_detno) {
		this.wod_detno = wod_detno;
	}

	public Long getEmcode() {
		return emcode;
	}

	public void setEmcode(Long emcode) {
		this.emcode = emcode;
	}

	public String getWod_empname() {
		return wod_empname;
	}

	public void setWod_empname(String wod_empname) {
		this.wod_empname = wod_empname;
	}

	public Date getWod_startdate() {
		return wod_startdate;
	}

	public void setWod_startdate(Date wod_startdate) {
		this.wod_startdate = wod_startdate;
	}

	public Date getWod_enddate() {
		return wod_enddate;
	}

	public void setWod_enddate(Date wod_enddate) {
		this.wod_enddate = wod_enddate;
	}

	public Double getWod_count() {
		return wod_count;
	}

	public void setWod_count(Double wod_count) {
		this.wod_count = wod_count;
	}

	@JsonIgnore
	@JSONField(serialize = false)
	public WorkOvertime getWorkOvertime() {
		return workOvertime;
	}

	public void setWorkOvertime(WorkOvertime workOvertime) {
		this.workOvertime = workOvertime;
	}

}
