RowRightDemo2.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 = "行级权限演示(2)", sortSeq = 10)
  9. )
  10. @DodoRowRight(entityProperty = "personKind", principalKey = "extPersonKind", principalKeyShowName = "行级权限Demo2:人员类别")
  11. public class RowRightDemo2 extends BaseEntity {
  12. private static final long serialVersionUID = 2340857123849986982L;
  13. @DodoField(sortSeq = 1, name = "人员类别", isnullable = false, infoTip = "添加数据成功后,需要在角色管理里面,修改扩展属性'行级权限Demo2:人员类别',来决定某个角色可以操作哪些数据")
  14. private PersonKind personKind;
  15. @DodoField(sortSeq = 2, name = "其他信息", isnullable = false)
  16. private String field1;
  17. @Column(length = 3)
  18. @Convert(converter = PersonKind.Converter.class)
  19. public PersonKind getPersonKind() {
  20. return personKind;
  21. }
  22. public void setPersonKind(PersonKind personKind) {
  23. this.personKind = personKind;
  24. }
  25. @Column(length = 8)
  26. public String getField1() {
  27. return field1;
  28. }
  29. public void setField1(String field1) {
  30. this.field1 = field1;
  31. }
  32. }