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.*;
import java.io.Serializable;

/**
 * @Author: wangjie
 * @CreateDate: 2019/7/30 9:30 AM
 * @Description:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_ERROR_LINE_OFF", indexes = {
        @Index(columnList = "SERIAL_NUMBER"),
        @Index(columnList = "WORK_ORDER_NO"),
        @Index(columnList = "WORK_ORDER_NO,SERIAL_NUMBER")
})
@Api("异常下线表")
public class MesErrorLineOff extends BaseBean implements Serializable {

    private static final long serialVersionUID = -1664676184430568752L;

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

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

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

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

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

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工位")
    private String workCellCode;

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

    @Column(name = "FRE_STATUS")
    @ApiParam("补件状态")
    private Integer freStatus;

    @Column(name = "FRE_USER")
    @ApiParam("补件人")
    private String freUser;

    @Column(name = "FRE_TIME")
    @ApiParam("补件时间")
    private String freTime;

    @Column(name = "CONFIRM_STATUS")
    @ApiParam("确认状态")
    private Integer confirmStatus;

    @Column(name = "CONFIRM_USER")
    @ApiParam("确认人")
    private String confirmUser;

    @Column(name = "CONFIRM_TIME")
    @ApiParam("确认时间")
    private String confirmTime;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam(value = "系统同步标志")
    public Integer systemSyncStatus = 2;

}
