mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2025-01-19 19:50:06 +08:00
增加 baseVO.vm 模板
This commit is contained in:
parent
fade9bce32
commit
8db3297800
28
src/main/resources/codegen/controller/vo/baseVO.vm
Normal file
28
src/main/resources/codegen/controller/vo/baseVO.vm
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package ${basePackage}.${table.moduleName}.controller.${table.businessName}.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ${table.classComment} Base VO,提供给添加、修改、详细的子 VO 使用
|
||||||
|
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ${table.className}BaseVO {
|
||||||
|
|
||||||
|
#foreach ($column in $columns)
|
||||||
|
#if (${column.createOperation} && ${column.updateOperation} && ${column.listOperationResult})##通用操作
|
||||||
|
@ApiModelProperty(value = "${column.columnComment}"#if (!${column.nullable}), required = true#end#if ("$!column.example" != ""), example = "${column.example}"#end)
|
||||||
|
#if (!${column.nullable})#if (${field.fieldType} == 'String')## 判断 @NotEmpty 和 @NotNull 注解
|
||||||
|
@NotEmpty(message = "${column.columnComment}不能为空")
|
||||||
|
#else
|
||||||
|
@NotNull(message = "${column.columnComment}不能为空")
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
private ${column.javaType} ${column.javaField};
|
||||||
|
|
||||||
|
#end
|
||||||
|
#end
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user