entity.ftl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. package ${code.packageName}.entity;
  2. <#list code.propertys as property>
  3. <#if property.type = 'Date'>
  4. import java.util.Date;
  5. <#break>
  6. </#if>
  7. </#list>
  8. <#if code.parentName = "BaseBean">import com.inkasso.adapter.bean.BaseBean;</#if>
  9. <#if code.parentName = "RelationBaseBean">import com.inkasso.adapter.bean.RelationBaseBean;</#if>
  10. import com.baomidou.mybatisplus.annotation.TableField;
  11. import com.baomidou.mybatisplus.annotation.TableName;
  12. import lombok.Setter;
  13. import lombok.Getter;
  14. /**
  15. * @author ${code.author}
  16. * @date ${.now?string('yyyy-MM-dd')}
  17. */
  18. @Getter
  19. @Setter
  20. @TableName("${code.tableName}")
  21. <#if code.parentName = "BaseBean">
  22. public class ${code.className}DO extends BaseBean {
  23. private static final long serialVersionUID = 1L;
  24. <#list code.propertys as property>
  25. <#if property.name = 'create_user_id' || property.name= 'create_user_name' || property.name= 'create_time' || property.name= 'update_user_id' || property.name= 'update_user_name' || property.name= 'update_time' || property.name= 'delete_flag' || property.name= 'version'>
  26. <#continue>
  27. </#if>
  28. /**
  29. * ${property.label}
  30. */
  31. <#if property.type = 'Text'>
  32. @TableField("${property.name}")
  33. private String ${property.name};
  34. <#elseif property.type= 'bigint'>
  35. @TableField("${property.name}")
  36. private Long ${property.name};
  37. <#else>
  38. @TableField("${property.name}")
  39. private ${property.type} ${property.name};
  40. </#if>
  41. </#list>
  42. }
  43. </#if>
  44. <#if code.parentName = "RelationBaseBean">
  45. public class ${code.className}DO extends RelationBaseBean {
  46. private static final long serialVersionUID = 1L;
  47. <#list code.propertys as property>
  48. <#if property.name = 'create_user_id' || property.name= 'create_user_name' || property.name= 'create_time' || property.name= 'update_user_id' || property.name= 'update_user_name' || property.name= 'update_time' || property.name= 'delete_flag' || property.name= 'version'>
  49. <#continue>
  50. </#if>
  51. /**
  52. * ${property.label}
  53. */
  54. <#if property.type = 'Text'>
  55. @TableField("${property.name}")
  56. private String ${property.name};
  57. <#else>
  58. @TableField("${property.name}")
  59. private ${property.type} ${property.name};
  60. </#if>
  61. </#list>
  62. }
  63. </#if>