domain.java.vm
1.2 KB
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
package ${packageName}.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* ${functionName}表 ${tableName}
*
* @author ${author}
* @date ${datetime}
*/
#if ($tableName.contains("_"))
@TableName(value = "${tableName}")
@Data
#end
public class ${ClassName} implements Serializable{
private static final long serialVersionUID = 1L;
#foreach ($column in $columns)
/** $column.columnComment */
#if(${column.isPk} == 1 && ${column.isIncrement} == 1)
@TableId(value = "${column.columnName}", type = IdType.AUTO)
#elseif (${column.isPk} == 1)
@TableId(value = "${column.columnName}", type = IdType.INPUT)
#else
@TableField(value = "${column.columnName}")
#end
private $column.javaType $column.columnName;
#end
}