package cn.iocoder.yudao.module.energy.controller.admin.record.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Schema(description = "管理后台 - 加氢记录导入预览 Response VO")
@Data
public class HydrogenRecordImportPreviewVO {

    @Schema(description = "批次号")
    private String batchNo;
    @Schema(description = "总行数")
    private Integer totalCount;
    @Schema(description = "有效行数")
    private Integer validCount;
    @Schema(description = "重复行数")
    private Integer duplicateCount;
    @Schema(description = "错误行数")
    private Integer errorCount;
    @Schema(description = "预览记录")
    private List<RecordPreviewItem> records;
    @Schema(description = "重复记录")
    private List<RecordPreviewItem> duplicates;
    @Schema(description = "错误明细")
    private List<ImportErrorItem> errors;

    @Data
    public static class RecordPreviewItem {
        private Integer rowNum;
        private String plateNumber;
        private LocalDate hydrogenDate;
        private BigDecimal hydrogenQuantity;
        private BigDecimal unitPrice;
        private BigDecimal amount;
        private BigDecimal mileage;
        private Boolean isDuplicate;
    }

    @Data
    public static class ImportErrorItem {
        private Integer rowNum;
        private String reason;
    }
}
