-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity.vm
43 lines (34 loc) · 1.11 KB
/
entity.vm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
##引入宏定义
$!define
##使用宏定义设置回调(保存位置与文件后缀)
#save("/entity", "PO.java")
##使用宏定义设置包后缀
#setPackageSuffix("entity")
##使用全局变量实现默认包导入
$!autoImport
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
##使用宏定义实现类注释信息
#tableComment("实体")
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel("$!{tableInfo.comment}")
public class $!{tableInfo.name}PO {
#foreach($column in $tableInfo.fullColumn)
#if(${column.comment})/**
* ${column.comment}
*/#end
#if($column.obj.name == "id")@ApiModelProperty(value = "$!{column.comment}")#end
#if($column.obj.name != "id")@ApiModelProperty(value = "$!{column.comment}", required = true)#end
private $!{tool.getClsNameByFullName($column.type)} $!{column.name};
#end
}