package com.uas.search.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 批次简要信息，只用于索引的创建与查询
 * 
 * @author sunyj
 * @since 2017年7月22日 下午8:06:10
 */
@Entity
@Table(name = "trade$goods")
public class TradeGoods implements Serializable {

	private static final long serialVersionUID = 1L;

    public static final Long[] VALID_STATUS = {601L, 602L};

	/**
	 * id
	 */
	@Id
	@Column(name = "go_id")
	private Long id;

	/**
	 * 批次的库存
	 */
	@Column(name = "go_reserve")
	private Double reserve;

	/**
	 * 状态
	 */
	@Column(name = "go_status")
	private Long status;

	/**
	 * 批次的人民币价格
	 */
	@Column(name = "go_minpricermb")
	private Double minPriceRMB;

	/**
	 * 批次的美元价格
	 */
	@Column(name = "go_minpriceusd")
	private Double minPriceUSD;

	/**
	 * 货币
	 */
	@Column(name = "cr_name")
	private String crName;

	/**
	 * 货源uuid
	 */
	@Column(name = "go_storeid")
	private String storeId;

	/**
	 * 器件的uuid
	 */
	@Column(name = "cmp_uuid")
	private String cmpUuid;

	/**
	 * 物料 id
	 */
	@Column(name = "go_productid")
	private Long productId;

	/**
	 * 访问量
	 */
	@Column(name = "go_visit_count")
	private Long visitCount;

	public Long getId() {
		return id;
	}

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

	public Double getReserve() {
		return reserve;
	}

	public void setReserve(Double reserve) {
		this.reserve = reserve;
	}

	public Long getStatus() {
		return status;
	}

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

	public Double getMinPriceRMB() {
		return minPriceRMB;
	}

	public void setMinPriceRMB(Double minPriceRMB) {
		this.minPriceRMB = minPriceRMB;
	}

	public Double getMinPriceUSD() {
		return minPriceUSD;
	}

	public void setMinPriceUSD(Double minPriceUSD) {
		this.minPriceUSD = minPriceUSD;
	}

	public String getCrName() {
		return crName;
	}

	public void setCrName(String crName) {
		this.crName = crName;
	}

	public String getStoreId() {
		return storeId;
	}

	public void setStoreId(String storeId) {
		this.storeId = storeId;
	}

	public String getCmpUuid() {
		return cmpUuid;
	}

	public void setCmpUuid(String cmpUuid) {
		this.cmpUuid = cmpUuid;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public Long getVisitCount() {
		return visitCount;
	}

	public void setVisitCount(Long visitCount) {
		this.visitCount = visitCount;
	}

	@Override
	public String toString() {
		return "TradeGoods{" +
				"id=" + id +
				", reserve=" + reserve +
				", status=" + status +
				", minPriceRMB=" + minPriceRMB +
				", minPriceUSD=" + minPriceUSD +
				", crName='" + crName + '\'' +
				", storeId='" + storeId + '\'' +
				", cmpUuid='" + cmpUuid + '\'' +
				", productId=" + productId +
				", visitCount=" + visitCount +
				'}';
	}
}
