ResourceFileInput.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application;
  3. /// <summary>
  4. /// 添加资源文件输入参数
  5. /// </summary>
  6. public class AddResourceFileInput
  7. {
  8. /// <summary>
  9. /// 资源文件类型
  10. /// </summary>
  11. [Required]
  12. public ResourceFileType Type { get; set; }
  13. /// <summary>
  14. /// 来源ID
  15. /// </summary>
  16. [Required]
  17. public long SourceId { get; set; }
  18. /// <summary>
  19. /// 文件名
  20. /// </summary>
  21. [Required]
  22. public string FileName { get; set; }
  23. /// <summary>
  24. /// 文件路径
  25. /// </summary>
  26. [Required]
  27. public string FilePath { get; set; }
  28. /// <summary>
  29. /// 扩展名
  30. /// </summary>
  31. [Required]
  32. public string FileExtName { get; set; }
  33. /// <summary>
  34. /// 文件大小(字节Byte)
  35. /// </summary>
  36. public long FileSize { get; set; } = 0;
  37. /// <summary>
  38. /// 备注
  39. /// </summary>
  40. public string Remark { get; set; } = "";
  41. }
  42. /// <summary>
  43. /// 上传资源文件输入参数
  44. /// </summary>
  45. public class UploadResourceFileInput
  46. {
  47. /// <summary>
  48. /// 资源文件类型
  49. /// </summary>
  50. [Required]
  51. public ResourceFileType Type { get; set; }
  52. /// <summary>
  53. /// 源ID
  54. /// </summary>
  55. [Required]
  56. public long SourceId { get; set; }
  57. /// <summary>
  58. /// 备注
  59. /// </summary>
  60. public string Remark { get; set; }
  61. /// <summary>
  62. /// 文件
  63. /// </summary>
  64. [Required]
  65. public IFormFile File { get; set; }
  66. /// <summary>
  67. /// 文件名
  68. /// </summary>
  69. public string FileName { get; set; }
  70. }