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

templates.DTO.ftl Maven / Gradle / Ivy

The newest version!
<#if hasProvideServer=true>
package ${basePackage}.api.dto.${moduleName};
<#else>
package ${basePackage}.common.dto.${moduleName};


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
<#list table.importPackages as pkg>
<#if !(pkg?ends_with("Date"))>
import ${pkg};



/**
 * ${table.comment}-DTO
 *
 * @author generator
 * date ${date?string("yyyy-MM-dd")}
 */
@Data
@ApiModel("${table.comment}-DTO")
public class ${dtoName}DTO implements Serializable {
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.isPrimaryKey || field.propertyType=="Date"
        || field.propertyName == "createUserCode"
        || field.propertyName == "updateUserCode">
        <#continue>
    
    <#if field.comment!?length gt 0>
    /**
     * ${field.comment}
     */
    @ApiModelProperty("${field.comment}")
    
    private ${field.propertyType} ${field.propertyName};

<#------------  END 字段循环遍历  ---------->
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy