package com.uas.platform.b2b.model;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 
 * @author XiaoST
 * @date   2015年10月30日14:13:46
 *
 */
@Table(name = "bar$package")
@Entity
public class BarPackage implements Serializable{
	private static final long serialVersionUID = 1L;

    /**
	 * 主键ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "pa_id")
	private Long id;
	
	@Column(name = "pa_prodcode")
	private String prodcode;
	
	/**
	 * 外箱号
	 */
	@Column(name = "pa_outboxcode")
	private String outboxcode;
	
	/**
	 * 打包日期
	 */
	@Column(name = "pa_packdate")
	private Date packdate;
	
	/**
	 * 包装箱层级
	 */
	@Column(name = "pa_level")
	private Long level;
	
	/**
	 * 箱内件数
	 */
	@Column(name = "pa_packageqty")
	private int packageqty;
	
	/**
	 * 箱内总数
	 */
	@Column(name = "pa_totalqty")
	private double totalqty;
	
	/**
	 * 明细
	 */
	@OneToMany(mappedBy = "barpackage", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE, CascadeType.MERGE }, fetch = FetchType.EAGER)
	private Set<BarPackageDetail> detail;
	
	@Column(name = "pa_makecode")
	private String makecode;
	
	@Column(name = "pa_status")
	private String status;
	
	@Column(name = "pa_indate")
	private Date indate;
	
	@Column(name = "pa_enUU")
	private Long enUU;
	
	/**
	 * 客户企业UU
	 */
	@Column(name = "pa_custuu")
	private Long custUU;
	
	@Column(name = "pa_sendstatus")
	private Short sendStatus;
	public Long getId() {
		return id;
	}

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

	public String getProdcode() {
		return prodcode;
	}

	public void setProdcode(String prodcode) {
		this.prodcode = prodcode;
	}

	public String getOutboxcode() {
		return outboxcode;
	}

	public void setOutboxcode(String outboxcode) {
		this.outboxcode = outboxcode;
	}

	public Date getPackdate() {
		return packdate;
	}

	public void setPackdate(Date packdate) {
		this.packdate = packdate;
	}

	public Long getLevel() {
		return level;
	}

	public void setLevel(Long level) {
		this.level = level;
	}

	public int getPackageqty() {
		return packageqty;
	}

	public void setPackageqty(int packageqty) {
		this.packageqty = packageqty;
	}

	public double getTotalqty() {
		return totalqty;
	}

	public void setTotalqty(double totalqty) {
		this.totalqty = totalqty;
	}

	public String getMakecode() {
		return makecode;
	}

	public void setMakecode(String makecode) {
		this.makecode = makecode;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getIndate() {
		return indate;
	}

	public void setIndate(Date indate) {
		this.indate = indate;
	}

	public Set<BarPackageDetail> getDetail() {
		return detail;
	}

	public void setDetail(Set<BarPackageDetail> detail) {
		this.detail = detail;
	}

	public Short getSendStatus() {
		return sendStatus;
	}

	public void setSendStatus(Short sendStatus) {
		this.sendStatus = sendStatus;
	}

	/**
	 * @return the enUU
	 */
	public Long getEnUU() {
		return enUU;
	}

	/**
	 * @param enUU the enUU to set
	 */
	public void setEnUU(Long enUU) {
		this.enUU = enUU;
	}

	public Long getCustUU() {
		return custUU;
	}

	public void setCustUU(Long custUU) {
		this.custUU = custUU;
	}	
	
}
