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 yumingxing
 * @version 1.0
 * @date 2021/2/2 13:23
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_EP_EQUIPMENT_CHECK", indexes = {
        @Index(columnList = "CHECK_TYPE"),
        @Index(columnList = "WORK_CENTER_CODE, CHECK_TYPE")
})
@Api("MES_EP_工位设备点检")
public class MesEpEquipmentCheck extends BaseBean implements Serializable {

    private static final long serialVersionUID = -8526495317684819672L;

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

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

    @Column(name = "WORK_CELL_CODE")
    @ApiParam(value = "工位代码")
    public String workCellCode;

    @Column(name = "WORK_CELL_NAME")
    @ApiParam("工位名称")
    private String workCellName;

    @Column(name = "EQU_NO")
    @ApiParam("设备编号")
    private String equNo;

    @Column(name = "EQU_NAME")
    @ApiParam("设备名称")
    private String equName;

    @Column(name = "PROJECT_CONTENT")
    @ApiParam("项目内容")
    private String projectContent;

    @Lob
    @Column(name = "CHECK_METHOD")
    @ApiParam("点检方法")
    private String checkMethod;

    @Column(name = "CHECK_TYPE")
    @ApiParam("点检周期")
    private String checkType;

    @Column(name = "RESULT_TYPE")
    @ApiParam("结果类型")
    private Integer resultType;

    @Column(name = "STANDARD_VALUE")
    @ApiParam("标准值")
    private String standardValue;

    @Column(name = "UP_LIMIT")
    @ApiParam("上限值")
    private String upLimit;

    @Column(name = "DOWN_LIMT")
    @ApiParam("下限值")
    private String downLimit;

}
