package abacus.springboot.example.dao;

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

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.persistence.Version;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import io.swagger.v3.oas.annotations.media.Schema;

@Entity
@Table(name = "jc_bill")
@JsonIgnoreProperties(ignoreUnknown = true) 
@Schema(description = "稽查主单")
public class JcBill implements Serializable {

	private static final long serialVersionUID = 7089440541784316919L;

	/**唯一标识：订单号*/
	@Id
	@Schema(description="稽查单号", required=true, example="JC202411180001")
	private String id;
	
	@Version
	@Schema(description = "版本号", required = true, example = "1")
	private Integer version = 1;
	
	@Schema(description="状态", required=true, pattern="-3：取消，-2：溯源驳回，0：待提交，1：系统溯源验证通过，2：待溯源，3：待入库，4：入库待审核，5：已入库，6：部分回购，7：回购完成", example = "1")
	private int status = 1;
	/** 取消*/
	public final static int STATUS_MINUS_THREE = -3; 
	/** 溯源驳回*/
	public final static int STATUS_MINUS_TWO = -2; 
	/** 待提交*/
	public final static int STATUS_ZERO = 0; 
	/** 系统溯源验证通过*/
	public final static int STATUS_ONE = 1; 
	/** 待溯源*/
	public final static int STATUS_TWO = 2; 
	/** 待入库*/
	public final static int STATUS_THREE = 3; 
	/** 入库待审核 */
	public final static int STATUS_FOUR = 4; 
	/** 已入库 */
	public final static int STATUS_FIVE = 5; 
	/** 部分回购 */
	public final static int STATUS_SIX = 6; 
	/** 回购完成*/
	public final static int STATUS_SEVEN = 7; 
	
	/** 部分出库-不保存到系统，前端使用*/
	public final static int STATUS_EIGHT = 8;
	/** 已出库-不保存到系统，前端使用*/
	public final static int STATUS_NINE = 9;
	
	@Schema(description="状态", required=true, pattern="0：待回购，1：部分回购，2：回购完成", example = "0")
	private int hgstatus = 0;
	/** 待回购*/
	public final static int HGSTATUS_ZERO = 0; 
	/** 部分回购*/
	public final static int HGSTATUS_ONE = 1; 
	/** 回购完成*/
	public final static int HGSTATUS_TWO = 2; 
	
	@Schema(description = "收货产品", required = true, example = "")
	private String goods;
	
	@Schema(description = "收货仓库编码", required = true, example = "")
	private String warehouse;
	
	@Schema(description = "收货仓库名称", required = true, example = "")
	private String warehousename; 
	
	@Schema(description = "收货日期", required = true, example = "2024-11-11")
	private String receivedt;
	
	@Schema(description = "收货数量", required = true, example = "")
	private double quantity;
	
	@Schema(description = "收货总金额", required = true, example = "")
	private double subtotal;
	
	@Schema(description = "入库单号", required = true, example = "")
	private String billin;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Schema(description = "入库单时间", required = true, example = "")
	private Date billindt;
	
	@Schema(description = "申请人编码", required = true, example = "")
	private String applicant;
	
	@Schema(description = "申请人名称", required = true, example = "")
	private String applicantname;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Schema(description = "申请人时间", required = true, example = "")
	private Date applicantdt;
	
	@Schema(description = "部门编码", required = true, example = "")
	private String dept;
	
	@Temporal(TemporalType.TIMESTAMP)
	@Schema(description = "时间戳", required = true, example = "")
	private Date dt = new Date();
	
	@Transient
	@Schema(description = "收货来源", hidden = true,required = true, example = "")
	private String recsource;
	
	@Transient
	@Schema(description = "收货平台", hidden = true,required = true, example = "")
	private String recplatform;
	
	@Transient
	@Schema(description = "收货渠道", hidden = true,required = true, example = "")
	private String channel;

	@Transient
	@JsonBackReference
	@Schema(description = "历史对象JSONString", required = false, hidden = true, pattern = "", example = "")
	private String oldJson;
	
	public String getRecsource() {
		return recsource;
	}

	public void setRecsource(String recsource) {
		this.recsource = recsource;
	}

	public String getRecplatform() {
		return recplatform;
	}

	public void setRecplatform(String recplatform) {
		this.recplatform = recplatform;
	}

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public int getHgstatus() {
		return hgstatus;
	}

	public void setHgstatus(int hgstatus) {
		this.hgstatus = hgstatus;
	}

	public String getDept() {
		return dept;
	}

	public void setDept(String dept) {
		this.dept = dept;
	}

	public String getOldJson() {
		return oldJson;
	}

	public void setOldJson(String oldJson) {
		this.oldJson = oldJson;
	}

	public String getId() {
		return id;
	}

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

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	public int getStatus() {
		return status;
	}

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

	public String getGoods() {
		return goods;
	}

	public void setGoods(String goods) {
		this.goods = goods;
	}

	public String getWarehouse() {
		return warehouse;
	}

	public void setWarehouse(String warehouse) {
		this.warehouse = warehouse;
	}

	public String getWarehousename() {
		return warehousename;
	}

	public void setWarehousename(String warehousename) {
		this.warehousename = warehousename;
	}

	public String getReceivedt() {
		return receivedt;
	}

	public void setReceivedt(String receivedt) {
		this.receivedt = receivedt;
	}

	public double getQuantity() {
		return quantity;
	}

	public void setQuantity(double quantity) {
		this.quantity = quantity;
	}

	public double getSubtotal() {
		return subtotal;
	}

	public void setSubtotal(double subtotal) {
		this.subtotal = subtotal;
	}

	public String getBillin() {
		return billin;
	}

	public void setBillin(String billin) {
		this.billin = billin;
	}

	public Date getBillindt() {
		return billindt;
	}

	public void setBillindt(Date billindt) {
		this.billindt = billindt;
	}

	public String getApplicant() {
		return applicant;
	}

	public void setApplicant(String applicant) {
		this.applicant = applicant;
	}

	public String getApplicantname() {
		return applicantname;
	}

	public void setApplicantname(String applicantname) {
		this.applicantname = applicantname;
	}

	public Date getApplicantdt() {
		return applicantdt;
	}

	public void setApplicantdt(Date applicantdt) {
		this.applicantdt = applicantdt;
	}

	public Date getDt() {
		return dt;
	}

	public void setDt(Date dt) {
		this.dt = dt;
	}
}

















