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

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

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

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@Entity
@Table(name = "production_piece_detail")
@DynamicUpdate
@DynamicInsert
public class PieceDetail {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 样片编号
     */
    @Column(length = 50)
    private String pieceNo;

    /**
     * 长棒id
     */
    @Column(length = 19)
    private Long crystalId;

    /**
     * 晶段id(代表短棒反切的样片)
     */
    @Column(length = 19)
    private Long segmentId;

    /**
     * 创建人
     */
    @Column(length = 32)
    private String createBy;

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

    /**
     * 导电型号
     */
    @Column(length = 10)
    private String conductiveType;

    /**
     * 料号
     */
    @Column(length = 100)
    private String productCode;

    /**
     * 产品等级
     */
    @Column(length = 50)
    private String productGrade;

    /**
     * 规格
     */
    @Column(length = 50)
    private String specs;

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

    /**
     * 产品类别
     */
    @Column(length = 50)
    private String productType;

    /**
     * 设备号
     */
    @Column(length = 100)
    private String equipmentCode;

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

    /**
     * 长棒编号
     */
    @Column(length = 100)
    private String crystalNo;

    /**
     * 样片种类
     * 0：圆棒样片，1：方棒样片
     */
    @Column(length = 3)
    private Integer type = 0;

    /**
     * 是否合格
     */
    @Column(length = 3)
    private Integer isQualified;

    /**
     * 段号
     */
    @Column(length = 100)
    private Integer segmentNum;

    /**
     * 是否返切
     */
    @Column(length = 20)
    private String backCut;
//
//    /**
//     * 样片类型 枚举：SampleType
//     */
//    private Integer type;
    public PieceDetail() {
    }

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