ShowOnDemo.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. public class ShowOnDemo extends BaseEntity {
  11. private static final long serialVersionUID = -880789857565402658L;
  12. @DodoField(sortSeq = 1, name = "身份类别", isnullable = false, infoTip = "请选择一个身份,其他字段将根据选择结果自动切换")
  13. private PersonKind personKind;
  14. @DodoField(sortSeq = 2, name = "帅吗?", showOnField = "personKind", showOnValue = "GeGe", isnullable = false)
  15. private Boolean isField1;
  16. @DodoField(sortSeq = 2, name = "自我介绍", showOnField = "personKind", showOnValue = "GeGe", isnullable = false, isRichText = true)
  17. private String desc1;
  18. @DodoField(sortSeq = 2, name = "漂亮吗?", showOnField = "personKind", showOnValue = "MeiMei", isnullable = false)
  19. private Boolean isField2;
  20. @DodoField(sortSeq = 2, name = "上传美照", showOnField = "personKind", showOnValue = "MeiMei", isnullable = false, isFile = true, fileStyle = FileStyle.OnlyPath, fileType = { @DodoFileType(title = "图片文件", extensions = "jpg,jpeg,gif,png,bmp") }, maxFileSize = 1)
  21. private String desc2;
  22. @DodoField(sortSeq = 2, name = "调皮吗?", showOnField = "personKind", showOnValue = "DiDi", isnullable = false)
  23. private Boolean isField3;
  24. @DodoField(sortSeq = 2, name = "兴趣爱好", showOnField = "personKind", showOnValue = "DiDi", isnullable = false, isTextArea = true)
  25. private String desc3;
  26. @Column(length = 3)
  27. @Convert(converter = PersonKind.Converter.class)
  28. public PersonKind getPersonKind() {
  29. return personKind;
  30. }
  31. public void setPersonKind(PersonKind personKind) {
  32. this.personKind = personKind;
  33. }
  34. public Boolean getIsField1() {
  35. return isField1;
  36. }
  37. public void setIsField1(Boolean isField1) {
  38. this.isField1 = isField1;
  39. }
  40. @Lob
  41. public String getDesc1() {
  42. return desc1;
  43. }
  44. public void setDesc1(String desc1) {
  45. this.desc1 = desc1;
  46. }
  47. public Boolean getIsField2() {
  48. return isField2;
  49. }
  50. public void setIsField2(Boolean isField2) {
  51. this.isField2 = isField2;
  52. }
  53. @Column(length = 128)
  54. public String getDesc2() {
  55. return desc2;
  56. }
  57. public void setDesc2(String desc2) {
  58. this.desc2 = desc2;
  59. }
  60. public Boolean getIsField3() {
  61. return isField3;
  62. }
  63. public void setIsField3(Boolean isField3) {
  64. this.isField3 = isField3;
  65. }
  66. @Column(length = 64)
  67. public String getDesc3() {
  68. return desc3;
  69. }
  70. public void setDesc3(String desc3) {
  71. this.desc3 = desc3;
  72. }
  73. }