package cn.estsh.i3plus.ext.mes.pcn.pojo.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author yumingxing
 * @version 1.0
 * @date 2021/2/7 15:13
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WEIGH_MANAGER_DETAIL", indexes = {
        @Index(columnList = "ORDER_NO")
})
@Api("MES_称重")
public class MesWeighManagerDetail extends BaseBean implements Serializable {


    private static final long serialVersionUID = 6752957321825360534L;

    @Column(
            name = "ORDER_JOB_NO"
    )
    @ApiParam("单据编号")
    private String orderJobNo;
    @Column(
            name = "ORDER_NO"
    )
    @ApiParam("生产工单号")
    private String orderNo;
    @Column(
            name = "PART_NO"
    )
    @ApiParam("零件号")
    private String partNo;
    @Column(
            name = "PART_NAME"
    )
    @ApiParam("零件名称")
    private String partName;

    @Column(
            name = "SERIAL_NUMBER"
    )
    @ApiParam("产品条码")
    private String serialNumber;

    @Column(
            name = "PACKAGE_NO"
    )
    @ApiParam("包装条码")
    private String packageNo;

    @Column(name = "REAL_WEIGH", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("重量")
    private Double realWeigh;
}
