Blame view

src/main/resources/codegen/java/controller/vo/_column.vm 645 Bytes
763e2079   YunaiV   基于 Velocity 的 mac...
1
2
3
4
5
6
7
8
9
10
11
12
13
  ## 提供给 baseVO、createVO、updateVO 生成字段
      @ApiModelProperty(value = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end)
  #if (!${column.nullable})## 判断 @NotEmpty 和 @NotNull 注解
  #if (${field.fieldType} == 'String')
      @NotEmpty(message = "${column.columnComment}不能为空")
  #else
      @NotNull(message = "${column.columnComment}不能为空")
  #end
  #end
  #if (${column.javaType} == "Date")## 时间类型
      @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
  #end
      private ${column.javaType} ${column.javaField};