package com.uas.platform.b2b.model;

import org.hibernate.annotations.Where;

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

/**
 * ...
 */
@Entity
@Where(clause = "pabo_checkstatus = '未开票' ")
@Table(name = "purc$apbillout")
public class PurchaseApBillOutTodo implements Serializable {

	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1L;

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

	/**
	 * 税金合计
	 */
	@Column(name = "pabo_taxsum")
	private Double taxSum;

	/**
	 * 税金差异
	 */
	@Column(name = "pabo_differ")
	private Double differ;

	/**
	 * 录单日期
	 */
	@Column(name = "pabo_recorddate")
	private Date recordDate;

	/**
	 * 录单人
	 */
	@Column(name = "pabo_recorder")
	private String recorder;


	/**
	 * 开票状态
	 */
	@Column(name = "pabo_checkstatus")
	private String checkStatus;

	/**
	 * 备注
	 */
	@Column(name = "pabo_remark")
	private String remark;

	/**
	 * 提交日期
	 */
	@Column(name = "pabo_auditdate")
	private Date auditDate;

	/**
	 * 作废日期
	 */
	@Column(name = "pabo_resdate")
	private Date resDate;

	/**
	 * 作废人
	 */
	@Column(name = "pabo_resman")
	private String resMan;

	/**
	 * 状态
	 */
	@Column(name = "pabo_status")
	private Short status;

	/**
	 * 开票金额
	 */
	@Column(name = "pabo_amount")
	private Double amount;

	/**
	 * 已付款金额
	 */
	@Column(name = "pabo_payamount")
	private Double payAmount;

	/**
	 * 币别
	 */
	@Column(name = "pabo_currency")
	private String currency;

	/**
	 * 汇率
	 */
	@Column(name = "pabo_rate")
	private Double rate;


	/**
	 * 客户UU
	 */
	@Column(name = "pabo_custuu")
	private Long custUu;

	/**
	 * 客户名称
	 */
	@Column(name = "pabo_custname")
	private String custName;

	/**
	 * 本企业UU
	 */
	@Column(name = "pabo_enuu")
	private Long enUu;

	/**
	 * 单据编号
	 */
	@Column(name = "pabo_code")
	private String code;

	/**
	 * 打印次数
	 */
	@Column(name = "pabo_print")
	private Short print;

	/**
	 * 开票单明细行
	 */
	@OneToMany(mappedBy = "apBillOut", cascade = { CascadeType.REFRESH, CascadeType.PERSIST, CascadeType.REMOVE,
			CascadeType.MERGE }, fetch = FetchType.EAGER)
	@OrderBy("number")
	private Set<PurchaseApBillOutItem> items;

	public Long getId() {
		return id;
	}

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

	public Double getTaxSum() {
		return taxSum;
	}

	public void setTaxSum(Double taxSum) {
		this.taxSum = taxSum;
	}

	public Double getDiffer() {
		return differ;
	}

	public void setDiffer(Double differ) {
		this.differ = differ;
	}

	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	public String getRecorder() {
		return recorder;
	}

	public void setRecorder(String recorder) {
		this.recorder = recorder;
	}

	public String getCheckStatus() {
		return checkStatus;
	}

	public void setCheckStatus(String checkStatus) {
		this.checkStatus = checkStatus;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}

	public Date getResDate() {
		return resDate;
	}

	public void setResDate(Date resDate) {
		this.resDate = resDate;
	}

	public String getResMan() {
		return resMan;
	}

	public void setResMan(String resMan) {
		this.resMan = resMan;
	}

	public Short getStatus() {
		return status;
	}

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

	public Double getAmount() {
		return amount;
	}

	public void setAmount(Double amount) {
		this.amount = amount;
	}

	public Double getPayAmount() {
		return payAmount;
	}

	public void setPayAmount(Double payAmount) {
		this.payAmount = payAmount;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public Double getRate() {
		return rate;
	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

	public Long getCustUu() {
		return custUu;
	}

	public void setCustUu(Long custUu) {
		this.custUu = custUu;
	}

	public String getCustName() {
		return custName;
	}

	public void setCustName(String custName) {
		this.custName = custName;
	}

	public Long getEnUu() {
		return enUu;
	}

	public void setEnUu(Long enUu) {
		this.enUu = enUu;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public Short getPrint() {
		return print;
	}

	public void setPrint(Short print) {
		this.print = print;
	}

	public Set<PurchaseApBillOutItem> getItems() {
		return items;
	}

	public void setItems(Set<PurchaseApBillOutItem> items) {
		this.items = items;
	}
}
