TUnifyFile.java 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. package com.ruoyi.tool.domain;
  2. import com.ruoyi.common.annotation.Excel;
  3. import com.ruoyi.common.core.domain.BaseEntity;
  4. import com.ruoyi.common.utils.moonshot.vo.FileUploadResult;
  5. import org.apache.commons.lang3.StringUtils;
  6. import org.apache.commons.lang3.builder.ToStringBuilder;
  7. import org.apache.commons.lang3.builder.ToStringStyle;
  8. /**
  9. * 附件对象 t_unify_file
  10. *
  11. * @author ruoyi
  12. * @date 2024-02-23
  13. */
  14. public class TUnifyFile extends BaseEntity
  15. {
  16. private static final long serialVersionUID = 1L;
  17. /** 主键ID */
  18. private String id;
  19. /** 文件ID */
  20. @Excel(name = "文件ID")
  21. private String fileId;
  22. /** 文件名称 */
  23. @Excel(name = "文件名称")
  24. private String uploadName;
  25. /** 文件类别 */
  26. @Excel(name = "文件类别")
  27. private String uploadType;
  28. /** 文件地址 */
  29. @Excel(name = "文件地址")
  30. private String uploadPath;
  31. /** 文件格式 */
  32. @Excel(name = "文件格式")
  33. private String uploadFormat;
  34. /** 新文件名称 */
  35. @Excel(name = "新文件名称")
  36. private String newUploadName;
  37. /** 状态 */
  38. private String delFlag;
  39. /** 附件业务ID */
  40. @Excel(name = "附件业务ID")
  41. private String fileBusinessId;
  42. /**
  43. * moonshot AI 参数
  44. */
  45. private String object;
  46. private String bytes;
  47. private String created_at;
  48. private String filename;
  49. private String purpose;
  50. private String status;
  51. private String status_details;
  52. /**
  53. * 附件内容
  54. */
  55. private String content;
  56. private String corpId;
  57. public void setId(String id)
  58. {
  59. this.id = id;
  60. }
  61. public String getId()
  62. {
  63. return id;
  64. }
  65. public void setFileId(String fileId)
  66. {
  67. this.fileId = fileId;
  68. }
  69. public String getFileId()
  70. {
  71. return fileId;
  72. }
  73. public void setUploadName(String uploadName)
  74. {
  75. this.uploadName = uploadName;
  76. }
  77. public String getUploadName()
  78. {
  79. return uploadName;
  80. }
  81. public void setUploadType(String uploadType)
  82. {
  83. this.uploadType = uploadType;
  84. }
  85. public String getUploadType()
  86. {
  87. return uploadType;
  88. }
  89. public void setUploadPath(String uploadPath)
  90. {
  91. this.uploadPath = uploadPath;
  92. }
  93. public String getUploadPath()
  94. {
  95. return uploadPath;
  96. }
  97. public void setUploadFormat(String uploadFormat)
  98. {
  99. this.uploadFormat = uploadFormat;
  100. }
  101. public String getUploadFormat()
  102. {
  103. return uploadFormat;
  104. }
  105. public void setNewUploadName(String newUploadName)
  106. {
  107. this.newUploadName = newUploadName;
  108. }
  109. public String getNewUploadName()
  110. {
  111. return newUploadName;
  112. }
  113. public void setDelFlag(String delFlag)
  114. {
  115. this.delFlag = delFlag;
  116. }
  117. public String getDelFlag()
  118. {
  119. return delFlag;
  120. }
  121. public void setFileBusinessId(String fileBusinessId)
  122. {
  123. this.fileBusinessId = fileBusinessId;
  124. }
  125. public String getFileBusinessId()
  126. {
  127. return fileBusinessId;
  128. }
  129. public String getObject() {
  130. return object;
  131. }
  132. public void setObject(String object) {
  133. this.object = object;
  134. }
  135. public String getBytes() {
  136. return bytes;
  137. }
  138. public void setBytes(String bytes) {
  139. this.bytes = bytes;
  140. }
  141. public String getCreated_at() {
  142. return created_at;
  143. }
  144. public void setCreated_at(String created_at) {
  145. this.created_at = created_at;
  146. }
  147. public String getFilename() {
  148. return filename;
  149. }
  150. public void setFilename(String filename) {
  151. this.filename = filename;
  152. }
  153. public String getPurpose() {
  154. return purpose;
  155. }
  156. public void setPurpose(String purpose) {
  157. this.purpose = purpose;
  158. }
  159. public String getStatus() {
  160. return this.status;
  161. }
  162. public void setStatus(String status) {
  163. this.status = status;
  164. }
  165. public String getStatus_details() {
  166. return status_details;
  167. }
  168. public void setStatus_details(String status_details) {
  169. this.status_details = status_details;
  170. }
  171. public String getContent() {
  172. return content;
  173. }
  174. public void setContent(String content) {
  175. this.content = content;
  176. }
  177. public String getCorpId() {
  178. return corpId;
  179. }
  180. public void setCorpId(String corpId) {
  181. this.corpId = corpId;
  182. }
  183. @Override
  184. public String toString() {
  185. return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
  186. .append("id", getId())
  187. .append("fileId", getFileId())
  188. .append("uploadName", getUploadName())
  189. .append("uploadType", getUploadType())
  190. .append("uploadPath", getUploadPath())
  191. .append("uploadFormat", getUploadFormat())
  192. .append("newUploadName", getNewUploadName())
  193. .append("delFlag", getDelFlag())
  194. .append("fileBusinessId", getFileBusinessId())
  195. .append("createBy", getCreateBy())
  196. .append("createTime", getCreateTime())
  197. .append("updateBy", getUpdateBy())
  198. .append("updateTime", getUpdateTime())
  199. .toString();
  200. }
  201. /**
  202. * 自定义的复制方法,忽略空值
  203. * @param other
  204. * @param ignoreNulls
  205. */
  206. public void copyFrom(FileUploadResult other, boolean ignoreNulls) {
  207. if (other == null) {
  208. throw new IllegalArgumentException("Other object cannot be null");
  209. }
  210. if (ignoreNulls) {
  211. this.setFileId(other.getId() != null && StringUtils.isNotEmpty(other.getId()) ? other.getId() : this.getFileId());
  212. this.setObject(other.getObject() != null && StringUtils.isNotEmpty(other.getObject()) ? other.getObject() : this.getObject());
  213. this.setBytes(other.getBytes() != null && StringUtils.isNotEmpty(other.getBytes()) ? other.getBytes() : this.getBytes());
  214. this.setCreated_at(other.getCreated_at() != null && StringUtils.isNotEmpty(other.getCreated_at()) ? other.getCreated_at() : this.getCreated_at());
  215. this.setFilename(other.getFilename() != null && StringUtils.isNotEmpty(other.getFilename()) ? other.getFilename() : this.getFilename());
  216. this.setPurpose(other.getPurpose() != null && StringUtils.isNotEmpty(other.getPurpose()) ? other.getPurpose() : this.getPurpose());
  217. this.setStatus(other.getStatus() != null && StringUtils.isNotEmpty(other.getStatus()) ? other.getStatus() : this.getStatus());
  218. this.setStatus_details(other.getStatus_details() != null && StringUtils.isNotEmpty(other.getStatus_details()) ? other.getStatus_details() : this.getStatus_details());
  219. } else {
  220. // 如果不忽略空值,则直接复制
  221. this.setFileId(other.getId());
  222. this.setObject(other.getObject());
  223. this.setBytes(other.getBytes());
  224. this.setCreated_at(other.getCreated_at());
  225. this.setFilename(other.getFilename());
  226. this.setPurpose(other.getPurpose());
  227. this.setStatus(other.getStatus());
  228. this.setStatus_details(other.getStatus_details());
  229. }
  230. }
  231. }