package cn.estsh.i3plus.pojo.mes.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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description :扭矩信息记录表
 * @Reference :
 * @Author : Crish
 * @CreateDate : 2019-05-17
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_TORQUE_DETAIL")
@Api("扭矩信息记录表")
public class MesTorqueDetail extends BaseBean implements Serializable {

    private static final long serialVersionUID = 8916087884118304236L;
    @Column(name = "SN")
    @ApiParam("过程条码")
    private String serialNumber;

    @Column(name = "UPPER_LIMIT", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("最大值")
    private Double upperLimit;

    @Column(name = "LOWER_LIMIT", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("最小值")
    private Double lowerLimit;

    @Column(name = "TORQUE_DETAIL_VALUE", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("扭矩值")
    private Double torqueValue;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工作单元")
    private String workCellCode;

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

    @Column(name = "AREA_CODE")
    @ApiParam("区域代码")
    private String areaCode;

    @Column(name = "ok")
    @ApiParam("扭矩是否合格")
    private String ok;

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

    @Column(name = "p_set")
    @ApiParam("螺丝枪PSET设置值")
    private String deviceSetValue;

    @Column(name = "MAXANGLE")
    @ApiParam("最大扭矩")
    private String maxAngle;

    @Column(name = "MINANGLE")
    @ApiParam("最小扭矩")
    private String minAngel;

    @Column(name = "FINALANGLE")
    @ApiParam("最终扭矩")
    private Integer finalAngle;

    @Column(name = "WORK_ORDER_NO")
    @ApiParam("工单号")
    private String workOrderNo;

    @Column(name = "KEY_DATA_CODE")
    @ApiParam("关键数据代码")
    private String keyDataCode;

    @Column(name = "RESULT_MSG")
    @ApiParam("扭矩判定结果")
    private String resultMsg;
}
