package cn.estsh.i3plus.ext.mes.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.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @Description:
 * @Author: xiangming.liao
 * @Date: 2021/01/14 20:03
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_ORDER_RULE", indexes = {
        @Index(columnList = "TASK_TYPE"),
        @Index(columnList = "ORDER_TYPE")
})
@Api("MES_单据规则")
public class MesOrderRule extends BaseBean implements Serializable {

    private static final long serialVersionUID = 7689475809320589963L;

    /**
     * 作业类型： 10=准备作业，20=过程作业
     */
    @Column(name = "TASK_TYPE")
    @ApiParam(value = "作业类型", example = "10")
    private Integer taskType;

    /**
     * 10=物料点检，20=人员点检，30=Q管理，40=设备点检、50=防静电点检、
     * 60=工单首检、70=4M变更、80=失败事例点检、90=特殊过程工艺参数、
     * 100=铭牌保证书一致性、110=外观防划伤点检、120=工程巡回确认、130=称重管理表
     */
    @Column(name = "ORDER_TYPE")
    @ApiParam(value = "单据类型", example = "10")
    public Integer orderType;

    /**
     * 创建规则：10=定时创建，20=工单创建
     */
    @Column(name = "CREATE_RULE")
    @ApiParam(value = "创建规则", example = "20")
    public Integer createRule;

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

    @Column(name = "SHIFT_CODE")
    @ApiParam("班次")
    private String shiftCode;

    @Column(name = "PRODUCE_TIME")
    @ApiParam("产生时间")
    private String produceTime;

    @Column(name = "CHECK_TYPE")
    @ApiParam("类型")
    private String checkType;

}
