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;

/**
 * 方棒返切
 */
@Entity
@Table(name = "zhxx_operate_re_cut")
@DynamicUpdate
@DynamicInsert
@Data
public class ReCut {

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

    /**
     * 晶段编号
     */
    @Column(length = 100)
    private String segmentNo;

    /**
     * 晶段长度
     */
    @Column(length = 10)
    private BigDecimal segmentNoLength;


    /**
     * 反切长度
     */
    @Column(length = 10)
    private BigDecimal recutLength;

    /**
     * 画线人姓名
     */
    @Column(length = 100)
    private String operateUser;

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

    /**
     * 产品等级
     */
    @Column(length = 100)
    private String productLevel;

    /**
     * 段数
     */
    @Column(length = 100)
    private String cutNum;


    /**
     * 开始时间
     */
    @Column(length = 19)
    @Temporal(TemporalType.TIMESTAMP)
    private Date startTime;

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


    /**
     * 班组
     */
    @Column(length = 100)
    private String className;

    /**
     * 班次
     */
    @Column(length = 100)
    private String classNo;

    /**
     * 备注
     */
    @Lob
    private String remark;

    /**
     * 打印张数
     */
    @Column(length = 10)
    private Integer printNum;


    /**
     * 返切原因
     */
    @Column(length = 100)
    private String reason;


    /**
     * 反切类型 : 1不合格反切 ,2分段反切
     */
    @Column(length = 50)
    private Integer recutType;

    /**
     * 截断状态 0：未截断，1：已截断
     */
    @Column
    private Boolean status;

    /**
     *  工序 : 刀刨、磨削、方棒检验用于返切回站
     */
    @Column
    private String processCode;

}
