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

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

/**
 * @Description: MES-中航DB数据复核不通过记录表
 * @CreateDate: 2020/9/14
 * @Author: simon.song
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DB_CHECK_RECORD")
@Api("中航复核异常记录表")
public class MesDbCheckRecord extends BaseBean implements Serializable {

    private static final long serialVersionUID = 6727925715356900171L;

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

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

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

    //DB复核项：10=物料为空复核。20=零件工单匹对复核。30=过程条码重复复核。40=过程条码为空复核。50=产品二维码重复复核。60=产品二维码为空复核。70=质量关键字段为空复核。80=缺陷类型连续超过设定数复核。
    @Column(name = "DB_CHECK_ITEM")
    @ApiParam("DB复核项")
    private String dbCheckItem;

    @Column(name = "ERROR_FILED_CODE")
    @ApiParam("异常取值字段")
    private String errorFiledCode;

    @Column(name = "ERROR_DESC")
    @ApiParam("异常描述")
    private String errorDesc;

    @Column(name = "PRODUCT_DATA_ID")
    @ApiParam("生产记录表主键ID")
    private Long productDataId;

    //是否停线：1=是，2=否
    @Column(name = "IS_STOP_LINE")
    @ApiParam("是否停线")
    private Integer isStopLine;

    //审批状态：10=待审批，20=已审批
    @Column(name = "STATUS")
    @ApiParam("审批状态")
    private Integer status;

    @Transient
    @ApiParam("按钮名称")
    private String btnName;

    @Transient
    @ApiParam("按钮颜色")
    private String btnColor;

    @Transient
    @ApiParam("按钮类别")
    private String btnType;

}
