update.dto.java.ftl 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. import java.util.Date;
  11. <#--子表遍历-->
  12. <#if childTables?? >
  13. <#list childTables as childTable>
  14. import com.xjrsoft.module.${outputArea}.entity.${childTable.tableName?cap_first};
  15. </#list>
  16. </#if>
  17. /**
  18. * @title: ${tableComment}
  19. * @Author ${author}
  20. * @Date: ${date}
  21. * @Version 1.0
  22. */
  23. @Data
  24. public class Update${entityClass}Dto extends Add${entityClass}Dto {
  25. private static final long serialVersionUID = 1L;
  26. <#--属性遍历-->
  27. <#list fields as field>
  28. /**
  29. * ${field.fieldComment}
  30. */
  31. @ApiModelProperty("${field.fieldComment}")
  32. <#if field.fieldType == "LocalDateTime" && field.pattern??>
  33. @JsonFormat(pattern = "${field.pattern}")
  34. </#if>
  35. private ${field.fieldType} ${field.fieldName};
  36. </#list>
  37. }