|
|
package ${packageName}.domain;
|
|
|
|
|
|
#foreach ($import in $importList)
|
|
|
import ${import};
|
|
|
#end
|
|
|
import com.ruoyi.common.annotation.Excel;
|
|
|
#if($table.crud || $table.sub)
|
|
|
import com.ruoyi.common.core.domain.BaseEntity;
|
|
|
#elseif($table.tree)
|
|
|
import com.ruoyi.common.core.domain.TreeEntity;
|
|
|
#end
|
|
|
import io.swagger.annotations.ApiModel;
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
/**
|
|
|
* ${functionName}对象 ${tableName}
|
|
|
*
|
|
|
* @author ${author}
|
|
|
* @date ${datetime}
|
|
|
*/
|
|
|
#if($table.crud || $table.sub)
|
|
|
#set($Entity="BaseEntity")
|
|
|
#elseif($table.tree)
|
|
|
#set($Entity="TreeEntity")
|
|
|
#end
|
|
|
|
|
|
@ApiModel(value = "${ClassName}", description = "${functionName}对象 ${tableName}")
|
|
|
@Data
|
|
|
@TableName(value = "${tableName}", autoResultMap = true)
|
|
|
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
|
|
|
@ApiModelProperty(value = "$column.columnComment")
|
|
|
private $column.javaType $column.javaField;
|
|
|
|
|
|
#end
|
|
|
#end
|
|
|
#if($table.sub)
|
|
|
/** $table.subTable.functionName信息 */
|
|
|
private List<${subClassName}> ${subclassName}List;
|
|
|
|
|
|
#end
|
|
|
#foreach ($column in $columns)
|
|
|
#if(!$table.isSuperColumn($column.javaField))
|
|
|
#if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]"))
|
|
|
#set($AttrName=$column.javaField)
|
|
|
#else
|
|
|
#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
|
|
#end
|
|
|
#end#end
|
|
|
}
|