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

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

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

/**
 * 样片检验
 */

@Entity
@Table(name = "zhxx_operate_piece_check")
@DynamicUpdate
@DynamicInsert
@Data
public class PieceCheck {

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

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

    /**
     * 单晶编号
     */
    @Column(length = 100)
    private String motherCrystalNo;

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

    /**
     * 接收批次号
     */
    @Column(length = 100)
    private String batchNo;

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

//    /**
//     * 微缺陷
//     */
//    @Column(length = 100)
//    private String microDefect;
//
//    /**
//     * 位错
//     */
//    @Column(length = 100)
//    private String lineDefect;

    /**
     * 备注1
     */
    @Column(length = 2000)
    private String remark1;

    /**
     * 记录人1ID
     */
    @Column(length = 50)
    private String userId1;

    /**
     * 记录人1
     */
    @Column(length = 50)
    private String userName1;

    /**
     * 检验时间1
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date checkTime1;

    /**
     * 碳含量 中心
     */
    @Column(length = 18)
    private BigDecimal cContents;

    /**
     * 碳含量 边缘
     */
    //20220726去除碳含量边缘和氧含量边缘字段
//    @Column(length = 18)
//    private BigDecimal cBorderContents;

    /**
     * 氧含量 中心
     */
    @Column(length = 18)
    private BigDecimal oContents;

    /**
     * 氧含量 边缘
     */
//    @Column(length = 18)
//    private BigDecimal oBorderContents;

    // 厚度
    @Column
    private BigDecimal thickness;


    /**
     * 备注2
     */
    @Column(length = 2000)
    private String remark2;

    /**
     * 记录人2ID
     */
    @Column(length = 50)
    private String userId2;

    /**
     * 记录人2
     */
    @Column(length = 50)
    private String userName2;

    /**
     * 检验时间2
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date checkTime2;

    /**
     * PDA样片接收人
     */
    @Column(length = 50)
    private String receiveUser;

    /**
     * 车间名称
     */
    @Column(length = 50)
    private String workshop;

    /**
     * 中心退火电阻率
     */
    @Column(length = 18)
    private BigDecimal centerAnneal;

    /**
     * 边缘退火电阻率
     */
    @Column(length = 18)
    private BigDecimal borderAnneal;

    /**
     * 退火后电阻率备注
     */
    @Column
    private String annealRemark;

    /**
     * 退火电阻率检验人
     */
    @Column(length = 50)
    private String annealUser;

    /**
     * 退火电阻率检验时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date annealTime;


    /**
     * 是否返切
     */
    @Column(length = 20)
    private String backCut;

    /**
     * 更新人
     */
    @Column(length = 50)
    private String updateUser;

    /**
     * 更新人时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    public PieceCheck() {}

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

    public BigDecimal getcContents() {
        return cContents;
    }

    public void setcContents(BigDecimal cContents) {
        this.cContents = cContents;
    }

    public BigDecimal getoContents() {
        return oContents;
    }

    public void setoContents(BigDecimal oContents) {
        this.oContents = oContents;
    }

//    public BigDecimal getcBorderContents() {
//        return cBorderContents;
//    }

//    public void setcBorderContents(BigDecimal cBorderContents) {
//        this.cBorderContents = cBorderContents;
//    }

//    public BigDecimal getoBorderContents() {
//        return oBorderContents;
//    }

//    public void setoBorderContents(BigDecimal oBorderContents) {
//        this.oBorderContents = oBorderContents;
//    }

}
