package cn.gov.customs.data.entity.wxjy.bus;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * 商品HS编码吗，用于新组合查询根据商品编码筛选
 * @author wq
 * @2025年10月3日上午11:24:58
 */
@Entity
@Data
@Table(name = "WXJY_ENTRY_LIST")
public class EntryList implements Serializable {
    private static final long serialVersionUID = 6122282857637625069L;

    @Id
    @Column(name = "ID", length = 100)
    private String id;

	// 报关单号，18位，4位关区代码+4位年份+入境(1)/出境(0)+9位序列号
	@Column(name = "ENTRY_ID", length = 20)
	private String entryId;

	// 商品序号
	@Column(name = "G_NO", precision = 19)
	private BigDecimal gNo;

	@Column(name = "CODE_TS", length = 16)
	private String codeTs;

	@Column(name = "G_NAME", length = 256)
	private String gName;

	@Column(name = "G_MODEL", length = 2048)
	private String gModel;

	//第一（法定）数量
	@Column(name = "QTY_1", precision = 19, scale = 5)
	private BigDecimal qty1;

	// 货运值人民币
	@Column(name = "RMB_PRICE", precision = 19, scale = 5)
	private BigDecimal rmbPrice;

	// 货运值美元
	@Column(name = "USD_PRICE", precision = 19, scale = 5)
	private BigDecimal usdPrice;

	// 最大节点时间：对应ENTRY_WORKFLOW表，用于数据每日更新，流程表中CREATE_DATE为当天日期时，
	// acceptDate为前几天不能用该字段进行每日更新范围操作时间
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "RELEASE_DATE")
	private Date releaseDate;

	//六位商品编码  2024-10-16
	@Column(name = "CODE_TS_SHORT", length = 16)
	private String codeTsShort;

	//每项商品需要监管证件
	@Column(name = "G_CERT_FLAG", length = 32)
	private String gCertFlag;

	/**
	 * UN编码
	 */
	@Column(name = "UNGID", length = 20)
	private String ungid;

	/**
	 * 非危险化学品
	 */
	@Column(name = "UNG_FLAG", length = 1)
	private String ungFlag;
	/**
	 * 危包规格
	 */
	@Column(name = "UNG_MODEL", length = 36)
	private String ungModel;
	/**
	 * 危包类别
	 */
	@Column(name = "UNG_CLASSIFY", length = 4)
	private String ungClassify;

	/**
	 * 危险货物名称
	 */
	@Column(name = "UNG_G_NAME", length = 120)
	private String ungGName;
	/**
	 * 货物属性代码
	 */
	@Column(name = "PRODUCT_CHAR_CODE", length = 20)
	private String productCharCode;

	/**
	 * 检验检疫编码
	 */
	@Column(name = "IQ_CODE", length = 13)
	private String iqCode;

	/**
	 * 危险品类型（1、危化品；2、危险货物；3、危化品兼危险货物）
	 */
	@Column(name = "GOODS_TYPE", length = 6)
	private String goodsType;
}