package cn.estsh.i3plus.ext.mes.pcn.pojo.bean;

import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description:
 * @Author: xiangming.liao
 * @Date: 2021/01/18 15:44
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PROCESS_FIRST_ITEM")
@Api("MES_工序首检项目")
public class MesProcessFirstItem extends BaseBean implements Serializable {

    private static final long serialVersionUID = -111793151238704774L;

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

    @Column(name="PART_NO")
    @ApiParam("零件编号")
    private String partNo;

    @Column(name = "PROCESS_CODE")
    @ApiParam(value = "工序编号")
    public String processCode;

    @Column(name="PROCESS_NAME")
    @ApiParam(value ="工序名称")
    private String processName;

    @Column(name = "CHECK_MESSAGE")
    @ApiParam("检测信息")
    private String checkMessage;

    @Column(name = "CHECK_STAND")
    @ApiParam("检测标准")
    private String checkStand;

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

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

    @Column(name = "MANAGE_TYPE")
    @ApiParam("管理类型：10-比值类型；20-结果类型")
    @AnnoOutputColumn(refClass = MesPcnExtEnumUtil.Q_MANAGE_MANAGE_TYPE.class, refForeignKey = "value", value = "description")
    private String manageType;

    @Column(name = "IMPORTANCE_SAFE_PART_NO")
    @ApiParam("重要安全部品编码")
    private String importanceSafePartNo;

    @Column(name = "CHECK_FREQUENCY")
    @ApiParam("检查频度")
    private String checkFrequency;

    @Column(name = "SAMPLE_QTY")
    @ApiParam("样品数量")
    private String sampleQty;

    @Column(name = "CONFIRM_METHOD")
    @ApiParam("确认方法")
    private String confirmMethod;

}
