using System;
using System.Collections.Generic;

namespace MDL.Models
{
    /// <summary>
    /// Excel导入结果类
    /// </summary>
    public class ImportResult
    {
        /// <summary>
        /// 是否导入成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 导入成功的记录数
        /// </summary>
        public int SuccessCount { get; set; }
        
        /// <summary>
        /// 导入失败的记录数
        /// </summary>
        public int FailedCount { get; set; }
        
        /// <summary>
        /// 导入总记录数
        /// </summary>
        public int TotalCount { get; set; }
        
        /// <summary>
        /// 错误信息列表
        /// </summary>
        public List<ImportError> Errors { get; set; } = new List<ImportError>();
        
        /// <summary>
        /// 导入耗时（毫秒）
        /// </summary>
        public long ElapsedMilliseconds { get; set; }
    }
    
    /// <summary>
    /// Excel导入错误类
    /// </summary>
    public class ImportError
    {
        /// <summary>
        /// 行号
        /// </summary>
        public int RowNumber { get; set; }
        
        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorMessage { get; set; }
        
        /// <summary>
        /// 原始数据
        /// </summary>
        public Dictionary<string, string> OriginalData { get; set; } = new Dictionary<string, string>();
    }
    
    /// <summary>
    /// Excel导入数据行类
    /// </summary>
    public class ExcelImportRow
    {
        /// <summary>
        /// 行号
        /// </summary>
        public int RowNumber { get; set; }
        
        /// <summary>
        /// 中性面单单号
        /// </summary>
        public string NeutralWaybillNumber { get; set; }
        
        /// <summary>
        /// 大包号
        /// </summary>
        public string? MasterPackageNumber { get; set; }
        
        /// <summary>
        /// 提单号
        /// </summary>
        public string? BillOfLadingNumber { get; set; }
    }
}