package ${packageName}.domain;

#foreach ($import in $importList)
import ${import};
#end
import com.bs.common.annotation.Excel;
import com.bs.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
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 io.swagger.annotations.ApiModelProperty;
#if($table.crud || $table.sub)
#elseif($table.tree)
#end

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

#foreach ($column in $columns)
#if(!$column.javaField.equals("tenantId")&&!$column.javaField.equals("createDept")&&!$column.javaField.equals("createBy")&&!$column.javaField.equals("createTime")&&!$column.javaField.equals("updateBy")&&!$column.javaField.equals("updateTime")&&!$column.javaField.equals("delFlag")&&!$column.javaField.equals("updatestamp")&&!$column.javaField.equals("syncstamp"))
#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
    #if($column.isPk.equals("1"))
    @TableId(value = "${column.columnName}",type = IdType.AUTO)
    #end
    @ApiModelProperty(value = "${column.columnComment}")
    private $column.javaType $column.javaField;

#end
#end
#end



}
