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

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

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

@Data
@Entity
@Table(name = "zhxx_data_batch_info")
@DynamicUpdate
@DynamicInsert
public class BatchInfo {

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

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

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

    /**
     * 掺杂剂
     */
    @Column(length = 8)
    private String dopant;

    /**
     * 实验类型名称（是否进行实验的标注）
     */
    @Column(length = 40)
    private String experimentName;

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

    /**
     * 产品规格ID
     */
    @Column(length=11)
    private Integer productModelId;

    /**
     * 产品规格名称
     */
    @Column(length=40)
    private String productModelName;

    /**
     * 机台排产ID
     */
    @Column(length=19)
    private Integer deviceScheduleId;

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

    /**
     * 预计装料时间/开炉时间
     */
    @Column(length=19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date startTime;

    /**
     * 停炉时间
     */
    @Column(length=19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date endTime;

    /**
     * 批次数
     */
    @Column(length = 2)
    private Integer times;

    /**
     * 批次年月yyMM
     */
    @Column(length=10)
    private String batchDate;

    /**
     * 炉次状态
     */
    @Column(length = 40)
    private String state;

    /**
     * 唯一编号
     */
    @Column
    private String uid;

    /**
     * 调度炉次号
     */
    @Column(length = 40)
    private String mixInfoLotNo;

    public BatchInfo() {}

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

}
