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

import java.util.Date;
import java.math.BigDecimal;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Data
@Entity
@Accessors(chain = true)
@Table(name = "surplus_info")
@DynamicUpdate
@DynamicInsert
public class SurplusInfo {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 余料编码
     */
    @Column(length = 100)
    private String surplusCode;

    /**
     * 工单号
     */
    @Column(length = 50)
    private String workOrderNo;

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

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

    /**
     * 投料次数
     */
    @Column(length = 10)
    private Integer feedTimes;

    /**
     * 余料类型
     */
    @Column(length = 50)
    private String surplusType;

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

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

    /**
     * 状态(1待入库，2已入库)
     * 暂时不用
     */
    @Column(length = 10)
    private Integer status;

    /**
     * 数据采集类型(1 EAP自动采集，2 人工采集)
     */
    @Column(length = 10)
    private Integer dataType;

    /**
     * 区域
     */
    @Column(length = 50)
    private String area;

    /**
     * 删除状态(1：删除，0未删除 默认)
     */
    @Column(length = 10)
    private Integer del;

    /**
     * 创建人
     */
    @Column(length = 50)
    private String createBy;

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

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

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

    /**
     * 第一备用字段
     */
    @Column(length = 50)
    private String filedFirst;

    /**
     * 第二备用字段
     */
    @Column(length = 50)
    private String filedSecond;

    @ApiModelProperty("原始的重量")
    private BigDecimal originalWeight;
}
