FileVO.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. package space.anyi.vo;
  2. import io.swagger.v3.oas.annotations.media.Schema;
  3. @Schema(description = "File upload response payload")
  4. public class FileVO {
  5. @Schema(description = "Original file name", example = "report.pdf")
  6. private String originalFileName;
  7. @Schema(description = "Stored file name on disk", example = "1f2a3c4d-8e90-4a5b-9c7d-0e1f2a3c4d5e.pdf")
  8. private String storedFileName;
  9. @Schema(description = "File size in bytes", example = "2048")
  10. private Long size;
  11. @Schema(description = "MIME content type", example = "application/pdf")
  12. private String contentType;
  13. @Schema(description = "Relative storage path", example = "uploads/1f2a3c4d-8e90-4a5b-9c7d-0e1f2a3c4d5e.pdf")
  14. private String storagePath;
  15. public FileVO() {
  16. }
  17. public FileVO(String originalFileName, String storedFileName, Long size, String contentType, String storagePath) {
  18. this.originalFileName = originalFileName;
  19. this.storedFileName = storedFileName;
  20. this.size = size;
  21. this.contentType = contentType;
  22. this.storagePath = storagePath;
  23. }
  24. public String getOriginalFileName() {
  25. return originalFileName;
  26. }
  27. public void setOriginalFileName(String originalFileName) {
  28. this.originalFileName = originalFileName;
  29. }
  30. public String getStoredFileName() {
  31. return storedFileName;
  32. }
  33. public void setStoredFileName(String storedFileName) {
  34. this.storedFileName = storedFileName;
  35. }
  36. public Long getSize() {
  37. return size;
  38. }
  39. public void setSize(Long size) {
  40. this.size = size;
  41. }
  42. public String getContentType() {
  43. return contentType;
  44. }
  45. public void setContentType(String contentType) {
  46. this.contentType = contentType;
  47. }
  48. public String getStoragePath() {
  49. return storagePath;
  50. }
  51. public void setStoragePath(String storagePath) {
  52. this.storagePath = storagePath;
  53. }
  54. }