AttachmentInput.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. namespace YBEE.EQM.Application;
  2. /// <summary>
  3. /// 添加附件到数据行
  4. /// </summary>
  5. public class AddAttachmentInput : AddAttachmentInput<int> { }
  6. /// <summary>
  7. /// 添加附件到数据行
  8. /// </summary>
  9. public class AddAttachmentInput<T>
  10. {
  11. /// <summary>
  12. /// 主键
  13. /// </summary>
  14. [Required]
  15. public T SourceId { get; set; }
  16. /// <summary>
  17. /// 文件ID
  18. /// </summary>
  19. [Required]
  20. public long FileId { get; set; }
  21. /// <summary>
  22. /// 文件名称
  23. /// </summary>
  24. [Required]
  25. public string FileName { get; set; }
  26. /// <summary>
  27. /// 文件扩展名
  28. /// </summary>
  29. [Required]
  30. public string FileExtName { get; set; }
  31. /// <summary>
  32. /// 文件大小
  33. /// </summary>
  34. public long FileSize { get; set; } = 0;
  35. /// <summary>
  36. /// 缩略图文件ID
  37. /// </summary>
  38. public long? ThumbFileId { get; set; } = 0;
  39. }
  40. /// <summary>
  41. /// 从数据行中删除附件
  42. /// </summary>
  43. public class DeleteAttachmentInput : DeleteAttachmentInput<int> { }
  44. /// <summary>
  45. /// 从数据行中删除附件
  46. /// </summary>
  47. public class DeleteAttachmentInput<T>
  48. {
  49. /// <summary>
  50. /// 主键
  51. /// </summary>
  52. [Required]
  53. public T SourceId { get; set; }
  54. /// <summary>
  55. /// 文件ID
  56. /// </summary>
  57. [Required]
  58. public long FileId { get; set; }
  59. }