BaseTypeDemo.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 = 6)
  9. )
  10. public class BaseTypeDemo extends BaseEntity {
  11. private static final long serialVersionUID = -4958412697888233929L;
  12. @DodoField(sortSeq = 1, name = "Byte类型字段")
  13. private Byte byteField;
  14. @DodoField(sortSeq = 2, name = "Short类型字段")
  15. private Short shortField;
  16. @DodoField(sortSeq = 3, name = "Integer类型字段", infoTip = "列表查询条件", queryOnList = true)
  17. private Integer integerField;
  18. @DodoField(sortSeq = 4, name = "Long类型字段")
  19. private Long longField;
  20. @DodoField(sortSeq = 5, name = "Float类型字段")
  21. private Float floatField;
  22. @DodoField(sortSeq = 6, name = "Double类型字段")
  23. private Double doubleField;
  24. @DodoField(sortSeq = 7, name = "Boolean类型字段")
  25. private Boolean booleanField;
  26. @DodoField(sortSeq = 8, name = "BigDecimal类型字段")
  27. private BigDecimal bigDecimalField;
  28. @DodoField(sortSeq = 9, name = "String类型字段", infoTip = "列表查询条件", queryOnList = true)
  29. private String stringField;
  30. @DodoField(sortSeq = 9, name = "String类型字段(NOT Encode)", isEncode = false, infoTip = "字符串不进行URLEncode", listable = false)
  31. private String encodeField;
  32. @DodoField(sortSeq = 10, name = "Date类型字段", dateFormat = "yyyy-MM-dd")
  33. private Date dateField;
  34. @DodoField(sortSeq = 11, name = "Time类型字段")
  35. private Time timeField;
  36. @DodoField(sortSeq = 12, name = "Timestamp类型字段")
  37. private Timestamp timestampField;
  38. @DodoField(sortSeq = 13, name = "枚举类型字段")
  39. private DemoEnum enumField;
  40. @DodoField(sortSeq = 14, name = "引用类型字段(下拉)", infoTip = "列表查询条件", queryOnList = true)
  41. private Province province;
  42. @DodoField(sortSeq = 15, name = "引用类型字段(弹出)", isPopup = true)
  43. private City city;
  44. @DodoField(sortSeq = 18, name = "Textarea类型字段", isTextArea = true)
  45. private String textareaField;
  46. @DodoField(sortSeq = 19, name = "富文本类型字段", isRichText = true)
  47. private String richtextField;
  48. @DodoField(sortSeq = 20, name = "单文件类型字段(限制图片)", isFile = true, fileStyle = FileStyle.OnlyPath, fileType = { @DodoFileType(title = "图片文件", extensions = "jpg,jpeg,gif,png,bmp") }, maxFileSize = 1)
  49. private String imageField;
  50. @DodoField(sortSeq = 21, name = "单文件类型字段(限制ZIP)", isFile = true, fileStyle = FileStyle.OnlyPath, fileType = { @DodoFileType(title = "Zip文件", extensions = "zip") }, maxFileSize = 1)
  51. private String zipField;
  52. @DodoField(sortSeq = 22, name = "多文件类型字段", isFile = true, isMultiFile = true, maxFileSize = 1)
  53. private String multiZipField;
  54. @DodoField(sortSeq = 23, name = "文档字段", isDoc = true, maxFileSize = 1)
  55. private String docField;
  56. @DodoField(sortSeq = 24, name = "视频文件", isVideo = true, maxFileSize = 15)
  57. private String videoField;
  58. @DodoField(sortSeq = 25, name = "自动取值(当前用户)", isAdmin = true)
  59. private Admin admin;
  60. @DodoField(sortSeq = 26, name = "颜色类型字段", isColor = true)
  61. private String colorField;
  62. @DodoField(sortSeq = 27, name = "地理位置类型字段", isLocation = true)
  63. private String locationField;
  64. public Byte getByteField() {
  65. return byteField;
  66. }
  67. public void setByteField(Byte byteField) {
  68. this.byteField = byteField;
  69. }
  70. public Short getShortField() {
  71. return shortField;
  72. }
  73. public void setShortField(Short shortField) {
  74. this.shortField = shortField;
  75. }
  76. public Integer getIntegerField() {
  77. return integerField;
  78. }
  79. public void setIntegerField(Integer integerField) {
  80. this.integerField = integerField;
  81. }
  82. public Long getLongField() {
  83. return longField;
  84. }
  85. public void setLongField(Long longField) {
  86. this.longField = longField;
  87. }
  88. public Float getFloatField() {
  89. return floatField;
  90. }
  91. public void setFloatField(Float floatField) {
  92. this.floatField = floatField;
  93. }
  94. public Double getDoubleField() {
  95. return doubleField;
  96. }
  97. public void setDoubleField(Double doubleField) {
  98. this.doubleField = doubleField;
  99. }
  100. public Boolean getBooleanField() {
  101. return booleanField;
  102. }
  103. public void setBooleanField(Boolean booleanField) {
  104. this.booleanField = booleanField;
  105. }
  106. public BigDecimal getBigDecimalField() {
  107. return bigDecimalField;
  108. }
  109. public void setBigDecimalField(BigDecimal bigDecimalField) {
  110. this.bigDecimalField = bigDecimalField;
  111. }
  112. @Column(length = 16)
  113. public String getStringField() {
  114. return stringField;
  115. }
  116. public void setStringField(String stringField) {
  117. this.stringField = stringField;
  118. }
  119. public Date getDateField() {
  120. return dateField;
  121. }
  122. public void setDateField(Date dateField) {
  123. this.dateField = dateField;
  124. }
  125. public Time getTimeField() {
  126. return timeField;
  127. }
  128. public void setTimeField(Time timeField) {
  129. this.timeField = timeField;
  130. }
  131. public Timestamp getTimestampField() {
  132. return timestampField;
  133. }
  134. public void setTimestampField(Timestamp timestampField) {
  135. this.timestampField = timestampField;
  136. }
  137. @Column(length = 3)
  138. @Convert(converter = DemoEnum.Converter.class)
  139. public DemoEnum getEnumField() {
  140. return enumField;
  141. }
  142. public void setEnumField(DemoEnum enumField) {
  143. this.enumField = enumField;
  144. }
  145. @OneToOne
  146. public Province getProvince() {
  147. return province;
  148. }
  149. public void setProvince(Province province) {
  150. this.province = province;
  151. }
  152. @Column(length = 128)
  153. public String getEncodeField() {
  154. return encodeField;
  155. }
  156. public void setEncodeField(String encodeField) {
  157. this.encodeField = encodeField;
  158. }
  159. @OneToOne
  160. public City getCity() {
  161. return city;
  162. }
  163. public void setCity(City city) {
  164. this.city = city;
  165. }
  166. @Column(length = 64)
  167. public String getTextareaField() {
  168. return textareaField;
  169. }
  170. public void setTextareaField(String textareaField) {
  171. this.textareaField = textareaField;
  172. }
  173. @Lob
  174. public String getRichtextField() {
  175. return richtextField;
  176. }
  177. public void setRichtextField(String richtextField) {
  178. this.richtextField = richtextField;
  179. }
  180. @Column(length = 128)
  181. public String getImageField() {
  182. return imageField;
  183. }
  184. public void setImageField(String imageField) {
  185. this.imageField = imageField;
  186. }
  187. @Column(length = 128)
  188. public String getZipField() {
  189. return zipField;
  190. }
  191. public void setZipField(String zipField) {
  192. this.zipField = zipField;
  193. }
  194. @Lob
  195. public String getMultiZipField() {
  196. return multiZipField;
  197. }
  198. public void setMultiZipField(String multiZipField) {
  199. this.multiZipField = multiZipField;
  200. }
  201. @Lob
  202. public String getDocField() {
  203. return docField;
  204. }
  205. public void setDocField(String docField) {
  206. this.docField = docField;
  207. }
  208. @Lob
  209. public String getVideoField() {
  210. return videoField;
  211. }
  212. public void setVideoField(String videoField) {
  213. this.videoField = videoField;
  214. }
  215. @OneToOne
  216. public Admin getAdmin() {
  217. return admin;
  218. }
  219. public void setAdmin(Admin admin) {
  220. this.admin = admin;
  221. }
  222. @Column(length = 16)
  223. public String getColorField() {
  224. return colorField;
  225. }
  226. public void setColorField(String colorField) {
  227. this.colorField = colorField;
  228. }
  229. @Column(length = 64)
  230. public String getLocationField() {
  231. return locationField;
  232. }
  233. public void setLocationField(String locationField) {
  234. this.locationField = locationField;
  235. }
  236. }