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

parent.entityVO.vm Maven / Gradle / Ivy

The newest version!
package ${basePackage}.${VOPackage};

#foreach($pkg in ${table.importPackages})
import ${pkg};
#end
#if(${springdoc})
import io.swagger.v3.oas.annotations.media.Schema;
#elseif(${swagger})
##import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
#end
#if(${entityLombokModel})
import lombok.Data;
#if(${chainModel})
import lombok.experimental.Accessors;
#end
#end
#if(${importOnVO}||${exportOnVO})
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
#end
/**
 * $!{table.comment} VO
 *
 * @author ${author}
 * @since ${date}
 */
#if(${entityLombokModel})
@Data
  #if(${chainModel})
@Accessors(chain = true)
  #end
#end
###if(${springdoc})
##@Schema(name = "${entity}VO", description = "$!{table.comment}VO")
###elseif(${swagger})
##@ApiModel(value = "${entity}VO对象", description = "$!{table.comment}VO")
###end
#if(${importOnVO}||${exportOnVO})
@ExcelIgnoreUnannotated
@HeadRowHeight(30)
@ColumnWidth(25)
@ContentRowHeight(20)
#end
public class ${entity}VO {
## ----------  BEGIN 字段循环遍历  ----------
#foreach($field in ${table.fields})
#if(${field.logicDeleteField})
#else

#if("$!field.comment" != "")
  #if(${springdoc})
    @Schema(description = "${field.comment}")
  #elseif(${swagger})
    @ApiModelProperty("${field.comment}")
  #else
    /**
     * ${field.comment}
     */
  #end
#end
    #if(${importOnVO}||${exportOnVO})
    @ExcelProperty(value = "${field.comment}")
    #end
#if(${fieldAnnotationOnVO})
    #if(${field.keyFlag})
## 主键
    #if(${field.keyIdentityFlag})
    @TableId(value = "${field.annotationColumnName}", type = IdType.AUTO)
    #elseif(!$null.isNull(${idType}) && "$!idType" != "")
    @TableId(value = "${field.annotationColumnName}", type = IdType.${idType})
    #elseif(${field.convert})
    @TableId("${field.annotationColumnName}")
    #end
## 普通字段
    #elseif(${field.fill})
## -----   存在字段填充设置   -----
    #if(${field.convert})
    @TableField(value = "${field.annotationColumnName}", fill = FieldFill.${field.fill})
    #else
    @TableField(fill = FieldFill.${field.fill})
    #end
    #elseif(${field.convert})
    @TableField("${field.annotationColumnName}")
    #end
#end
    private ${field.propertyType} ${field.propertyName};
#end
#end
## ----------  END 字段循环遍历  ----------
#if(!${entityLombokModel})
#foreach($field in ${table.fields})
#if(${field.logicDeleteField})
#else
  #if(${field.propertyType.equals("boolean")})
    #set($getprefix="is")
  #else
    #set($getprefix="get")
  #end

    public ${field.propertyType} ${getprefix}${field.capitalName}() {
        return ${field.propertyName};
    }

  #if(${chainModel})
    public ${entity}VO set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
  #else
    public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
  #end
        this.${field.propertyName} = ${field.propertyName};
  #if(${chainModel})
        return this;
  #end
    }
#end
#end
## --foreach end---
#end
## --end of #if(!${entityLombokModel})--
#if(!${entityLombokModel})

    @Override
    public String toString() {
        return "${entity}{" +
  #foreach($field in ${table.fields})
    #if(${field.logicDeleteField})
    #else
    #if($!{foreach.index}==0)
        "${field.propertyName} = " + ${field.propertyName} +
    #else
        ", ${field.propertyName} = " + ${field.propertyName} +
    #end
    #end
  #end
        "}";
    }
#end
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy