package cn.estsh.i3plus.pojo.mes.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.Lob;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description :不良信息接口表
 * @Reference :
 * @Author : siliter.yuan
 * @CreateDate : 2020-06-28
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "IF_DEFECT_DATA")
@Api("不良信息接口数据")
public class IfDefectData extends BaseBean implements Serializable {
    private static final long serialVersionUID = 4320604250440221049L;
    @Column(name = "SERIAL_NUMBER")
    @ApiParam("产品条码")
    private String serailNumber;

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

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

    @Column(name = "DEFECT_CODE")
    @ApiParam("缺陷代码")
    private String defectCode;

    @Column(name = "DEFECT_NAME")
    @ApiParam("缺陷名称")
    private String defectName;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("工作中心代码")
    private String workCenterCode;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工作单元代码")
    private String workCellCode;

    @Column(name = "MEMO")
    @ApiParam("备注")
    private String memo;

    @Column(name = "DEFECT_ACTION_TYPE")
    @ApiParam("不良处理类型")
    private String defectActionType;

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

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

    @Lob
    @Column(name = "ERROR_MESSAGE")
    @ApiParam("异常消息")
    private String errorMessage;

    @Column(name = "ACTION_TYPE")
    @ApiParam("动作代码")
    private String actionType;

    @Column(name = "IF_CODE")
    @ApiParam("接口代码")
    private String ifCode;
}
