package ${packageName}.domain;

#foreach ($import in $importList)
import ${import};
#end
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.game.common.annotation.Excel;
import com.game.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
#if($table.crud || $table.sub)
#elseif($table.tree)
import com.fenghuang.common.core.domain.TreeEntity;
#end

/**
 * ${functionName}对象 ${tableName}
 *
 * @author ${author}
 * @date ${datetime}
 */
#if($table.crud || $table.sub)
    #set($Entity="BaseEntity")
#elseif($table.tree)
    #set($Entity="TreeEntity")
#end
@ApiModel(value = "${tableName}", description = "${functionName}")
@TableName(value= "${tableName}")
@Data
public class ${ClassName}
        {
private static final long serialVersionUID=1L;

#foreach ($column in $columns)
##    #if(!$table.isSuperColumn($column.javaField))
    /** $column.columnComment */
    @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.isPk == 1)
    @TableId(value = "$column.columnName" , type = IdType.AUTO)
        #else
    @TableField(value = "$column.columnName")
        #end
    private $column.javaType $column.javaField;

##    #end
#end
#if($table.sub)
    /** $table.subTable.functionName信息 */
    private List<${subClassName}> ${subclassName}List;

#end
}