Document.java 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package com.lingyue.document.entity;
  2. import com.baomidou.mybatisplus.annotation.TableField;
  3. import com.baomidou.mybatisplus.annotation.TableName;
  4. import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
  5. import com.lingyue.common.domain.entity.BaseEntity;
  6. import io.swagger.v3.oas.annotations.media.Schema;
  7. import lombok.Data;
  8. import lombok.EqualsAndHashCode;
  9. /**
  10. * 文档实体(设计:documents 表)
  11. */
  12. @EqualsAndHashCode(callSuper = true)
  13. @Data
  14. @TableName(value = "documents", autoResultMap = true)
  15. @Schema(description = "文档实体")
  16. public class Document extends BaseEntity {
  17. @Schema(description = "用户ID")
  18. @TableField("user_id")
  19. private String userId;
  20. @Schema(description = "文档名称")
  21. @TableField("name")
  22. private String name;
  23. @Schema(description = "原始文件名")
  24. @TableField("file_name")
  25. private String fileName;
  26. @Schema(description = "存储路径")
  27. @TableField("file_path")
  28. private String filePath;
  29. @Schema(description = "文件大小")
  30. @TableField("file_size")
  31. private Long fileSize;
  32. @Schema(description = "文件类型:pdf/docx")
  33. @TableField("file_type")
  34. private String fileType;
  35. @Schema(description = "状态:uploaded/parsing/parsed/ner_processing/completed/failed")
  36. @TableField("status")
  37. private String status = "uploaded";
  38. @Schema(description = "解析后的全文")
  39. @TableField("parsed_text")
  40. private String parsedText;
  41. @Schema(description = "页数")
  42. @TableField("page_count")
  43. private Integer pageCount;
  44. @Schema(description = "字数")
  45. @TableField("word_count")
  46. private Integer wordCount;
  47. @Schema(description = "实体数量")
  48. @TableField("entity_count")
  49. private Integer entityCount = 0;
  50. @Schema(description = "关系数量")
  51. @TableField("relation_count")
  52. private Integer relationCount = 0;
  53. @Schema(description = "规则数量")
  54. @TableField("rule_count")
  55. private Integer ruleCount = 0;
  56. @Schema(description = "元数据")
  57. @TableField(value = "metadata", typeHandler = JacksonTypeHandler.class)
  58. private Object metadata;
  59. @Schema(description = "删除标记")
  60. @TableField("del_flag")
  61. private Boolean delFlag = false;
  62. }