package com.uas.platform.b2b.model;

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

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 代采企业的付款企业信息
 * 
 * @author hejq
 * @time 创建时间：2017年5月5日
 */
@Table(name = "purc$deputypaymentcompany")
@Entity
public class DeputyPaymentCompany implements Serializable {

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

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

	/**
	 * 归属于哪家代采企业（该uu不是付款企业uu，因为可能付款企业不是平台用户）
	 */
	@Column(name = "dpc_enuu")
	private Long enuu;
	
	/**
	 * 代采企业
	 */
	@OneToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE })
	@JoinColumn(name = "dpc_enuu", insertable = false, updatable = false)
	private Enterprise deputyEnterprise;

	/**
	 * 设置人uu
	 */
	@Column(name = "dpc_depuseruu")
	private Long depuseruu;

	@OneToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE })
	@JoinColumn(name = "dpc_depuseruu", insertable = false, updatable = false)
	private UserBaseInfo depuser;

	/**
	 * 付款企业名称（因付款企业可能不属于平台，未设置uu）
	 */
	@Column(name = "dpc_enname")
	private String enname;

	/**
	 * 付款企业地址
	 */
	@Column(name = "dpc_address")
	private String address;

	/**
	 * 联系人
	 */
	@Column(name = "dpc_user")
	private String user;

	/**
	 * 联系电话
	 */
	@Column(name = "dpc_usertel")
	private String usertel;

	/**
	 * 数据维护时间
	 */
	@Column(name = "dpc_date")
	private Date date;

	public Long getId() {
		return id;
	}

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

	public Long getEnuu() {
		return enuu;
	}

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

	public Enterprise getDeputyEnterprise() {
		return deputyEnterprise;
	}

	public void setDeputyEnterprise(Enterprise deputyEnterprise) {
		this.deputyEnterprise = deputyEnterprise;
	}

	public String getEnname() {
		return enname;
	}

	public void setEnname(String enname) {
		this.enname = enname;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getUsertel() {
		return usertel;
	}

	public void setUsertel(String usertel) {
		this.usertel = usertel;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Long getDepuseruu() {
		return depuseruu;
	}

	public void setDepuseruu(Long depuseruu) {
		this.depuseruu = depuseruu;
	}

	public UserBaseInfo getDepuser() {
		return depuser;
	}

	public void setDepuser(UserBaseInfo depuser) {
		this.depuser = depuser;
	}

}
