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

import com.sw.mes.enumvalue.EnumValuesServer;
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_painting_line_detail")
@DynamicUpdate
@DynamicInsert
public class ProductionPaintingLineDetail {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 反切画线id
     */
    @Column(nullable = false, length = 10)
    private Long operateReversecutDrawId;

    /**
     * 画线记录id
     */
    @Column(nullable = false, length = 10)
    private Long operateDrawId;

    /**
     * 单晶id
     */
    @Column(nullable = false, length = 10)
    private Long crystalId;

    /**
     * 晶段序号
     */
    @Column(nullable = false, length = 10)
    private Integer sequence;

    /**
     * 画线类型 - 0：晶段，1：样片，2：回收料，//20220831
     * （画线类型 - 0：晶段，1：样片，2：回收料-孪晶，3：回收料直径，4：回收料，5：头尾回收料）
     * {@link EnumValuesServer.LineType}
     */

    @Column(nullable = false, length = 10)
    private Integer type;

    /**
     * 父id（则为晶段id）
     */
    @Column(nullable = false, length = 10)
    private Integer parentId;

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

    /**
     * 晶段编号/样片编号
     */
    @Column(nullable = false, length = 255)
    private String no;

    /**
     * 崩裂截断放反切长度
     */
    @Column(length = 19)
    private BigDecimal crackLength;
    
    /**
     * 晶段长度
     */
    @Column(length = 19)
    private BigDecimal length;

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

    /**
     * 0:未切断，1:以切断
     */
    @Column(nullable = false, length = 10)
    private Integer status;

    /**
     * 直径
     */
    @Column(length = 10)
    private String diameter;


    @Column(length = 255)
    private String remark;

    @Column(length = 1)
    Integer isCut;


    // 圆方棒标识 0圆棒  1是方棒
    @Column(length = 1)
    Integer crystalType;

    // 是否拼棒 0否  1是
    @Column(length = 1)
    Integer isJoin;

    /**
     * 段号
     */
    Integer segmentNum;
    /**
     * 样片类型
     */
    Integer sampleType;
    /**
     * 是否带彩 默认 否
     */
    Boolean colorful;

    /**
     * 反切原因
     */
    @Column(length = 50)
    private String reason;

    public ProductionPaintingLineDetail() {
    }

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