package ${package.Entity};
#foreach($pkg in ${})
import ${pkg};
#end
#if(${swagger})
import ;
import ;
#end
#if(${entityLombokModel})
import ;
import ;
import ;
import ;
#if(${chainModel})
import ;
#end
#end
/**
* $!{}
*
* @author ${author}
* @since ${date}
*/
#if(${entityLombokModel})
#if(${chainModel})
#end
#end
#if(${})
#end
#if(${swagger})
#end
#if(${superEntityClass})
public class ${entity} extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
#elseif(${activeRecord})
public class ${entity} extends Model<${entity}> {
#elseif(${entitySerialVersionUID})
public class ${entity} implements Serializable {
#else
public class ${entity} {
#end
#if(${entitySerialVersionUID})
private static final long serialVersionUID = 1L;
#end
## ---------- BEGIN 字段循环遍历 ----------
#foreach($field in ${})
#if(${})
#set($keyPropertyName=${})
#end
#if("$!" != "")
#if(${swagger})
#else
/**
* ${}
*/
#end
#end
#if(${})
## 主键
#if(${})
#elseif(!$null.isNull(${idType}) && "$!idType" != "")
#elseif(${})
#end
## 普通字段
#elseif(${})
## ----- 存在字段填充设置 -----
#if(${})
#else
#end
#elseif(${})
#end
## 乐观锁注解
#if(${})
#end
## 逻辑删除注解
#if(${})
#end
private ${} ${};
#end
## ---------- END 字段循环遍历 ----------
#if(!${entityLombokModel})
#foreach($field in ${})
#if(${("boolean")})
#set($getprefix="is")
#else
#set($getprefix="get")
#end
public ${} ${getprefix}${}() {
return ${};
}
#if(${chainModel})
public ${entity} set${}(${} ${}) {
#else
public void set${}(${} ${}) {
#end
this.${} = ${};
#if(${chainModel})
return this;
#end
}
#end
## --foreach end---
#end
## --end of #if(!${entityLombokModel})--
#if(${entityColumnConstant})
#foreach($field in ${})
public static final String ${()} = "${}";
#end
#end
#if(${activeRecord})
public Serializable pkVal() {
#if(${keyPropertyName})
return this.${keyPropertyName};
#else
return null;
#end
}
#end
#if(!${entityLombokModel})
public String toString() {
return "${entity}{" +
#foreach($field in ${})
#if($!{}==0)
"${}=" + ${} +
#else
", ${}=" + ${} +
#end
#end
"}";
}
#end
}