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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * @author wangjie
 * @version 1.0
 * @date 2021/1/15 15:32
 **/
@Data
@ApiModel("工序BOM MODEL")
public class ProcessBomModel implements Serializable {

    private static final long serialVersionUID = 2993174889327935057L;

    @ApiParam("成品物料编码")
    private String partNo;

    @ApiParam("成品物料名称")
    private String partNameRdd;

    @ApiParam("原材料物料编码")
    private String itemPartNo;

    @ApiParam("原材料物料名称")
    private String itemPartName;

    @ApiParam("工序代码")
    private String processCode;

    @ApiParam("工序名称")
    private String processName;

    @ApiParam(value = "子零件数量")
    private Double qty;

    @ApiParam(value = "匹配规则")
    private Integer matchRule;

    @ApiParam("是否绑定关键件")
    private Integer isBindKey;

    @ApiParam("是否可重复")
    private Integer isRepeat;

    @ApiParam("是否检查")
    private Integer isCheck;

    @ApiParam("是否已绑定")
    private Boolean isBind;

    @ApiParam("是否缺件")
    private Boolean isMissing;

    @ApiParam("是否已绑定")
    private String isBindName;

    @ApiParam("显示颜色")
    private String color;

    @ApiParam(value = "绑定数量")
    private Double boundQty;

    @ApiParam("字符长度")
    private Integer length;

    @ApiParam("校验内容")
    private String checkContent;

    @ApiParam("排序号")
    private Double seq;

    public boolean getIsBindVal() {
        return this.isBind == null ? false : this.isBind;
    }

    public boolean getIsMissingVal() {
        return this.isMissing == null ? false : this.isMissing;
    }

    public double getBoundQtyVal() {
        return this.boundQty == null ? 0.0d : this.boundQty;
    }

    public int getIsRepeatVal() {
        return this.isRepeat == null ? 0 : this.isRepeat;
    }

    public double getSeq() {return this.seq == null ? 0.0 : this.seq;}
}
