package ${packageName}.domain; import lombok.Data; import lombok.EqualsAndHashCode; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.IdType; #foreach ($import in $importList) import ${import}; #end import com.ktg.common.annotation.Excel; #if($table.crud || $table.sub) import com.ktg.common.core.domain.model.BaseBean; #elseif($table.tree) import com.ktg.common.core.domain.TreeEntity; #end /** * ${functionName}对象 ${tableName} * * @author ${author} * @date ${datetime} */ #if($table.crud || $table.sub) #set($Entity="BaseBean") #elseif($table.tree) #set($Entity="TreeEntity") #end @EqualsAndHashCode(callSuper = true) @Data public class ${ClassName} extends ${Entity} { private static final long serialVersionUID = 1L; #foreach ($column in $columns) #if(!$table.isSuperColumn($column.javaField)) @ApiModelProperty(value = "$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 #if (${column.pk})##处理主键 @TableId(type = IdType.AUTO) #if (${column.javaType} == 'String')(type = IdType.INPUT) #end #end private $column.javaType $column.javaField; #end #end }