domain.java.vm 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package ${package}.domain;
  2. import org.apache.commons.lang3.builder.ToStringBuilder;
  3. import org.apache.commons.lang3.builder.ToStringStyle;
  4. import com.ruoyi.framework.web.domain.BaseEntity;
  5. #foreach ($column in $columns)
  6. #if($column.attrType == 'Date' && ($column.attrname != 'createTime' && $column.attrname != 'updateTime'))
  7. import java.util.Date;
  8. #break
  9. #end
  10. #end
  11. #foreach ($column in $columns)
  12. #if($column.attrType == 'BigDecimal')
  13. import java.math.BigDecimal;
  14. #break
  15. #end
  16. #end
  17. /**
  18. * ${tableComment}表 ${tableName}
  19. *
  20. * @author ${author}
  21. * @date ${datetime}
  22. */
  23. public class ${className} extends BaseEntity
  24. {
  25. private static final long serialVersionUID = 1L;
  26. #foreach ($column in $columns)
  27. #if($column.attrname != 'createBy' && $column.attrname != 'createTime' && $column.attrname != 'updateBy' && $column.attrname != 'updateTime' && $column.attrname != 'remark')
  28. /** $column.columnComment */
  29. private $column.attrType $column.attrname;
  30. #end
  31. #end
  32. #foreach ($column in $columns)
  33. #if($column.attrname != 'createBy' && $column.attrname != 'createTime' && $column.attrname != 'updateBy' && $column.attrname != 'updateTime' && $column.attrname != 'remark')
  34. public void set${column.attrName}($column.attrType $column.attrname)
  35. {
  36. this.$column.attrname = $column.attrname;
  37. }
  38. public $column.attrType get${column.attrName}()
  39. {
  40. return $column.attrname;
  41. }
  42. #end
  43. #end
  44. public String toString() {
  45. return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
  46. #foreach ($column in $columns)
  47. .append("${column.attrname}", get${column.attrName}())
  48. #end
  49. .toString();
  50. }
  51. }