SingleTreeDemo.java

  1. package com.example.entity.demo_4.base_1;
  2. @Entity
  3. @DynamicInsert
  4. @DodoEntity(name = "单表树", actions = { DodoAction.ALL })
  5. @DodoMenus(
  6. levelOne = @DodoMenu(name = "Demo系统", sortSeq = 7),
  7. levelTwo = @DodoMenu(name = "基础演示", sortSeq = 1),
  8. levelThree = @DodoMenu(name = "单表树演示", sortSeq = 11)
  9. )
  10. @DodoTreeRef(mapParentField = "parentDemo")
  11. public class SingleTreeDemo extends BaseEntity {
  12. private static final long serialVersionUID = 5030052771143415896L;
  13. @DodoField(sortSeq = 0, name = "上级")
  14. private SingleTreeDemo parentDemo;
  15. @DodoShowColumn(sortSeq = 1)
  16. @DodoField(sortSeq = 1, name = "名称", isnullable = false)
  17. private String name;
  18. @OneToOne
  19. public SingleTreeDemo getParentDemo() {
  20. return parentDemo;
  21. }
  22. public void setParentDemo(SingleTreeDemo parentDemo) {
  23. this.parentDemo = parentDemo;
  24. }
  25. @Column(length = 16)
  26. public String getName() {
  27. return name;
  28. }
  29. public void setName(String name) {
  30. this.name = name;
  31. }
  32. }