po.ftl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <#include "../function.ftl">
  2. <#include "../variable.ftl">
  3. <#assign pkVar=convertUnderLine(pk) >
  4. <#if isBaseModule = 'true'>
  5. package com.${cAlias}.${cPlatform}.${sys}.persistence.entity;
  6. <#else>
  7. package com.${cAlias}.${cPlatform}.${sys}.${module}.persistence.entity;
  8. </#if>
  9. <#if hasSub?exists && hasSub==true>
  10. import java.util.ArrayList;
  11. import java.util.List;
  12. </#if>
  13. /**
  14. * ${model.tabComment} 实体对象
  15. *
  16. *<pre>
  17. <#if vars.company?exists>
  18. * 开发公司:${vars.company}
  19. </#if>
  20. <#if vars.developer?exists>
  21. * 开发人员:${vars.developer}
  22. </#if>
  23. <#if vars.email?exists>
  24. * 邮箱地址:${vars.email}
  25. </#if>
  26. * 创建时间:${date?string("yyyy-MM-dd HH:mm:ss")}
  27. *</pre>
  28. */
  29. @SuppressWarnings("serial")
  30. public class ${class}Po extends ${class}Tbl{
  31. <#if hasSub?exists && hasSub==true>
  32. <#list model.subTableList as subTable>
  33. private List<${subTable.variables.class}Po> ${subTable.variables.classVar}PoList = new ArrayList<${subTable.variables.class}Po>();
  34. </#list>
  35. private boolean delBeforeSave = true;
  36. <#list model.subTableList as subTable>
  37. public List<${subTable.variables.class}Po> get${subTable.variables.class}PoList() {
  38. return ${subTable.variables.classVar}PoList;
  39. }
  40. public void set${subTable.variables.class}PoList(List<${subTable.variables.class}Po> ${subTable.variables.classVar}PoList) {
  41. this.${subTable.variables.classVar}PoList = ${subTable.variables.classVar}PoList;
  42. }
  43. </#list>
  44. public boolean isDelBeforeSave() {
  45. return delBeforeSave;
  46. }
  47. public void setDelBeforeSave(boolean delBeforeSave) {
  48. this.delBeforeSave = delBeforeSave;
  49. }
  50. </#if>
  51. }