vm.java.domain.vm Maven / Gradle / Ivy
The newest version!
package ${packageName}.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.seal.common.annotation.Excel;
import com.seal.common.core.domain.BaseEntityBiz;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.math.BigDecimal;
import java.util.Date;
/**
* ${functionName}对象 ${tableName}
*
* @author ${author}
* @date ${datetime}
*/
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("${tableName}")
public class ${ClassName} extends BaseEntityBiz {
#set($excludeColumns=['id', 'delFlag', 'createBy', 'createTime', 'updateBy', 'updateTime', 'remark', 'version'])
#foreach ($column in $columns)
#if(!$excludeColumns.contains($column.javaField))
/** $column.columnComment */
#if($column.list)
#set($parentheseIndex=$column.columnComment.indexOf("("))
#if($parentheseIndex != -1)
#set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
#set($comment=$column.columnComment)
#end
#if($parentheseIndex != -1)
@Excel(name = "${comment}" , readConverterExp = "$column.readConverterExp()")
#elseif($column.javaType == 'Date')
@Excel(name = "${comment}" , width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
#else
@Excel(name = "${comment}")
#end
#end
#if($column.isPk==1)
@TableId(value = "$column.columnName")
private $column.javaType $column.javaField;
#else
private $column.javaType $column.javaField;
#end
#end
#end
#if(false)
@TableField(exist = false)
private Map params = new HashMap<>();
#end
}