SysFile.cs 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. // 麻省理工学院许可证
  2. //
  3. // 版权所有 (c) 2021-2023 zuohuaijun,大名科技(天津)有限公司 联系电话/微信:18020030720 QQ:515096995
  4. //
  5. // 特此免费授予获得本软件的任何人以处理本软件的权利,但须遵守以下条件:在所有副本或重要部分的软件中必须包括上述版权声明和本许可声明。
  6. //
  7. // 软件按“原样”提供,不提供任何形式的明示或暗示的保证,包括但不限于对适销性、适用性和非侵权的保证。
  8. // 在任何情况下,作者或版权持有人均不对任何索赔、损害或其他责任负责,无论是因合同、侵权或其他方式引起的,与软件或其使用或其他交易有关。
  9. namespace Admin.NET.Core;
  10. /// <summary>
  11. /// 系统文件表
  12. /// </summary>
  13. [SugarTable(null, "系统文件表")]
  14. [SysTable]
  15. [SugarIndex("index_{table}_F", nameof(FileName), OrderByType.Asc)]
  16. public class SysFile : EntityBase
  17. {
  18. /// <summary>
  19. /// 提供者
  20. /// </summary>
  21. [SugarColumn(ColumnDescription = "提供者", Length = 128)]
  22. [MaxLength(128)]
  23. public string? Provider { get; set; }
  24. /// <summary>
  25. /// 仓储名称
  26. /// </summary>
  27. [SugarColumn(ColumnDescription = "仓储名称", Length = 128)]
  28. [MaxLength(128)]
  29. public string? BucketName { get; set; }
  30. /// <summary>
  31. /// 文件名称(源文件名)
  32. /// </summary>
  33. [SugarColumn(ColumnDescription = "文件名称", Length = 128)]
  34. [MaxLength(128)]
  35. public string? FileName { get; set; }
  36. /// <summary>
  37. /// 文件后缀
  38. /// </summary>
  39. [SugarColumn(ColumnDescription = "文件后缀", Length = 16)]
  40. [MaxLength(16)]
  41. public string? Suffix { get; set; }
  42. /// <summary>
  43. /// 存储路径
  44. /// </summary>
  45. [SugarColumn(ColumnDescription = "存储路径", Length = 128)]
  46. [MaxLength(128)]
  47. public string? FilePath { get; set; }
  48. /// <summary>
  49. /// 文件大小KB
  50. /// </summary>
  51. [SugarColumn(ColumnDescription = "文件大小KB", Length = 16)]
  52. [MaxLength(16)]
  53. public string? SizeKb { get; set; }
  54. /// <summary>
  55. /// 文件大小信息-计算后的
  56. /// </summary>
  57. [SugarColumn(ColumnDescription = "文件大小信息", Length = 64)]
  58. [MaxLength(64)]
  59. public string? SizeInfo { get; set; }
  60. /// <summary>
  61. /// 外链地址-OSS上传后生成外链地址方便前端预览
  62. /// </summary>
  63. [SugarColumn(ColumnDescription = "外链地址", Length = 512)]
  64. [MaxLength(512)]
  65. public string? Url { get; set; }
  66. /// <summary>
  67. /// 文件MD5
  68. /// </summary>
  69. [SugarColumn(ColumnDescription = "文件MD5", Length = 128)]
  70. [MaxLength(128)]
  71. public string? FileMd5 { get; set; }
  72. }