package cn.iocoder.yudao.module.mes.controller.admin.criticalcomponent.vo;

import lombok.Builder;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 设备关键件 Excel 导入响应 VO
 */
@Data
@Builder
public class CriticalComponentImportRespVO {

    /**
     * 成功导入的编码列表
     */
    private List<String> createCodes;

    /**
     * 更新的编码列表
     */
    private List<String> updateCodes;

    /**
     * 失败的编码列表，key: 编码，value: 失败原因
     */
    private Map<String, String> failureCodes;

    public CriticalComponentImportRespVO() {
        this.createCodes = new ArrayList<>();
        this.updateCodes = new ArrayList<>();
        this.failureCodes = new LinkedHashMap<>();
    }

    public CriticalComponentImportRespVO(List<String> createCodes, List<String> updateCodes, Map<String, String> failureCodes) {
        this.createCodes = createCodes;
        this.updateCodes = updateCodes;
        this.failureCodes = failureCodes;
    }
}