package com.uas.search.console.b2b.model;

import javax.persistence.*;

/**
 * 航天开票单明细
 * 
 *
 */
@Table(name = "purc$apbilloutitem")
@Entity
public class PurchaseApBillOutItemSimpleInfo {

	@Id
	@Column(name = "pai_id")
	private Long id;

	/**
	 * 行号
	 */
	@Column(name = "pai_number")
	private Short number;

	/**
	 * 状态
	 */
	@Column(name = "pai_status")
	private Integer status;

	/**
	 * 状态码
	 */
	@Column(name = "pai_statuscode")
	private Integer statusCode;

	/**
	 * 开票单价
	 */
	@Column(name = "pai_nowprice")
	private Double nowPrice;

	/**
	 * 成本单价
	 */
	@Column(name = "pai_costprice")
	private Double costPrice;

	/**
	 * 发票单价
	 */
	@Column(name = "pai_price")
	private Double price;

	/**
	 * 税率(%)
	 */
	@Column(name = "pai_taxrate")
	private Double taxrate;

	/**
	 * 发票数量
	 */
	@Column(name = "pai_qty")
	private Double qty;

	/**
	 * 开票数量
	 */
	@Column(name = "pai_nowqty")
	private Double NowQty;

	/**
	 * 客户物料ID
	 */
	@OneToOne
	@JoinColumn(name = "pai_prid", insertable = false, updatable = false)
	private ProdSimpleInfo product;

	/*@Column(name = "pai_prid")
	private Long prid;*/

	/**
	 * 客户料号
	 */
	@Column(name = "pai_prodcode")
	private String prodCode;

	/**
	 * 发票单号
	 */
	@Column(name = "pai_ordercode")
	private String orderCode;

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

	/**
	 * 主表ID
	 */
	@Column(name = "pai_billoutid")
	private Long billOutId;

	/**
	 * 发票ID
	 */
	@Column(name = "pai_orderid")
	private Long orderId;

	public Long getId() {
		return id;
	}

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

	public Short getNumber() {
		return number;
	}

	public void setNumber(Short number) {
		this.number = number;
	}

	public Integer getStatus() {
		return status;
	}

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

	public Integer getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(Integer statusCode) {
		this.statusCode = statusCode;
	}

	public Double getNowPrice() {
		return nowPrice;
	}

	public void setNowPrice(Double nowPrice) {
		this.nowPrice = nowPrice;
	}

	public Double getCostPrice() {
		return costPrice;
	}

	public void setCostPrice(Double costPrice) {
		this.costPrice = costPrice;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Double getTaxrate() {
		return taxrate;
	}

	public void setTaxrate(Double taxrate) {
		this.taxrate = taxrate;
	}

	public Double getQty() {
		return qty;
	}

	public void setQty(Double qty) {
		this.qty = qty;
	}

	public Double getNowQty() {
		return NowQty;
	}

	public void setNowQty(Double nowQty) {
		NowQty = nowQty;
	}

/*	public Long getPrid() {
		return prid;
	}

	public void setPrid(Long prid) {
		this.prid = prid;
	}*/

	public ProdSimpleInfo getProduct() {
		return product;
	}

	public void setProduct(ProdSimpleInfo product) {
		this.product = product;
	}

	public String getProdCode() {
		return prodCode;
	}

	public void setProdCode(String prodCode) {
		this.prodCode = prodCode;
	}

	public String getOrderCode() {
		return orderCode;
	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}

	public String getCode() {
		return code;
	}

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

	public Long getBillOutId() {
		return billOutId;
	}

	public void setBillOutId(Long billOutId) {
		this.billOutId = billOutId;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	@Override
	public String toString() {
		return "PurchaseApBillOutItemSimpleInfo{" +
				"id=" + id +
				", number=" + number +
				", status=" + status +
				", statusCode=" + statusCode +
				", nowPrice=" + nowPrice +
				", costPrice=" + costPrice +
				", price=" + price +
				", taxrate=" + taxrate +
				", qty=" + qty +
				", NowQty=" + NowQty +
				//", prid=" + prid +
				", prodCode='" + prodCode + '\'' +
				", orderCode='" + orderCode + '\'' +
				", code='" + code + '\'' +
				", billOutId=" + billOutId +
				", orderId=" + orderId +
				'}';
	}
}
