RuoYi-Cloud/ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm

54 lines
1.4 KiB
Plaintext
Raw Normal View History

2020-05-24 20:40:55 +08:00
package ${packageName}.domain;
#foreach ($import in $importList)
import ${import};
#end
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
2020-06-14 15:30:58 +08:00
import com.ruoyi.common.core.annotation.Excel;
2020-05-24 20:40:55 +08:00
#if($table.crud)
2020-06-14 15:30:58 +08:00
import com.ruoyi.common.core.web.domain.BaseEntity;
2020-05-24 20:40:55 +08:00
#elseif($table.tree)
2020-06-14 15:39:43 +08:00
import com.ruoyi.common.core.web.domain.TreeEntity;
2020-05-24 20:40:55 +08:00
#end
import lombok.extern.slf4j.Slf4j;
2020-05-24 20:40:55 +08:00
/**
* ${functionName}对象 ${tableName}
*
* @author ${author}
* @date ${datetime}
*/
#if($table.crud)
#set($Entity="BaseEntity")
#elseif($table.tree)
#set($Entity="TreeEntity")
#end
@Slf4j
2020-05-24 20:40:55 +08:00
public class ${ClassName} extends ${Entity}
{
private static final long serialVersionUID = 1L;
#foreach ($column in $columns)
#if(!$table.isSuperColumn($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')
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
#else
@Excel(name = "${comment}")
#end
#end
private $column.javaType $column.javaField;
#end
#end
}