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.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/1/29 13:58
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_OQC_PROJECT", indexes = {
        @Index(columnList = "PART_NO,OQC_TYPE")
})
@Api("MES_出货检验")
public class MesOqcProject extends BaseBean implements Serializable {
    private static final long serialVersionUID = 8572799206832897539L;

    @Column(
            name = "SEQ",
            columnDefinition = "decimal(18,8)"
    )
    @ColumnDefault("0")
    @ApiParam("序号")
    private Double seq;

    @Column(name = "CATEGORY_CODE3")
    @ApiParam("产品类别")
    private String categoryCode3;

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

    @Column(name = "OQC_PROJECT")
    @ApiParam("检验项目")
    @Lob
    private String oqcProject;

    @Column(name = "STANDARD")
    @ApiParam("判断基准")
    @Lob
    private String standard;

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

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

    @Column(name = "APPLIANCE")
    @ApiParam("启用器具")
    private String appliance;

    @Column(name = "OQC_TYPE")
    @ApiParam("检验类型")
    private Integer oqcType;

    @Transient
    @ApiParam("检验类型")
    private String oqcTypeName;

}
