update.dto.java.ftl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package ${package};
  2. import io.swagger.annotations.ApiModelProperty;
  3. import lombok.Data;
  4. import java.io.Serializable;
  5. import java.time.LocalTime;
  6. import java.time.LocalDateTime;
  7. import java.math.BigDecimal;
  8. import com.fasterxml.jackson.annotation.JsonFormat;
  9. import java.util.List;
  10. <#--子表遍历-->
  11. <#if childTables?? >
  12. <#list childTables as childTable>
  13. import com.xjrsoft.module.${outputArea}.entity.${childTable.tableName?cap_first};
  14. </#list>
  15. </#if>
  16. /**
  17. * @title: ${tableComment}
  18. * @Author ${author}
  19. * @Date: ${date}
  20. * @Version 1.0
  21. */
  22. @Data
  23. public class Update${entityClass}Dto implements Serializable {
  24. private static final long serialVersionUID = 1L;
  25. <#--属性遍历-->
  26. <#list fields as field>
  27. /**
  28. * ${(field.fieldComment)!''}
  29. */
  30. @ApiModelProperty("${(field.fieldComment)!''}")
  31. <#if field.fieldType == "LocalDateTime" && field.pattern??>
  32. @JsonFormat(pattern = "${field.pattern}")
  33. </#if>
  34. private ${field.fieldType} ${field.fieldName};
  35. </#list>
  36. <#--子表遍历-->
  37. <#if childTables?? >
  38. <#list childTables as childTable>
  39. /**
  40. * ${childTable.tableName}
  41. */
  42. @ApiModelProperty("${childTable.tableName}子表")
  43. private List<Update${childTable.tableName?cap_first}Dto> ${childTable.tableName}List;
  44. </#list>
  45. </#if>
  46. }