Kanban.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. package com.uas.kanban.model;
  2. import com.uas.kanban.annotation.CollectionProperty;
  3. import com.uas.kanban.annotation.FieldProperty;
  4. import com.uas.kanban.base.BaseEntity;
  5. import org.mongodb.morphia.annotations.*;
  6. /**
  7. * 看板
  8. *
  9. * @author sunyj
  10. * @since 2017/10/18 15:35
  11. */
  12. @Entity
  13. @Indexes(@Index(fields = {@Field("name"), @Field("panelCode")}, options = @IndexOptions(unique = true)))
  14. @CollectionProperty(simpleName = "看板")
  15. public class Kanban extends BaseEntity {
  16. private static final long serialVersionUID = 1L;
  17. /**
  18. * 名称
  19. */
  20. @FieldProperty(nullable = false)
  21. private String name;
  22. /**
  23. * 标题
  24. */
  25. private String title;
  26. /**
  27. * 描述
  28. */
  29. private String description;
  30. /**
  31. * 内容
  32. */
  33. @FieldProperty(nullable = false)
  34. private String content;
  35. /**
  36. * 是否启用,默认不启用
  37. */
  38. @FieldProperty(nullable = false)
  39. private Boolean enabled = false;
  40. /**
  41. * 面板 code {@link Panel}
  42. */
  43. @FieldProperty(nullable = false)
  44. private String panelCode;
  45. public String getName() {
  46. return name;
  47. }
  48. public void setName(String name) {
  49. this.name = name;
  50. }
  51. public String getTitle() {
  52. return title;
  53. }
  54. public void setTitle(String title) {
  55. this.title = title;
  56. }
  57. public String getDescription() {
  58. return description;
  59. }
  60. public void setDescription(String description) {
  61. this.description = description;
  62. }
  63. public String getContent() {
  64. return content;
  65. }
  66. public void setContent(String content) {
  67. this.content = content;
  68. }
  69. public Boolean getEnabled() {
  70. return enabled;
  71. }
  72. public void setEnabled(Boolean enabled) {
  73. this.enabled = enabled;
  74. }
  75. public String getPanelCode() {
  76. return panelCode;
  77. }
  78. public void setPanelCode(String panelCode) {
  79. this.panelCode = panelCode;
  80. }
  81. @Override
  82. public String toString() {
  83. return "Kanban{" +
  84. "name='" + name + '\'' +
  85. ", title='" + title + '\'' +
  86. ", description='" + description + '\'' +
  87. ", content='" + content + '\'' +
  88. ", enabled=" + enabled +
  89. ", panelCode='" + panelCode + '\'' +
  90. "} " + super.toString();
  91. }
  92. }