mirror of
https://github.com/moshowgame/SpringBootCodeGenerator.git
synced 2026-06-24 15:57:44 +08:00
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
|
|
<#list classInfo.fieldList as fieldItem >
|
|
<#if fieldItem.fieldClass == "Date">
|
|
<#assign importDdate = true />
|
|
</#if>
|
|
</#list>
|
|
</#if>
|
|
import java.io.Serializable;
|
|
<#if importDdate>
|
|
import java.util.Date;
|
|
</#if>
|
|
|
|
/**
|
|
* ${classInfo.classComment}
|
|
*
|
|
* Created by xuxueli on '${.now?string('yyyy-MM-dd HH:mm:ss')}'.
|
|
*/
|
|
public class ${classInfo.className} implements Serializable {
|
|
private static final long serialVersionUID = 42L;
|
|
|
|
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
|
|
<#list classInfo.fieldList as fieldItem >
|
|
/**
|
|
* ${fieldItem.fieldComment}
|
|
*/
|
|
private ${fieldItem.fieldClass} ${fieldItem.fieldName};
|
|
|
|
</#list>
|
|
</#if>
|
|
|
|
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
|
|
<#list classInfo.fieldList as fieldItem>
|
|
public ${fieldItem.fieldClass} get${fieldItem.fieldName?cap_first}() {
|
|
return ${fieldItem.fieldName};
|
|
}
|
|
|
|
public void set${fieldItem.fieldName?cap_first}(${fieldItem.fieldClass} ${fieldItem.fieldName}) {
|
|
this.${fieldItem.fieldName} = ${fieldItem.fieldName};
|
|
}
|
|
|
|
</#list>
|
|
</#if>
|
|
} |