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.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Description:
 * @Reference:
 * @Author: wangjie
 * @CreateDate: 2019\11\15 10:12
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "SX_PRODUCT_OFF_LINE")
@NoArgsConstructor
@AllArgsConstructor
@Api("生产报工表")
public class SxProductOffLine extends BaseBean implements Serializable {

    private static final long serialVersionUID = 3403920892718577132L;

    @Column(name = "WORK_ORDER_NO")
    @ApiParam("生产工单号")
    private String workOrderNo;

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

    @Column(name = "SERIAL_NUMBER")
    @ApiParam("过程条码")
    private String serialNumber;

    @Column(name = "PART_NO")
    @ApiParam("物料号")
    private String partNo;

    @Column(name = "PART_NAME")
    @ApiParam("物料名称")
    private String partName;

    @Column(name = "QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("数量")
    private Double qty;

    @Column(name = "UNIT")
    @ApiParam("单位")
    private String unit;

    @Column(name = "LOT_NO")
    @ApiParam("生产批次")
    private String lotNo;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线")
    private String workCenterCode;

    @Column(name = "ERP_WARE_HOUSE")
    @ApiParam("Erp库存地")
    private String erpWarehouse;

    @Column(name = "PROD_TYPE")
    @ApiParam("产品类型")
    private Integer prodType;

    @Column(name = "SN_TYPE")
    @ApiParam("条码类型")
    private Integer snType;

    @Column(name = "SYNC_STATUS")
    @ApiParam("同步状态")
    private Integer syncStatus;

    @Column(name = "SHIFT_CODE")
    @ApiParam("班次代码")
    private String shiftCode;

    //EP专用
    @Column(name = "PART_LOT_NO")
    @ApiParam("成品批次号")
    public String partLotNo;

    @Column(name = "CUSTOMS_PART_NO")
    @ApiParam("海关物料号")
    public String customsPartNo;

    @Column(name = "OUTER_PACKAGE_NO")
    @ApiParam("外包装条码")
    public String outerPackageNo;

    // is_water_purifier
    @Column(name = "IS_WATER_PURIFIER")
    @ApiParam("是否净水器线")
    public Integer isWaterPurifier;

}
