<%
var entityName = toCamelCase(isBlank(prefix) ? table.name : subAfter(table.name, prefix));
var controllerClass = upperFirst(entityName) + "Controller";
var entityClass = upperFirst(entityName) + "Entity";
var entityInstance = entityName + "Entity";
var serviceClass = upperFirst(entityName) + "Service";
var serviceInstance = entityName + "Service";
var mapperClass = upperFirst(entityName) + "Mapper";
var baseUrl = isBlank(prefix) ? table.name : subAfter(table.name, prefix);
%>
package ${basePackage}.${moduleName}.pojo.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import lombok.ToString;
<%for(column in table.columns) {
    var map = javaType(column.dataType);
%>
<%if(!isBlank(map.importStatement)){%>
${map.importStatement}
<%}%>
<%}%>

/**
 * ${table.comment}
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("${table.name}")
public class ${entityClass} {

<%
for(column in table.columns) {
    var map = javaType(column.dataType);
%>
    /**
     * ${column.comment}
     */
    <%if(column.primaryKey){%>
    @TableId(type = IdType.ASSIGN_ID)
    <%}%>
    <%if(column.name == "creator_id" || column.name == "create_time"){%>
    @TableField(fill = FieldFill.INSERT)
    <%}else if(column.name == "modifier_id" || column.name == "modify_time"){%>
    @TableField(fill = FieldFill.INSERT_UPDATE)
    <%}else if(column.name == "deleted"){%>
    @TableLogic
    <%}%>
    private ${map.dataType} ${toCamelCase(column.name)};

<%}%>
}
