package cn.estsh.i3plus.pojo.wms.bean;

import cn.estsh.i3plus.pojo.base.annotation.DynamicField;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
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;

/**
 * @Description : 物料子检测项
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2020-04-23
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "WMS_PART_ITEM_CHECK")
@Api("物料子检测项")
public class WmsPartItemCheck extends BaseBean {

    private static final long serialVersionUID = 2889708862689686630L;
    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String workCenterCode;

    @Column(name = "PART_NO")
    @ApiParam("物料号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String partNo;

    @Column(name = "CHECK_TYPE_CODE")
    @ApiParam("检测大类")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    public String checkTypeCode;

    @Column(name = "CHECK_ITEM_CODE")
    @ApiParam("子检测项代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String checkItemCode;

    @Column(name = "CHECK_ITEM_NAME")
    @ApiParam("子检测项名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String checkItemName;

    @Column(name = "VALUE_TYPE")
    @ApiParam("子检测箱值类型")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, dataSrc = "BH_VALUE_TYPE")
    private Integer valueType;

    @Column(name = "STANDARD")
    @ApiParam("标准值")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, isRequire = 2, dataSrc = "BH_PART_CHECK_STD")
    private Integer standard;

    @Column(name = "MAX")
    @ApiParam("最大值")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
    private Double max;

    @Column(name = "MIN")
    @ApiParam("最小值")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
    private Double min;
}
