templates.zutil.coder.XxBean.ftl Maven / Gradle / Ivy
package ${packageName}.entity.${moduleName};
import com.baomidou.mybatisplus.annotation.TableField;
import com.zcj.util.coder.annotation.CnName;
import com.zcj.web.mybatisplus.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
@CnName("${tableCnName!""}")
public class ${className!""} extends BaseEntity {
private static final long serialVersionUID = 1L;
<#assign apiDataTypeMap={"Long":"long", "Integer":"int", "String": "string", "Date": "string", "Float": "float", "BigDecimal": "float"} />
<#list allFieldList as f><#if !f.tableExclude>
@CnName("${fieldNameCommentMap[f.name]}")
@ApiModelProperty(value = "${fieldNameCommentMap[f.name]}"<#if ["int", "float", "long"]?seq_contains(apiDataTypeMap[f.type.simpleName])>, example = "1"#if>)
private ${f.type.simpleName} ${f.name};
#if>#list>
<#list allFieldList as f><#if f.tableExclude>
@CnName("${fieldNameCommentMap[f.name]}")
@ApiModelProperty(value = "${fieldNameCommentMap[f.name]}"<#if ["int", "float", "long"]?seq_contains(apiDataTypeMap[f.type.simpleName])>, example = "1"#if>)
@TableField(exist = false)
private ${f.type.simpleName} ${f.name};
#if>#list>
<#list allFieldList as f>
public ${f.type.simpleName} get${f.name?cap_first}() {
return ${f.name};
}
public void set${f.name?cap_first}(${f.type.simpleName} ${f.name}) {
this.${f.name} = ${f.name};
}
#list>
}