package com.sw.mes.yb.pc.entity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 领料
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name="zhxx_operate_picking_info")
public class PickingInfo {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 设备排程ID
     */
    @Column(length = 11)
    private Integer scheduleId;

    /**
     * 设备编号
     */
    @Column(length = 40)
    private String deviceNo;

    /**
     * 炉次号
     */
    @Column(length = 80)
    private String lotNo;

    /**
     * 产品类型名称
     */
    @Column(length = 80)
    private String productModelName;

    /**
     * 配料编号
     */
    @Column(length = 80)
    private String pickingInfoNo;

    /**
     * 实验类型
     */
    @Column(length = 40)
    private String experimentValue;

    /**
     * 实验类型
     */
    @Column(length = 80)
    private String experimentName;

    /**
     * 工艺包ID
     */
    @Column(length = 10)
    private Integer artBagId;

    /**
     * 工艺包名称
     */
    @Column(length = 80)
    private String artBagName;

    /**
     * 用途数据字典值
     */
    @Column(nullable=false, length=50)
    private String useDictValue;

    /**
     * 用途数据字典名称
     */
    @Column(nullable=false, length=50)
    private String useDictName;

    /**
     * 领料人
     */
    @Column(length = 40)
    private String createUser;

    /**
     * 领料时间
     */
    @Column(length=19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDate;

    /**
     * 领料详情
     */
    @OneToMany(mappedBy = "pickingInfo", cascade = CascadeType.ALL)
    @OrderBy("id ASC")
    private List<PickingInfoItem> infoItemList = new ArrayList<>();

    public Integer getScheduleId() {
        return scheduleId;
    }

    public void setScheduleId(Integer scheduleId) {
        this.scheduleId = scheduleId;
    }

    public Long getId() {
        return id;
    }

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

    public String getDeviceNo() {
        return deviceNo;
    }

    public void setDeviceNo(String deviceNo) {
        this.deviceNo = deviceNo;
    }

    public String getLotNo() {
        return lotNo;
    }

    public void setLotNo(String lotNo) {
        this.lotNo = lotNo;
    }

    public String getPickingInfoNo() {
        return pickingInfoNo;
    }

    public void setPickingInfoNo(String pickingInfoNo) {
        this.pickingInfoNo = pickingInfoNo;
    }

    public String getExperimentName() {
        return experimentName;
    }

    public void setExperimentName(String experimentName) {
        this.experimentName = experimentName;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public List<PickingInfoItem> getInfoItemList() {
        return infoItemList;
    }

    public void setInfoItemList(List<PickingInfoItem> infoItemList) {
        this.infoItemList = infoItemList;
    }

    public String getExperimentValue() {
        return experimentValue;
    }

    public void setExperimentValue(String experimentValue) {
        this.experimentValue = experimentValue;
    }

    public Integer getArtBagId() {
        return artBagId;
    }

    public void setArtBagId(Integer artBagId) {
        this.artBagId = artBagId;
    }

    public String getArtBagName() {
        return artBagName;
    }

    public void setArtBagName(String artBagName) {
        this.artBagName = artBagName;
    }

    public String getUseDictValue() {
        return useDictValue;
    }

    public void setUseDictValue(String useDictValue) {
        this.useDictValue = useDictValue;
    }

    public String getUseDictName() {
        return useDictName;
    }

    public void setUseDictName(String useDictName) {
        this.useDictName = useDictName;
    }

    public String getProductModelName() {
        return productModelName;
    }

    public void setProductModelName(String productModelName) {
        this.productModelName = productModelName;
    }
}
