/**
 * 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.math.BigDecimal;
import java.util.Date;

/**
 * @Author
 * @Description：晶段信息表
 * @Date: Create in
 * @Modified By:
 */
@Data
@Entity
@Table(name = "production_segment_detail")
@DynamicUpdate
@DynamicInsert
public class SectionNoDetail {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 圆棒编号
     */
    @Column(length = 50)
    private String sectionNo;

    /**
     * 圆棒对应头片编号
     */
    @Column(length = 50)
    private String pieceNoHead;

    /**
     * 圆棒对应尾片编号
     */
    @Column(length = 50)
    private String pieceNoEnd;


    /**
     * 圆棒对应回收料
     */
    @Column(length = 50)
    private String material;

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

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

    // 圆棒反切id  默认为0  如果该圆棒有被反切,parentID就是圆棒id
    @Column(length = 10)
    private Long parentId;

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

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

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

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

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

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

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

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

    /**
     * 重量
     */
    @Column(length = 19)
    private BigDecimal weight;

    /**
     * 长度
     */
    @Column(length = 19)
    private BigDecimal length;

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

    /**
     * 晶段类型
     */
    @Column(length = 20)
    private String sectionType;

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

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

    /**
     * 最大反切段序号
     */
    @Column(length = 20)
    private Integer retCutSegmentNum;

    /**
     * 最大头样片序号
     */
    @Column(length = 20)
    private Integer headPieceNum;

    /**
     * 最大尾部样片序号
     */
    @Column(length = 20)
    private Integer tailPieceNum;

    /**
     * 最大回收料段序号
     */
    @Column(length = 20)
    private Integer materialNum;

    /**
     * 晶线分叉【0：默认，否；1：是；】
     */
    private Boolean isFork;

    /**
     * 扭
     */
    private BigDecimal distortion;

    /**
     * 是否带彩 默认 否
     */
    private Boolean colorful;

    /**
     * 晶段位置
     */
    @Column(length = 11)
    private Integer sectionPosiotion;

    /**
     * 氧碳依赖标识：0：中间段；1：头段依赖；2：尾段依赖
     */
    @Column(length = 50)
    private Integer oxygenCarbonMark;


    /**
     * 未检验报废标识：0:默认值，正常；1：返切报废
     */
    @Column(length = 2)
    private Integer inspectionScrap;

    /**
     *是否处理母段单晶 0 : 无需还原；1：需要还原
     */
    @Column(length = 2)
    private Integer reductionCrystal;

    /**
     *性能返切次数
     */
    @Column(length = 2)
    private Integer behaviorFrequency;

    /**
     *外观返切次数
     */
    @Column(length = 2)
    private Integer facadeFrequency;

    public SectionNoDetail() {
    }

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