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

/**
 * @Description: MES-中航DB数据检查配置表
 * @CreateDate: 2020/9/14
 * @Author: simon.song
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DB_DATA_CHECK")
@Api("中航DB数据检查配置表")
public class MesDbDataCheck extends BaseBean implements Serializable {

    private static final long serialVersionUID = 6889751438239451959L;

    @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 Integer dbCheckItem;

    @Column(name = "OBJECT_CODE")
    @ApiParam("对象代码")
    private String objectCode;

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

    @Column(name = "KEY_DATA_FILED")
    @ApiParam("质量关键字段")
    private String keyDataFiled;

    @Column(name = "QC_FILED_CODE")
    @ApiParam("缺陷类型字段")
    private String qcFiledCode;

    @Column(name = "QC_FILED_VALUE")
    @ApiParam("缺陷类型合格值")
    private String qcFiledValue;

    @Column(name = "QC_FAIL_MAX_COUNT")
    @ApiParam("缺陷连续不合格预警次数")
    private String qcFailMaxCount;
}
