package com.mortals.xhx.common.pdu.${businessName};
<#if table.tplCategory=="crud" >
    <#--判断主键类型，设置继承实体类 -->
    <#if pkColumn??&&pkColumn.javaType=="String" >
        <#assign Entity = "BaseEntityStr">
    <#elseif pkColumn??&&pkColumn.javaType=="Integer">
        <#assign Entity = "BaseEntityInt">
    <#elseif pkColumn??&&pkColumn.javaType=="Long">
        <#assign Entity = "BaseEntityLong">
    <#else>
        <#assign Entity = "BaseEntityLong">
    </#if>
<#else>
    <#assign Entity = "BaseEntityLong">
</#if>
import java.util.Date;
import java.util.List;
import com.mortals.framework.model.BaseEntityLong;
import lombok.Data;
/**
* ${functionName}Pdu对象
*
* @author ${author}
* @date ${datetime}
*/
@Data
public class ${ClassName}Pdu extends ${Entity} {
    private static final long serialVersionUID = 1L;

<#list columns as column>
<#if !column.isSuperColumn(column.javaField)>
    /**
    * ${column.columnComment}
    */
    private ${column.javaType} ${column.javaField};
</#if>
</#list>

public void initAttrValue(){
    <#list columns as column>
        <#if !column.isSuperColumn(column.javaField)>

        <#if column.javaType=="Long" && column.defaultValue??&& column.defaultValue!="">
            <#assign Default>${column.defaultValue}L</#assign>
        <#elseif column.javaType=="Integer" && column.defaultValue?? && column.defaultValue!="">
            <#assign Default>${column.defaultValue}</#assign>
        <#elseif column.javaType=="String" && column.defaultValue??>
            <#assign Default>"${column.defaultValue}"</#assign>
        <#elseif column.javaType=="BigDecimal" && column.defaultValue??&& column.defaultValue!="">
            <#assign Default>BigDecimal.valueOf(${column.defaultValue})</#assign>
        <#elseif column.javaType=="Date" >
            <#assign Default>null</#assign>
        <#else>
            <#assign Default>null</#assign>
        </#if>
            this.${column.javaField} = ${Default};
        </#if>
    </#list>
    }
}