/**
 * There are <a href="https://github.com/ketayao/keta-custom">keta-custom</a> code generation
 */
package com.sw.mes.yb.turnstore.entity;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sw.mes.yb.turnstore.dto.CassetteDetail;
import com.vladmihalcea.hibernate.type.json.JsonStringType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;

/**
* @Author
* @Description：
* @Date: Create in
* @Modified By:
*/
@Data
@Entity
@Table(name="material_tray_binding")
@DynamicUpdate
@DynamicInsert
@TypeDef(name = "json", typeClass = JsonStringType.class)
public class MaterialTrayBinding{
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    
	/**
	 * 托盘编号
	 */
    @Column(length=50)
    private String trayCode;
    
	/**
	 * 托盘分类：GG:坩埚、LH:料盒
	 */
    @Column(length=100)
    private String trayType;
    
	/**
	 * 料盒规格（20、50）
	 */
    @Column(length=19)
    private String cassetteType;
    
	/**
	 * 料盒用量（10、20、50）
	 */
    @Column(length=64)
    private String cassetteUse;
    
	/**
	 * 物料批次
	 */
    @Column(length=50)
    private String materialBatch;
    
	/**
	 * 物料编号
	 */
    @Column(length=50)
    private String materialNo;
    
	/**
	 * 物料名称
	 */
    @Column(length=50)
    private String materialName;
    
	/**
	 * 物料类型
	 */
    @Column(length=50)
    private String materialType;
    
	/**
	 * 定向
	 */
    @Column(length=50)
    private String directional;
    
	/**
	 * 数量 
	 */
    @Column(length=19)
    private BigDecimal count;
    
	/**
	 * 档位
	 */
    @Column(length=50)
    private String materialGear;
    
	/**
	 * 等级
	 */
    @Column(length=50)
    private String materialLevel;
    
	/**
	 * 规格
	 */
    @Column(length=50)
    private String specification;
    
	/**
	 * 供应商
	 */
    @Column(length=50)
    private String supplier;
    
	/**
	 * 粒径
	 */
    @Column(length=50)
    private String suppliesGrain;
    
	/**
	 * 唯一码
	 */
    @Column(length=50)
    private String uniqueCode;
    
	/**
	 * 单位
	 */
    @Column(length=50)
    private String unit;
    
	/**
	 * 库位名称
	 */
    @Column(length=70)
    private String warehouseName;
    
	/**
	 * 库位编码
	 */
    @Column(length=50)
    private String warehouseCode;

	/**
	 * 操作人
	 */
	@Column(length = 50)
	private String operateUser;

	/**
	 * 操作时间
	 */
	@Column(length = 19)
	@Temporal(TemporalType.TIMESTAMP)
	private Date operateTime;

	/**
	 * 料盒信息
	 */
	@Type(type = "json")
	@Column(nullable = false, length = 0, columnDefinition = "json")
	private List<CassetteDetail> cassetteDetail;

	public MaterialTrayBinding() {
	}

	public MaterialTrayBinding(Long id) {
		this.id = id;
	}
}
