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.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @Description :配置表
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-06-04
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_REWORK_RANGE", indexes = {
        @Index(columnList = "WORK_ORDER_NO"),
        @Index(columnList = "PACKAGE_NO"),
        @Index(columnList = "WORK_ORDER_NO, PACKAGE_NO"),
        @Index(columnList = "WORK_ORDER_NO, WORK_TIME, SHIFT_CODE")
})
@Api("返工范围表")
public class MesReworkRange extends BaseBean implements Serializable {

    private static final long serialVersionUID = 6197694556881765926L;

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

    @Column(name = "REWORK_ORDER_NO")
    @ApiParam("返工工单号")
    private String reworkOrderNo;

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

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

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

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

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

    @Column(name = "CHECK_RESULT")
    @ApiParam("检验结果")
    private Integer checkResult;

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

    @Column(name = "WORK_TIME")
    @ApiParam("生产日期")
    private String workTime;

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

    @Column(name = "OUT_WC_TIME")
    @ApiParam("下线时间")
    private String outWcTime;

    @Column(name = "BIND_STATUS")
    @ApiParam("关联状态")
    private Integer bindStatus;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ApiParam("同步字段")
    private Integer systemSyncStatus;

}
