平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ImportPreviewOutput.cs 1.0 KiB

4 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. 
  2. //
  3. namespace SafeCampus.System;
  4. /// <summary>
  5. /// 文件导入通用输出
  6. /// </summary>
  7. public class ImportPreviewOutput<T> where T : class
  8. {
  9. /// <summary>
  10. /// 是否有错误
  11. /// </summary>
  12. public bool HasError { get; set; }
  13. /// <summary>
  14. /// 动态表头
  15. /// </summary>
  16. public List<TableColumns> TableColumns { get; set; } = new List<TableColumns>();
  17. /// <summary>
  18. /// 数据
  19. /// </summary>
  20. public List<T> Data { get; set; }
  21. }
  22. /// <summary>
  23. /// 动态表头
  24. /// </summary>
  25. public class TableColumns
  26. {
  27. /// <summary>
  28. /// 标题
  29. /// </summary>
  30. public string Title { get; set; }
  31. /// <summary>
  32. /// 数据源
  33. /// </summary>
  34. public string DataIndex { get; set; }
  35. /// <summary>
  36. /// 宽度
  37. /// </summary>
  38. public int Width { get; set; } = 120;
  39. /// <summary>
  40. /// 超过宽度将自动省略
  41. /// </summary>
  42. public bool Ellipsis { get; set; }
  43. /// <summary>
  44. /// 是否是日期格式
  45. /// </summary>
  46. public bool Date { get; set; }
  47. }