/*
 * Copyright (c) 2023 codvision.com All Rights Reserved.
 */

package com.codvision.base.entity;


import com.alibaba.excel.util.ListUtils;
import com.codvision.base.entity.ExcelErrorRecord;
import lombok.Data;

import java.util.List;

/**
 * @author hxl
 */
@Data
public class ExcelCheck<T> {

    /**
     * 无异常的数据
     */
    private List<T> cacheList;
    /**
     * 异常的数据
     */
    private List<ExcelErrorRecord> errorList;
    /**
     * 表头格式是否异常
     */
    private Boolean headAbnormal;
    /**
     * 是否存在异常的数据
     */
    private Boolean existErrorData;

    public ExcelCheck(int batchCount) {
        this.headAbnormal = false;
        this.existErrorData = false;
        this.cacheList = ListUtils.newArrayListWithExpectedSize(batchCount);
        this.errorList = ListUtils.newArrayListWithExpectedSize(batchCount);
    }
}
