All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.zutil.coder.XxBean.ftl Maven / Gradle / Ivy

There is a newer version: 1.1.38
Show newest version
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")
	private ${f.type.simpleName} ${f.name};


<#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")
    @TableField(exist = false)
	private ${f.type.simpleName} ${f.name};


<#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};
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy