Entity.java.vm 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package ${globalConfig.parentPack}.model.auto;
  2. import java.io.Serializable;
  3. import io.swagger.annotations.ApiModel;
  4. import io.swagger.annotations.ApiModelProperty;
  5. ${JavaClassPackages}
  6. /**
  7. * ${TsysTables.tableComment} ${TsysTables.tableModel}
  8. * @author ${globalConfig.author}_自动生成
  9. * @email ${globalConfig.email}
  10. * @date ${datetime}
  11. */
  12. @ApiModel(value="${TsysTables.tableModel}", description="${TsysTables.tableComment}")
  13. public class ${TsysTables.tableModel} implements Serializable {
  14. private static final long serialVersionUID = 1L;
  15. #foreach ($column in $beanColumns)
  16. /** $column.column_comment **/
  17. #if(${column.beanType} == "java.util.Date")
  18. @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
  19. #end
  20. @ApiModelProperty(value = "$column.column_comment")
  21. private ${column.attrType} ${column.beanName};
  22. #end
  23. #foreach ($column in $beanColumns)
  24. #if($column.beanType == "java.util.String")
  25. public $column.attrType get${column.funName}() {
  26. return $column.beanName;
  27. }
  28. public void set${column.funName}(${column.attrType} ${column.beanName}){
  29. this.${column.beanName} = ${column.beanName} == null ? null : ${column.beanName}.trim();
  30. }
  31. #else
  32. public ${column.attrType} get${column.funName}() {
  33. return ${column.beanName};
  34. }
  35. public void set${column.funName}(${column.attrType} ${column.beanName}) {
  36. this.${column.beanName} = ${column.beanName};
  37. }
  38. #end
  39. #end
  40. public ${TsysTables.tableModel}() {
  41. super();
  42. }
  43. #set( $lag = 0)
  44. #set( $lagstr="")
  45. #foreach ($column in $beanColumns)
  46. #if(($lag+1)>=(${beanColumns.size()}))
  47. #set($lagstr = $lagstr+"${column.attrType} ${column.beanName}")
  48. #else
  49. #set($lagstr = $lagstr+"${column.attrType} ${column.beanName},")
  50. #end
  51. #set( $lag = $lag + 1 )
  52. #end
  53. public ${TsysTables.tableModel}($lagstr) {
  54. #foreach ($column in $beanColumns)
  55. this.${column.beanName} = ${column.beanName};
  56. #end
  57. }
  58. }