SYYTe/maku-boot-module/maku-module-generator/src/main/resources/template/java/Query.java.ftl

33 lines
827 B
Plaintext
Raw Normal View History

2022-11-08 15:51:08 +08:00
package ${package}.${moduleName}.query;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import ${package}.framework.common.query.Query;
import org.springframework.format.annotation.DateTimeFormat;
2022-11-08 15:51:08 +08:00
<#list importList as i>
import ${i!};
</#list>
/**
* ${tableComment}查询
*
* @author ${author} ${email}
* @since ${version} ${date}
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "${tableComment}查询")
public class ${ClassName}Query extends Query {
<#list queryList as field>
<#if field.fieldComment!?length gt 0>
@Schema(description = "${field.fieldComment}")
</#if>
<#if field.attrType == 'Date'>
@DateTimeFormat(pattern = DateUtils.DATE_TIME_PATTERN)
</#if>
2022-11-08 15:51:08 +08:00
private ${field.attrType} ${field.attrName};
</#list>
}