package ${packageName}.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shkj.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * ${functionName}对象 ${tableName}
 *
 * @author ${author}
 * @date ${datetime}
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("${tableName}")
public class ${ClassName} implements Serializable {

private static final long serialVersionUID=1L;

#foreach ($column in $columns)

    /**
     * $column.columnComment
     */
#if($column.javaField=="createBy"||$column.javaField=="createTime")
    @TableField(fill = FieldFill.INSERT)
#end
#if($column.javaField=="updateBy"||$column.javaField=="updateTime")
    @TableField(fill = FieldFill.INSERT_UPDATE)
#end
#if($column.javaField=='delFlag')
    @TableLogic
#end
#if($column.isPk==1)
    @TableId(value = "$column.columnName", type = IdType.AUTO)
#end
#if($column.javaType == 'Date')
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
#end
#set($parentheseIndex=$column.columnComment.indexOf("（"))
#if($parentheseIndex != -1)
    #set($comment=$column.columnComment.substring(0, $parentheseIndex))
#else
    #set($comment=$column.columnComment)
#end
#if($parentheseIndex != -1 && $column.readConverterExp() != "")
    @Excel(name = "${comment}", width = 15 )
#elseif($column.javaType == 'Date' || $column.javaField=="deleteFlag" || $column.javaField=="statusFlag")
#else
    @Excel(name = "${comment}", width = 20)
#end
    private $column.javaType $column.javaField;

#end

}
