package ${packageName};

import cc.smtweb.framework.core.annotation.SwTable;
import cc.smtweb.framework.core.common.SwMap;
import cc.smtweb.framework.core.db.impl.DefaultEntity;

/**
 * Created by ${user} at ${sysTime}
 * 实体【[${tableTitle}](${tableName})】的Entity类
 */
@SwTable("${tableName}")
public class ${beanName} extends DefaultEntity {
    public static final String ENTITY_NAME = "${tableName}";

    public ${beanName}() {
        super(ENTITY_NAME);
    }

    <#list fields as field>
        <#if field.javaType == "boolean">
    /** ${field.title} */
    public boolean is${field.javaName}() {
        return getBool("${field.name}");
    }

    /** ${field.title} */
    public void set${field.javaName}(boolean ${field.name}) {
        setBool("${field.name}", ${field.name});
    }
        <#else >
    /** ${field.title} */
    public ${field.javaType} get${field.javaName}() {
        return get${field.shortJavaType}("${field.name}");
    }

    /** ${field.title} */
    public void set${field.javaName}(${field.javaType} ${field.name}) {
        put("${field.name}", ${field.name});
    }
    </#if>
    </#list>
}
