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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author yumingxing
 * @version 1.0
 * @date 2021/2/7 13:31
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WEIGH")
@Api("MES_称重")
public class MesWeigh extends BaseBean implements Serializable {


    private static final long serialVersionUID = 5772121725271750974L;


    @Column(
            name = "PART_NO"
    )
    @ApiParam("零件号")
    private String partNo;
    @Column(
            name = "PART_NAME"
    )
    @ApiParam("零件名称")
    private String partName;

    @Column(name = "WEIGH_NUM", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("称重数量")
    private Double weighNum;

    @Column(name = "STANDARD_WEIGHT", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("参考标准重量")
    private Double standardWeight;

    @Column(name = "UP_LIMIT", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("偏差上限")
    private Double upLimit;

    @Column(name = "DOWN_LIMIT", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("偏差下限")
    private Double downLimit;
}
