wip: 代码生成临时提交

This commit is contained in:
ray
2024-07-21 21:50:41 +08:00
parent b123658478
commit 2235f1f5a4
33 changed files with 912 additions and 85 deletions

View File

@@ -1,4 +1,4 @@
package ${package}.model.form;
package ${package}.${subPackage};
import java.io.Serial;
import java.io.Serializable;
@@ -11,10 +11,12 @@ import java.time.LocalDateTime;
#if(${hasBigDecimal})
import java.math.BigDecimal;
#end
#if(${hasRequiredField})
import jakarta.validation.constraints.*;
#end
/**
* $!{tableComment} 表单对象
* $!{tableComment}表单对象
*
* @author ${author}
* @since ${date}
@@ -28,10 +30,22 @@ public class ${entityName}Form implements Serializable {
private static final long serialVersionUID = 1L;
## ---------- BEGIN 字段循环遍历 ----------
#foreach($field in ${fields})
#if("$!field.comment" != "")
@Schema(description = "${field.comment}")
#if($fieldConfigs)
#foreach($fieldConfig in ${fieldConfigs})
#if($fieldConfig.showInForm)
#if($fieldConfig.isRequired)
#if($fieldConfig.fieldType == 'String')
@NotBlank(message = "$fieldConfig.fieldComment不能为空")
#else
@NotNull(message = "$fieldConfig.fieldComment不能为空")
#end
#end
#if("$!fieldConfig.fieldComment" != "")
@Schema(description = "${fieldConfig.fieldComment}")
#end
private ${fieldConfig.fieldType} ${fieldConfig.fieldName};
#end
#end
private ${field.propertyType} ${field.propertyName};
#end
}