Blame view

src/main/resources/templates/vm/java/domain.java.vm 1.2 KB
mahuandong authored
1
package ${packageName}.domain;
tangying authored
2
周峰 authored
3
4
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
mahuandong authored
5
6
7
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
tangying authored
8
9
10
11
12
13
14
15
16
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;

/**
mahuandong authored
17
 * ${functionName}表 ${tableName}
tangying authored
18
19
20
21
22
 * 
 * @author ${author}
 * @date ${datetime}
 */
#if ($tableName.contains("_"))
mahuandong authored
23
24
@TableName(value = "${tableName}")
@Data
tangying authored
25
#end
mahuandong authored
26
public class ${ClassName} implements Serializable{
tangying authored
27
28
29
	private static final long serialVersionUID = 1L;

#foreach ($column in $columns)
mahuandong authored
30
31
        /** $column.columnComment */
    #if(${column.isPk} == 1 && ${column.isIncrement} == 1)
周峰 authored
32
    @TableId(value = "${column.columnName}", type = IdType.AUTO)
mahuandong authored
33
    #elseif (${column.isPk} == 1)
周峰 authored
34
    @TableId(value = "${column.columnName}", type = IdType.INPUT)
mahuandong authored
35
        #else
周峰 authored
36
    @TableField(value = "${column.columnName}")
mahuandong authored
37
    #end
周峰 authored
38
	private $column.javaType $column.columnName;
tangying authored
39
40
41
#end

}