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

import cn.estsh.i3plus.pojo.mes.bean.MesContainerPackage;
import cn.estsh.i3plus.pojo.mes.bean.MesContainerPackageDetail;
import cn.estsh.i3plus.pojo.mes.bean.MesContainerPackageDetailBinding;
import cn.estsh.i3plus.pojo.mes.bean.MesContainerTypePart;
import io.swagger.annotations.ApiParam;
import lombok.Builder;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description : 料箱绑定
 * @Reference :
 * @Author : jason.niu
 * @CreateDate 2025/06/12 10:37
 * @Modify:
 **/
@Data
@Builder
public class MesContainerSnBindModel {
    @ApiParam("操作人")
    private String userName;

    @ApiParam("工厂代码")
    private String organizeCode;

    @ApiParam("是否启用记忆")
    private Integer isEnableMemory;

    @ApiParam("扫描的容器条码")
    private String containerSn;

    @ApiParam("扫描的零件/子容器条码")
    private String barCode;

    @ApiParam("自选零件号")
    private String partNo;

    @ApiParam("绑定是否选零件号")
    private Integer bindIsChoosePart;

    @ApiParam("最新扫描的零件号")
    private String scanPartNo;

    @ApiParam("最新扫描的零件名称")
    private String scanPartName;

    @ApiParam("容器与零件关系，可用于自选零件展示")
    private List<MesContainerPartsModel> containerParts;

    @ApiParam("包装信息主表")
    private MesContainerPackage containerPackage;

    @ApiParam("包装明细信息")
    private List<MesContainerPackageDetail> packageDetails;

    @ApiParam("条码绑定记录")
    private final List<MesContainerPackageDetailBinding> bindingList = new ArrayList<>();

    public void addPackageDetailBinding(MesContainerPackageDetailBinding binding) {
        bindingList.add(binding);
    }
}
