KnowledgeVo.java 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. package com.redxun.knowledge.entity.vo;
  2. import com.alibaba.fastjson.annotation.JSONField;
  3. import com.fasterxml.jackson.annotation.JsonFormat;
  4. import com.redxun.knowledge.entity.dao.KnowledgeApprove;
  5. import lombok.Data;
  6. import org.springframework.format.annotation.DateTimeFormat;
  7. import java.util.Date;
  8. import java.util.List;
  9. @Data
  10. public class KnowledgeVo {
  11. // 主键
  12. private String pkId;
  13. // 知识分类ID
  14. private String categoryId;
  15. // 知识类型 1-文档知识 2-维基知识
  16. private Integer type;
  17. // 知识类型名称
  18. private String getTypeName() {
  19. if (type != null) {
  20. if (type == 1) {
  21. return "文档知识";
  22. } else if (type == 2) {
  23. return "维基知识";
  24. }
  25. }
  26. return "";
  27. }
  28. // 知识标题
  29. private String titles;
  30. // 作者名称
  31. private String author;
  32. // 知识内容
  33. private String content;
  34. // 简介
  35. private String summary;
  36. // 附件ID
  37. private String attachment;
  38. // 创建时间
  39. @DateTimeFormat(
  40. pattern = "yyyy-MM-dd HH:mm:ss"
  41. )
  42. @JSONField(
  43. format = "yyyy-MM-dd HH:mm:ss"
  44. )
  45. @JsonFormat(
  46. pattern = "yyyy-MM-dd HH:mm:ss",
  47. timezone = "GMT+8"
  48. )
  49. private Date createTime;
  50. // 操作时间
  51. @DateTimeFormat(
  52. pattern = "yyyy-MM-dd HH:mm:ss"
  53. )
  54. @JSONField(
  55. format = "yyyy-MM-dd HH:mm:ss"
  56. )
  57. @JsonFormat(
  58. pattern = "yyyy-MM-dd HH:mm:ss",
  59. timezone = "GMT+8"
  60. )
  61. private Date updateTime;
  62. // 浏览数量
  63. private Integer views;
  64. // 审批状态 1-待节点审核 2-节点驳回 3-待最终审核 4-最终驳回 5-最终通过
  65. private Integer approvalStatus;
  66. // 流程节点
  67. private List<KnowledgeApprovalVo> approvals;
  68. // 第一个流程节点
  69. private KnowledgeApprove approvalsFirst;
  70. //所属分类
  71. private KnowledgeCategoryAdminVo knowledgeCategoryAdminVo;
  72. }