package com.sw.mes.yb.pc.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;

/**
 *
 * 异常信息
 */
@Data
@Entity
@Table(name="zhxx_operate_exception_info")
@DynamicUpdate
@DynamicInsert
public class ExceptionInfo {

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

    /**
     * 关联ID
     */
    @Column
    private Long propertyId;

    /**
     * 关联字段
     */
    @Column
    private String propertyCode;

    /**
     * 属性名称
     */
    @Column(nullable=false, length=50)
    private String propertyName;

    /**
     * 属性值
     */
    @Column(nullable=false, length=50)
    private String propertyValue;

    /**
     * 异常信息
     */
    @Column
    private String exceptionTip;

    /**
     * 生成样片标识：0不生成，1头样片，2尾样片，3头尾样片
     */
    private Integer piece;

    /**
     * 返切长度
     */
    @Column(length = 10)
    private BigDecimal cutLength;

    /**
     * 返切原因
     */
    @Column
    private String cause;

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

    /**
     * 默认 true
     * 返切画线之后置为false
     */
    @Column
    private Boolean usable;

}
